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;
|
import de.dhbwstuttgart.typeinference.Menge;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// ino.end
|
// ino.end
|
||||||
// ino.module.StringLiteral.8653.import
|
// ino.module.StringLiteral.8653.import
|
||||||
import java.util.Hashtable;
|
import java.util.Hashtable;
|
||||||
@ -10,6 +11,7 @@ import java.util.Hashtable;
|
|||||||
import org.apache.bcel.generic.ClassGen;
|
import org.apache.bcel.generic.ClassGen;
|
||||||
import org.apache.bcel.generic.InstructionFactory;
|
import org.apache.bcel.generic.InstructionFactory;
|
||||||
import org.apache.bcel.generic.InstructionList;
|
import org.apache.bcel.generic.InstructionList;
|
||||||
|
import org.apache.bcel.generic.LDC;
|
||||||
|
|
||||||
import de.dhbwstuttgart.typeinference.Menge;
|
import de.dhbwstuttgart.typeinference.Menge;
|
||||||
import de.dhbwstuttgart.logger.Logger;
|
import de.dhbwstuttgart.logger.Logger;
|
||||||
@ -106,19 +108,20 @@ public class StringLiteral extends Literal
|
|||||||
return "\""+this.string+"\"";
|
return "\""+this.string+"\"";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static int counterString = 0;
|
||||||
@Override
|
@Override
|
||||||
public InstructionList genByteCode(ClassGen cg) {
|
public InstructionList genByteCode(ClassGen cg) {
|
||||||
InstructionFactory _factory = new InstructionFactory(cg, cg.getConstantPool());
|
InstructionFactory _factory = new InstructionFactory(cg, cg.getConstantPool());
|
||||||
InstructionList il = new InstructionList();
|
InstructionList il = new InstructionList();
|
||||||
|
counterString++;
|
||||||
|
//il.append(_factory.ASTORE_1, _factory.createNew(string));
|
||||||
|
il.append(new LDC(counterString));
|
||||||
il.append(_factory.ASTORE_1, _factory.createNew(string));
|
|
||||||
|
|
||||||
return il;
|
return il;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
// ino.end
|
// ino.end
|
||||||
|
Loading…
x
Reference in New Issue
Block a user