Merge branch 'bytecode' of
ssh://seminar@gohorb.ba-horb.de/bahome/projekt/git/JavaCompilerCore into bytecode
This commit is contained in:
commit
a901dd6b38
@ -179,8 +179,8 @@ public class Assign extends Expr
|
|||||||
//Bytecode: bipush 20
|
//Bytecode: bipush 20
|
||||||
// istore_1
|
// istore_1
|
||||||
InstructionFactory _factory = new InstructionFactory(cg, cg.getConstantPool());
|
InstructionFactory _factory = new InstructionFactory(cg, cg.getConstantPool());
|
||||||
InstructionList il = this.expr2.genByteCode(cg);//expr2 rechte expr
|
InstructionList il = expr2.genByteCode(cg);//expr2 rechte expr
|
||||||
il.append(_factory.createConstant(expr2.toString()));
|
il.append(_factory.createConstant(expr2));
|
||||||
il.append(_factory.ISTORE_1);
|
il.append(_factory.ISTORE_1);
|
||||||
return il;
|
return il;
|
||||||
}
|
}
|
||||||
|
@ -138,7 +138,7 @@ public class Return extends Statement
|
|||||||
|
|
||||||
InstructionFactory _factory = new InstructionFactory(cg, cg.getConstantPool());
|
InstructionFactory _factory = new InstructionFactory(cg, cg.getConstantPool());
|
||||||
|
|
||||||
//Stimmt das VOID hier eigentlich?
|
//Stimmt das VOID hier eigentlich? --> Wie wäre es mit getReturnType o.ä.? + evtl. von Type zu bcelType casten?
|
||||||
il.append(_factory.createReturn(org.apache.bcel.generic.Type.VOID));
|
il.append(_factory.createReturn(org.apache.bcel.generic.Type.VOID));
|
||||||
|
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
class StringLitTest{
|
class StringLitTest{
|
||||||
|
|
||||||
|
|
||||||
Object method() { s = ""; }
|
void method() { s = ""; }
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user