diff --git a/src/de/dhbwstuttgart/syntaxtree/statement/StringLiteral.java b/src/de/dhbwstuttgart/syntaxtree/statement/StringLiteral.java index 25b1e782..6b270490 100755 --- a/src/de/dhbwstuttgart/syntaxtree/statement/StringLiteral.java +++ b/src/de/dhbwstuttgart/syntaxtree/statement/StringLiteral.java @@ -3,6 +3,7 @@ package de.dhbwstuttgart.syntaxtree.statement; import de.dhbwstuttgart.typeinference.Menge; + // ino.end // ino.module.StringLiteral.8653.import import java.util.Hashtable; @@ -10,6 +11,7 @@ import java.util.Hashtable; import org.apache.bcel.generic.ClassGen; import org.apache.bcel.generic.InstructionFactory; import org.apache.bcel.generic.InstructionList; +import org.apache.bcel.generic.LDC; import de.dhbwstuttgart.typeinference.Menge; import de.dhbwstuttgart.logger.Logger; @@ -106,18 +108,19 @@ public class StringLiteral extends Literal return "\""+this.string+"\""; } + public static int counterString = 0; @Override public InstructionList genByteCode(ClassGen cg) { InstructionFactory _factory = new InstructionFactory(cg, cg.getConstantPool()); InstructionList il = new InstructionList(); - - - - il.append(_factory.ASTORE_1, _factory.createNew(string)); - + counterString++; + //il.append(_factory.ASTORE_1, _factory.createNew(string)); + il.append(new LDC(counterString)); return il; + } + }