summaryrefslogtreecommitdiff
path: root/vaporize/library/CFGSimp.java
diff options
context:
space:
mode:
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)",