2 import IR.TypeDescriptor;
4 public class FlatCastNode extends FlatNode {
9 public FlatCastNode(TypeDescriptor type, TempDescriptor src, TempDescriptor dst) {
15 public FlatNode clone(TempMap t) {
16 return new FlatCastNode(type, t.tempMap(src), t.tempMap(dst));
18 public void rewriteUse(TempMap t) {
21 public void rewriteDef(TempMap t) {
25 public String toString() {
26 return "FlatCastNode_"+dst.toString()+"=("+type.toString()+")"+src.toString();
30 return FKind.FlatCastNode;
33 public TypeDescriptor getType() {
37 public TempDescriptor getSrc() {
41 public TempDescriptor getDst() {
45 public TempDescriptor [] writesTemps() {
46 return new TempDescriptor[] {dst};
49 public TempDescriptor [] readsTemps() {
50 return new TempDescriptor[] {src};