Exemple #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);
 }
Exemple #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);
 }
Exemple #3
0
 public Instruction createInstructionNew(Element inst) {
   String t = inst.getAttributeValue("type");
   return _factory.createNew(t);
 }
Exemple #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);
 }
Exemple #5
0
 public Instruction createInstructionLreturn(Element inst) {
   return _factory.createReturn(Type.LONG);
 }
Exemple #6
0
 public Instruction createInstructionFreturn(Element inst) {
   return _factory.createReturn(Type.FLOAT);
 }
Exemple #7
0
 public Instruction createInstructionDreturn(Element inst) {
   return _factory.createReturn(Type.DOUBLE);
 }
Exemple #8
0
 public Instruction createInstructionIreturn(Element inst) {
   return _factory.createReturn(Type.INT);
 }
Exemple #9
0
 public Instruction createInstructionReturn(Element inst) {
   return _factory.createReturn(Type.VOID);
 }
Exemple #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);
 }