Example #1
0
 public Instruction createInstructionGetfield(Element inst) throws IllegalXMLVMException {
   String classType = inst.getAttributeValue("class-type");
   String field = inst.getAttributeValue("field");
   String type = inst.getAttributeValue("type");
   Type t = parseTypeString(type);
   return _factory.createGetField(classType, field, t);
 }
Example #2
0
 private Instruction createInvokeInstruction(Element inst, short kind)
     throws IllegalXMLVMException {
   String classType = inst.getAttributeValue("class-type");
   String methodName = inst.getAttributeValue("method");
   Element signature = inst.getChild("signature", nsXMLVM);
   Type retType = collectReturnType(signature);
   Type[] argTypes = collectArgumentTypes(signature);
   return _factory.createInvoke(classType, methodName, retType, argTypes, kind);
 }
Example #3
0
 public Instruction createInstructionNew(Element inst) {
   String t = inst.getAttributeValue("type");
   return _factory.createNew(t);
 }
Example #4
0
 public Instruction createInstructionGetstatic(Element inst) throws IllegalXMLVMException {
   String classType = inst.getAttributeValue("class-type");
   String field = inst.getAttributeValue("field");
   Type type = parseTypeString(inst.getAttributeValue("type"));
   return _factory.createFieldAccess(classType, field, type, Constants.GETSTATIC);
 }
Example #5
0
 public Instruction createInstructionLreturn(Element inst) {
   return _factory.createReturn(Type.LONG);
 }
Example #6
0
 public Instruction createInstructionFreturn(Element inst) {
   return _factory.createReturn(Type.FLOAT);
 }
Example #7
0
 public Instruction createInstructionDreturn(Element inst) {
   return _factory.createReturn(Type.DOUBLE);
 }
Example #8
0
 public Instruction createInstructionIreturn(Element inst) {
   return _factory.createReturn(Type.INT);
 }
Example #9
0
 public Instruction createInstructionReturn(Element inst) {
   return _factory.createReturn(Type.VOID);
 }
Example #10
0
 public Instruction createInstructionAload(Element inst) throws IllegalXMLVMException {
   String t = inst.getAttributeValue("type");
   Type type = parseTypeString(t);
   int idx = Integer.parseInt(inst.getAttributeValue("index"));
   return _factory.createLoad(type, idx);
 }