diff options
Diffstat (limited to 'vaporize/library/SpillEverywhere.java')
-rw-r--r-- | vaporize/library/SpillEverywhere.java | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/vaporize/library/SpillEverywhere.java b/vaporize/library/SpillEverywhere.java index b910270..a1b0968 100644 --- a/vaporize/library/SpillEverywhere.java +++ b/vaporize/library/SpillEverywhere.java @@ -33,14 +33,16 @@ public class SpillEverywhere extends VInstr.VisitorPR<String, String, RuntimeExc for (VInstr s : f.body) { // s.accept("", this); } - PrintFilter.print(this.kettle.indexOriginal(f), true); + PrintFilter.print(this.kettle.get(f), true); + this.kettle.replaceFunctionDeclare(f, 0, 0, 0); } + PrintFilter.print(kettle.dump(), true); } public String visit(String p, VMemRead n) throws RuntimeException { PrintFilter.print(String.format("%s (%s:%s)", n.getClass().getSimpleName(), - this.kettle.indexOriginal(n), + this.kettle.get(n), n.sourcePos.toString()), true); return null; } @@ -48,7 +50,7 @@ public class SpillEverywhere extends VInstr.VisitorPR<String, String, RuntimeExc public String visit(String p, VMemWrite n) throws RuntimeException { PrintFilter.print(String.format("%s (%s:%s)", n.getClass().getSimpleName(), - this.kettle.indexOriginal(n), + this.kettle.get(n), n.sourcePos.toString()), true); return null; } @@ -56,7 +58,7 @@ public class SpillEverywhere extends VInstr.VisitorPR<String, String, RuntimeExc public String visit(String p, VAssign n) throws RuntimeException { PrintFilter.print(String.format("%s (%s:%s)", n.getClass().getSimpleName(), - this.kettle.indexOriginal(n), + this.kettle.get(n), n.sourcePos.toString()), true); return null; } @@ -64,7 +66,7 @@ public class SpillEverywhere extends VInstr.VisitorPR<String, String, RuntimeExc public String visit(String p, VBranch n) throws RuntimeException { PrintFilter.print(String.format("%s (%s:%s)", n.getClass().getSimpleName(), - this.kettle.indexOriginal(n), + this.kettle.get(n), n.sourcePos.toString()), true); return null; } @@ -72,7 +74,7 @@ public class SpillEverywhere extends VInstr.VisitorPR<String, String, RuntimeExc public String visit(String p, VGoto n) throws RuntimeException { PrintFilter.print(String.format("%s (%s:%s)", n.getClass().getSimpleName(), - this.kettle.indexOriginal(n), + this.kettle.get(n), n.sourcePos.toString()), true); return null; } @@ -80,7 +82,7 @@ public class SpillEverywhere extends VInstr.VisitorPR<String, String, RuntimeExc public String visit(String p, VCall n) throws RuntimeException { PrintFilter.print(String.format("%s (%s:%s)", n.getClass().getSimpleName(), - this.kettle.indexOriginal(n), + this.kettle.get(n), n.sourcePos.toString()), true); return null; } @@ -88,7 +90,7 @@ public class SpillEverywhere extends VInstr.VisitorPR<String, String, RuntimeExc public String visit(String p, VBuiltIn n) throws RuntimeException { PrintFilter.print(String.format("%s (%s:%s)", n.op.name, - this.kettle.indexOriginal(n), + this.kettle.get(n), n.sourcePos.toString()), true); return null; } @@ -96,7 +98,7 @@ public class SpillEverywhere extends VInstr.VisitorPR<String, String, RuntimeExc public String visit(String p, VReturn n) throws RuntimeException { PrintFilter.print(String.format("%s (%s:%s)", n.getClass().getSimpleName(), - this.kettle.indexOriginal(n), + this.kettle.get(n), n.sourcePos.toString()), true); return null; } |