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
|
||||
// istore_1
|
||||
InstructionFactory _factory = new InstructionFactory(cg, cg.getConstantPool());
|
||||
InstructionList il = this.expr2.genByteCode(cg);//expr2 rechte expr
|
||||
il.append(_factory.createConstant(expr2.toString()));
|
||||
InstructionList il = expr2.genByteCode(cg);//expr2 rechte expr
|
||||
il.append(_factory.createConstant(expr2));
|
||||
il.append(_factory.ISTORE_1);
|
||||
return il;
|
||||
}
|
||||
|
@ -138,7 +138,7 @@ public class Return extends Statement
|
||||
|
||||
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));
|
||||
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
class StringLitTest{
|
||||
|
||||
|
||||
Object method() { s = ""; }
|
||||
void method() { s = ""; }
|
||||
|
||||
|
||||
}
|
Loading…
Reference in New Issue
Block a user