Mercurial > hg > truffle
comparison graal/com.oracle.max.graal.graph/src/com/oracle/max/graal/graph/Node.java @ 2960:49a8b14e9d24
Tentative change that adds successor tags.
author | Thomas Wuerthinger <thomas@wuerthinger.net> |
---|---|
date | Tue, 14 Jun 2011 16:41:27 +0200 |
parents | 9b8f30608e62 |
children | 0966a5a904ad |
comparison
equal
deleted
inserted
replaced
2959:84a7b7069ffb | 2960:49a8b14e9d24 |
---|---|
38 final NodeArray inputs; | 38 final NodeArray inputs; |
39 final NodeArray successors; | 39 final NodeArray successors; |
40 final ArrayList<Node> usages; | 40 final ArrayList<Node> usages; |
41 final ArrayList<Node> predecessors; | 41 final ArrayList<Node> predecessors; |
42 final ArrayList<Integer> predecessorsIndex; | 42 final ArrayList<Integer> predecessorsIndex; |
43 final int[] successorTags; | |
43 | 44 |
44 public Node(int inputCount, int successorCount, Graph graph) { | 45 public Node(int inputCount, int successorCount, Graph graph) { |
45 assert graph != null : "cannot create a node for a null graph"; | 46 assert graph != null : "cannot create a node for a null graph"; |
46 this.graph = graph; | 47 this.graph = graph; |
47 this.id = graph.register(this); | 48 this.id = graph.register(this); |
48 this.inputs = new NodeArray(this, inputCount); | 49 this.inputs = new NodeArray(this, inputCount); |
49 this.successors = new NodeArray(this, successorCount); | 50 this.successors = new NodeArray(this, successorCount); |
51 this.successorTags = new int[successorCount]; | |
50 this.predecessors = new ArrayList<Node>(); | 52 this.predecessors = new ArrayList<Node>(); |
51 this.usages = new ArrayList<Node>(); | 53 this.usages = new ArrayList<Node>(); |
52 this.predecessorsIndex = new ArrayList<Integer>(); | 54 this.predecessorsIndex = new ArrayList<Integer>(); |
53 } | 55 } |
54 | 56 |
68 return inputs; | 70 return inputs; |
69 } | 71 } |
70 | 72 |
71 public NodeArray successors() { | 73 public NodeArray successors() { |
72 return successors; | 74 return successors; |
75 } | |
76 | |
77 public int[] successorTags() { | |
78 return successorTags; | |
73 } | 79 } |
74 | 80 |
75 public int id() { | 81 public int id() { |
76 return id; | 82 return id; |
77 } | 83 } |