Package org.allspice.bytecode

Examples of org.allspice.bytecode.ArrLValue


    Var x = new Var(1,new TypeName("int[]")) ;
    MethodDef md = new MethodDef(TypeName.VOID,"meth",x) ;
    md = md.addInstructions(
        new Load(x),
        new Const(0),
        new Increment(new ArrLValue(TypeName.INT),inc),
        new Return(TypeCode.VOID)
        ) ;
    return cd.addMethod(md)
  }
View Full Code Here


      MethodDef md = new MethodDef(new TypeName(type),"getFoo",x,y) ;
      md = md.setStatic(true) ;
      md = md.addInstructions(
          new Load(x),
          new Load(y),
          new Load(new ArrLValue(new TypeName(type))),
          new Return(TypeCode.getType(type))
          ) ;
      cd = cd.addMethod(md) ;
    }
    return cd ;
View Full Code Here

  public static LValue createArrayLValue(EvaluationContext context, InstList l,
      final Expr arr, final Expr index) throws CompilerException {
    context.compile(null,arr, l) ;
    createConvert(context, index, TypeName.INT,l) ;
    StubResolver t1 = getArrVarType(context,arr) ;
    return new ArrLValue(t1.getTypeName()) ;
  }
View Full Code Here

      int i = 0 ;
      for(Expr arrval: arrinit) {
        l.add(new Dup(TypeCode.VOID,TypeCode.getType(vtype))) ;
        l.add(new Const(Integer.valueOf(i))) ;
        context.compile(baseType, arrval, l) ;
        l.add(new Store(new ArrLValue(baseType))) ;
        i++ ;
      }
    }
View Full Code Here

      md = md.setStatic(true) ;
      md = md.addInstructions(
          new Load(x),
          new Load(y),
          new Load(z),
          new Store(new ArrLValue(new TypeName(type))),
          new Return(TypeCode.VOID)
          ) ;
      cd = cd.addMethod(md) ;
    }
    return cd ;
View Full Code Here

TOP

Related Classes of org.allspice.bytecode.ArrLValue

Copyright © 2018 www.massapicom. 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.