Merge branch 'bytecode' of

ssh://seminar@gohorb.ba-horb.de/bahome/projekt/git/JavaCompilerCore into
bytecode
This commit is contained in:
Fikus, Evelyn (WWI2012D) 2015-06-22 16:51:36 +02:00
commit a901dd6b38
3 changed files with 4 additions and 4 deletions

View File

@ -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;
}

View File

@ -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));

View File

@ -1,7 +1,7 @@
class StringLitTest{
Object method() { s = ""; }
void method() { s = ""; }
}