forked from JavaTX/JavaCompilerCore
GenCode: Reupload StringLiteral aufgrund von Merge-Problemen
This commit is contained in:
parent
b4d9cfbe0c
commit
5fbb4f0d61
@ -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;
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user