Examples of opcode()


Examples of erjang.beam.repr.Insn.opcode()

public class Rewriter {
    public void rewriteFunctionBody(List<Insn> body, FunctionInfo sig) {
  ListIterator<Insn> it = body.listIterator();
  while (it.hasNext()) {
      final Insn insn = it.next();
      switch (insn.opcode()) {
      case call_fun: {
    int save_pos = savePos(it);
    boolean trigger = (it.hasNext() &&
           it.next().opcode() == BeamOpcode.deallocate &&
           it.hasNext() &&
View Full Code Here

Examples of erjang.beam.repr.Insn.opcode()

        vis.visitBegin(exh);

        for (int insn_idx = 0; insn_idx < insns.size(); insn_idx++) {
          Insn insn_ = insns.get(insn_idx);
          BeamOpcode opcode = insn_.opcode();
          TypeMap type_map = this.map[insn_idx];

          switch (opcode) {
          case func_info: {
            Insn.AAI insn = (Insn.AAI)insn_;
View Full Code Here

Examples of erjang.beam.repr.Insn.opcode()

            Arg src  = src_arg(insn_idx, insn.src);
            Arg dest = dest_arg(insn_idx, insn.dest);

            if (insns.size() > insn_idx+1) {
            Insn next_insn = insns.get(insn_idx+1);
            if (next_insn.opcode() == BeamOpcode.K_return) {
              vis.visitInsn(BeamOpcode.K_return, src);
              insn_idx += 1;
              break;
            }
            }
View Full Code Here

Examples of erjang.beam.repr.Insn.opcode()

          case is_tuple: {
           
            if (insn_idx+1 < insns.size()) {
            Insn next_insn = insns.get(insn_idx+1);
            if (next_insn.opcode() == BeamOpcode.test_arity) {
             
              int this_fail = decode_labelref(((Insn.L)insn_).label, this.map[insn_idx].exh);
              int next_fail = decode_labelref(((Insn.L)next_insn).label, this.map[insn_idx+1].exh);

              if (this_fail == next_fail) {
View Full Code Here

Examples of erjang.beam.repr.Insn.opcode()

                + this.block_label + ":" + insn_idx);
          }

          map[insn_idx] = current;
          Insn insn_ = insns.get(insn_idx);
          BeamOpcode code = insn_.opcode();
          last_opcode = code; last_insn = insn_;
          /*
           * System.out.println(name + "(" + bb_label + "):" + i +
           * " :: " + current + "" + insn);
           */
 
View Full Code Here

Examples of erjang.beam.repr.Insn.opcode()

          case is_tuple: {
           
            if (insn_idx+1 < insns.size()) {
            Insn next_insn = insns.get(insn_idx+1);
            if (next_insn.opcode() == BeamOpcode.test_arity) {
             
              if (this.map[insn_idx+1] == null) {
                this.map[insn_idx+1] = this.map[insn_idx];
              }
             
View Full Code Here

Examples of erjang.beam.repr.Insn.opcode()

    code = new ArrayList<Insn>();
    Insn insn;
    do {
      insn = readInstruction();
      code.add(insn);
    } while (insn.opcode() != BeamOpcode.int_code_end);
    }

    public Insn readInstruction() throws IOException {
    int opcode_no = in.read1();
    BeamOpcode opcode = BeamOpcode.decode(opcode_no);
View Full Code Here

Examples of org.apache.jdo.impl.enhancer.classfile.Insn.opcode()

        // first instruction is a target
        final Insn firstInsn = codeAttr.theCode();
        Insn insn = firstInsn.next();
        while (insn != null) {
            switch(insn.opcode()) {
            case VMConstants.opc_getfield:
            case VMConstants.opc_putfield: {
                final int r = checkGetPutField(out, insn, jdoMethod);
                if (r < NEGATIVE) {
                    res = ERROR;
View Full Code Here

Examples of org.apache.jdo.impl.enhancer.classfile.Insn.opcode()

        insn = appendEndProvideReplaceField(insn,
                                            JDO_PC_jdoProvideField_Name,
                                            JDO_PC_jdoProvideField_Sig);

        // end of method body
        affirm(insn.opcode() == opc_athrow || insn.opcode() == opc_return);
       
        affirm(0 <= sizeHolder.size && sizeHolder.size <= 2);
        //System.out.println("sizeHolder.size = " + sizeHolder.size);
        final int maxStack = (sizeHolder.size == 0
                              ? 3 : (sizeHolder.size == 1 ? 4 : 5));
View Full Code Here

Examples of org.apache.jdo.impl.enhancer.classfile.Insn.opcode()

        insn = appendEndProvideReplaceField(insn,
                                            JDO_PC_jdoProvideField_Name,
                                            JDO_PC_jdoProvideField_Sig);

        // end of method body
        affirm(insn.opcode() == opc_athrow || insn.opcode() == opc_return);
       
        affirm(0 <= sizeHolder.size && sizeHolder.size <= 2);
        //System.out.println("sizeHolder.size = " + sizeHolder.size);
        final int maxStack = (sizeHolder.size == 0
                              ? 3 : (sizeHolder.size == 1 ? 4 : 5));
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.