Package objot.bytecode

Examples of objot.bytecode.Instruction.insU2()


    p.setNameCi(cons.getCprocName(createCi));
    p.setDescCi(cons.getCprocDesc(createCi));
    Instruction s = new Instruction(cons, 250);
    s.insU2(NEW, y.head.getClassCi());
    s.ins0(DUP);
    s.insU2(INVOKESPECIAL, cons.addCproc(y.head.getClassCi(), //
      cons.addNameDesc(y.getProcs().getProc(0).getNameCi(), //
        y.getProcs().getProc(0).getDescCi())));
    s.ins0(DUP);
    s.ins0(DUP); // new, new
    s.ins0(ALOAD1);
View Full Code Here


    s.ins0(DUP); // new, new
    s.ins0(ALOAD1);
    s.ins0(DUP);
    int j = s.insJump(IFNOTNULL);
    s.ins0(POP);
    s.insU2(GETSTATIC, cons.addField(Container.F_null));
    s.jumpHere(j);
    s.insU2(PUTFIELD, parentCi);
    if ( !lazy)
      for (int i = 1; i < csn; i++)
        if (cs[i].mode == Single.class && cs[i].cla != Container.class)
View Full Code Here

    s.ins0(DUP);
    int j = s.insJump(IFNOTNULL);
    s.ins0(POP);
    s.insU2(GETSTATIC, cons.addField(Container.F_null));
    s.jumpHere(j);
    s.insU2(PUTFIELD, parentCi);
    if ( !lazy)
      for (int i = 1; i < csn; i++)
        if (cs[i].mode == Single.class && cs[i].cla != Container.class)
        {
          s.ins0(DUP);
View Full Code Here

      for (int i = 1; i < csn; i++)
        if (cs[i].mode == Single.class && cs[i].cla != Container.class)
        {
          s.ins0(DUP);
          s.insS2(SIPUSH, i);
          s.insU2(INVOKEVIRTUAL, get0Ci);
          s.ins0(POP);
        }

    s.ins0(ARETURN);
    p.getCode().setIns(s, false);
View Full Code Here

    p.setNameCi(cons.getCprocName(indexCi));
    p.setDescCi(cons.getCprocDesc(indexCi));
    Instruction s = new Instruction(cons, 500);
    s.ins0(ALOAD1); // class
    s.ins0(DUP); // class
    s.insU2(INVOKEVIRTUAL, cons.addProc(M_hashCode)); // hash code
    s.insS1(BIPUSH, 31);
    s.ins0(IREM);
    long sw = s.insSwitchTable(0, 30);
    for (int i = 0; i < 31; i++)
    {
View Full Code Here

    p.setModifier(Mod2.PROTECTED | Mod2.FINAL);
    p.setNameCi(p.cons.addUtf(NAME_encodeRefs));
    p.setDescCi(p.cons.addUtf(DESC_encodeRefs));
    Instruction s = new Instruction(p.cons, 250);
    s.ins0(ALOAD2);
    s.insU2(CHECKCAST, classCi);
    s.insU1(ASTORE, 4); // object
    s.ins0(ALOAD0);
    s.insU2(GETFIELD, encsCi); // properties
    int refsCi = p.cons.addProc(Encoder.M_refs);
    Property e;
View Full Code Here

    Instruction s = new Instruction(p.cons, 250);
    s.ins0(ALOAD2);
    s.insU2(CHECKCAST, classCi);
    s.insU1(ASTORE, 4); // object
    s.ins0(ALOAD0);
    s.insU2(GETFIELD, encsCi); // properties
    int refsCi = p.cons.addProc(Encoder.M_refs);
    Property e;
    for (int i = 0; i < es.length; i++)
      if ( !(e = es[i]).cla.isPrimitive() && !Number.class.isAssignableFrom(e.cla)
        && e.cla != Boolean.class)
View Full Code Here

        s.ins0(DUP);
        s.insS2(SIPUSH, i);
        s.ins0(AALOAD); // property
        s.ins0(ALOAD2);
        s.ins0(ALOAD3);
        s.insU2(INVOKEVIRTUAL, ableCi);
        int if0 = s.insJump(IFIE0);
        s.ins0(ALOAD1);
        s.insU1(ALOAD, 4); // object
        if (e.field != null)
          s.insU2(GETFIELD, p.cons.addField(e.field));
View Full Code Here

        s.insU2(INVOKEVIRTUAL, ableCi);
        int if0 = s.insJump(IFIE0);
        s.ins0(ALOAD1);
        s.insU1(ALOAD, 4); // object
        if (e.field != null)
          s.insU2(GETFIELD, p.cons.addField(e.field));
        else
          s.insU2(INVOKEVIRTUAL, p.cons.addProc(e.method));
        s.insU2(INVOKEVIRTUAL, refsCi);
        s.jumpHere(if0);
      }
View Full Code Here

        s.ins0(ALOAD1);
        s.insU1(ALOAD, 4); // object
        if (e.field != null)
          s.insU2(GETFIELD, p.cons.addField(e.field));
        else
          s.insU2(INVOKEVIRTUAL, p.cons.addProc(e.method));
        s.insU2(INVOKEVIRTUAL, refsCi);
        s.jumpHere(if0);
      }
    s.ins0(RETURN);
    p.getCode().setIns(s, false);
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.