Exemple #1
0
  void write(ClassEnv e, CodeAttr ce, DataOutputStream out) throws IOException, jasError {
    int pad;
    int source_pc = ce.getPc(source);

    if (((source_pc + 1) % 4) != 0) { // need padding
      pad = (4 - ((source_pc + 1) % 4));
      for (int x = 0; x < pad; x++) out.writeByte(0);
    }
    dflt.writeWideOffset(ce, source, out);
    out.writeInt(min);
    out.writeInt(max);
    int cnt = jmp.length;
    for (int x = 0; x < cnt; x++) {
      jmp[x].writeWideOffset(ce, source, out);
    }
  }
Exemple #2
0
  void write(ClassEnv e, CodeAttr ce, DataOutputStream out) throws IOException, jasError {
    int pad;
    int source_pc = ce.getPc(source);

    if (((source_pc + 1) % 4) != 0) { // need padding
      pad = (4 - ((source_pc + 1) % 4));
      for (int x = 0; x < pad; x++) out.writeByte(0);
    }

    // write offset to default
    // as a 4 byte signed value
    dflt.writeWideOffset(ce, source, out);
    if (jmp == null) {
      out.writeInt(0);
    } else {
      out.writeInt(jmp.length);
      for (int x = 0; x < jmp.length; x++) {
        out.writeInt(match[x]);
        jmp[x].writeWideOffset(ce, source, out);
      }
    }
  }