summaryrefslogtreecommitdiff
path: root/vaporize/library/CFGSimp.java
diff options
context:
space:
mode:
authorbd-912 <bdunahu@colostate.edu>2024-04-19 23:37:54 -0600
committerbd-912 <bdunahu@colostate.edu>2024-04-19 23:37:54 -0600
commit18da70342efb2114042c8ad5fae089cef6e69862 (patch)
treea0bf7d5a2e616517982442fe8e446df4df52d9a1 /vaporize/library/CFGSimp.java
parent8625d3a2708e6332083a1b780b4f016beacf67d3 (diff)
CFG captures VGoto path
Diffstat (limited to 'vaporize/library/CFGSimp.java')
-rw-r--r--vaporize/library/CFGSimp.java7
1 files changed, 5 insertions, 2 deletions
diff --git a/vaporize/library/CFGSimp.java b/vaporize/library/CFGSimp.java
index a759afc..9f2556d 100644
--- a/vaporize/library/CFGSimp.java
+++ b/vaporize/library/CFGSimp.java
@@ -113,7 +113,8 @@ public class CFGSimp extends VInstr.VisitorPR<ControlFlowGraph, String, RuntimeE
///////////////////////////////////////////////////////////////
CFGNode curr = cfg.getNode(n);
cfg.addEdge(this.curr, cfg.getNode(n));
- cfg.addEdge(this.curr, cfg.getNode(new Integer(this.kettle.findLabelIndex(n))));
+ cfg.addEdge(this.curr, cfg.getNode(new Integer(this.kettle
+ .findLabelIndex(n.target.toString()))));
this.curr = curr;
///////////////////////////////////////////////////////////////
@@ -131,7 +132,9 @@ public class CFGSimp extends VInstr.VisitorPR<ControlFlowGraph, String, RuntimeE
n.sourcePos.toString()));
///////////////////////////////////////////////////////////////
CFGNode curr = cfg.getNode(n);
- cfg.addEdge(this.curr, cfg.getNode(n));
+ cfg.addEdge(this.curr, cfg.getNode(new Integer(this.kettle
+ .findLabelIndex(n.target.toString()))));
+
this.curr = curr;
///////////////////////////////////////////////////////////////
MinimalLogger.info(String.format("<-%s (\"%s\":%s)",