mirror of
https://gitlab.com/camelot/kickc.git
synced 2024-09-08 17:54:40 +00:00
made map linked for predictability
This commit is contained in:
parent
81ba13c9c3
commit
8e59603418
@ -1,6 +1,7 @@
|
||||
package dk.camelot64.kickc.icl;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.LinkedHashMap;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
@ -16,7 +17,7 @@ public class ControlFlowGraphCopyVisitor extends ControlFlowGraphBaseVisitor<Obj
|
||||
/**
|
||||
* The copied blocks.
|
||||
*/
|
||||
private HashMap<Symbol, ControlFlowBlock> copyBlockMap;
|
||||
private LinkedHashMap<Symbol, ControlFlowBlock> copyBlockMap;
|
||||
|
||||
/**
|
||||
* The current block being copied.
|
||||
@ -32,7 +33,7 @@ public class ControlFlowGraphCopyVisitor extends ControlFlowGraphBaseVisitor<Obj
|
||||
public ControlFlowGraph visitGraph(ControlFlowGraph origGraph) {
|
||||
this.origGraph = origGraph;
|
||||
// Copy all blocks
|
||||
this.copyBlockMap = new HashMap<>();
|
||||
this.copyBlockMap = new LinkedHashMap<>();
|
||||
for (ControlFlowBlock origBlock : origGraph.getAllBlocks()) {
|
||||
ControlFlowBlock copyBlock = visitBlock(origBlock);
|
||||
if (copyBlock != null) {
|
||||
|
Loading…
Reference in New Issue
Block a user