Package org.allspice.bytecode

Examples of org.allspice.bytecode.ClassDef.addMethod()


        new Return(TypeCode.BOOLEAN),
        new Nop(one),
        new Const(true),
        new Return(TypeCode.BOOLEAN)
        ) ;
    return cd.addMethod(md)
  }
  public void test1() throws Exception {
   
    ClassDef cd = defadd("double",1,3) ;
    Object obj = makeObject(cd) ;
View Full Code Here


        new Load(x),
        new Load(y),
        new ShiftRight(TypeCode.getType(type)),
        new Return(TypeCode.getType(ret))
        ) ;
    return cd.addMethod(md)
  }
  public void test2() throws Exception {
   
    ClassDef cd = defadd("long","long",1,3) ;
    Object obj = makeObject(cd) ;
View Full Code Here

        new Return(TypeCode.BOOLEAN),
        new Nop(one),
        new Const(true),
        new Return(TypeCode.BOOLEAN)
        ) ;
    return cd.addMethod(md)
  }
  public void test1() throws Exception {
   
    ClassDef cd = defadd("double",1) ;
    Object obj = makeObject(cd) ;
View Full Code Here

    md = md.addInstructions(
        new Increment(x,inc),
        new Load(x),
        new Return(TypeCode.getType(type))
        ) ;
    return cd.addMethod(md)
  }
  public void test1() throws Exception {
   
    ClassDef cd = defadd("int",3) ;
    Object obj = makeObject(cd) ;
View Full Code Here

          new Load(x),
          new Load(y),
          new Pop(TypeCode.INT),
          new Return(TypeCode.INT)
          ) ;
      cd = cd.addMethod(md) ;
    }
    return cd ;
  }
  public ClassDef defadd02() {
    ClassDef cd = makeClassDef() ;
View Full Code Here

          new Load(x),
          new Load(y),
          new Pop(TypeCode.LONG),
          new Return(TypeCode.LONG)
          ) ;
      cd = cd.addMethod(md) ;
    }
    return cd ;
  }
  public void test1() throws Exception {
   
View Full Code Here

        new Return(TypeCode.BOOLEAN),
        new Nop(one),
        new Const(true),
        new Return(TypeCode.BOOLEAN)
        ) ;
    return cd.addMethod(md)
  }
  public void test1() throws Exception {
   
    ClassDef cd = defadd("double",1,3) ;
    Object obj = makeObject(cd) ;
View Full Code Here

      md = md.addInstructions(
          new Load(x),
          new InstanceOf(new TypeName(type)),
          new Return(TypeCode.BOOLEAN)
          ) ;
      cd = cd.addMethod(md) ;
    }
    return cd ;
  }
  public void test1() throws Exception {
   
View Full Code Here

        new Nop(one),new Const(1.0),new Return(TypeCode.DOUBLE),
        new Nop(two),new Const(2.0),new Return(TypeCode.DOUBLE),
        new Nop(three),new Const(3.0),new Return(TypeCode.DOUBLE),
        new Nop(others),new Const(0.0),new Return(TypeCode.DOUBLE)
        ) ;
    return cd.addMethod(md)
  }
  public void test1() throws Exception {
   
    ClassDef cd = defadd() ;
    Object obj = makeObject(cd) ;
View Full Code Here

    md = md.addInstructions(
        new Load(x),
        new Negate(TypeCode.getType(type)),
        new Return(TypeCode.getType(ret))
        ) ;
    return cd.addMethod(md)
  }
  public void test1() throws Exception {
   
    ClassDef cd = defadd("double","double") ;
    Object obj = makeObject(cd) ;
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.