2 import IR.TypeDescriptor;
4 public class FlatLiteralNode extends FlatNode {
9 public FlatLiteralNode(TypeDescriptor type, Object o, TempDescriptor dst) {
15 public FlatNode clone(TempMap t) {
16 return new FlatLiteralNode(type, value, t.tempMap(dst));
18 public void rewriteUse(TempMap t) {
20 public void rewriteDst(TempMap t) {
23 public TypeDescriptor getType() {
27 public TempDescriptor getDst() {
31 public Object getValue() {
35 public String toString() {
36 String str = "FlatLiteralNode_"+dst;
40 str += "="+escapeString(value.toString());
43 protected static String escapeString(String st) {
45 for(int i=0; i<st.length(); i++) {
63 return FKind.FlatLiteralNode;
66 public TempDescriptor [] writesTemps() {
67 return new TempDescriptor[] {dst};