summaryrefslogtreecommitdiff
path: root/vaporize/library/SpillEverywhere.java
diff options
context:
space:
mode:
authorbd-912 <bdunahu@colostate.edu>2024-04-19 17:49:58 -0600
committerbd-912 <bdunahu@colostate.edu>2024-04-19 17:49:58 -0600
commite98ca14483fb531c41d51677cc7075a0b8e6bd55 (patch)
treeb35df61c0be08b8fd2f4e36814b3596b2fa77948 /vaporize/library/SpillEverywhere.java
parent2f59e052e5272bb2833c91c84b89486bd1b5f592 (diff)
Kettle function to replace method declaractions
Diffstat (limited to 'vaporize/library/SpillEverywhere.java')
-rw-r--r--vaporize/library/SpillEverywhere.java20
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;
}