Mercurial > hg > graal-jvmci-8
comparison graal/GraalCompiler/src/com/sun/c1x/ir/BlockBegin.java @ 2624:8e44074058af
remove explicit pointer from BlockEnd to BlockBegin
author | Lukas Stadler <lukas.stadler@jku.at> |
---|---|
date | Tue, 10 May 2011 14:29:40 +0200 |
parents | dd115f80acf8 |
children | 62ff4a70f07e |
comparison
equal
deleted
inserted
replaced
2621:dd115f80acf8 | 2624:8e44074058af |
---|---|
80 public void setEnd(BlockEnd end) { | 80 public void setEnd(BlockEnd end) { |
81 assert end != null; | 81 assert end != null; |
82 BlockEnd old = this.end(); | 82 BlockEnd old = this.end(); |
83 if (old != end) { | 83 if (old != end) { |
84 if (old != null) { | 84 if (old != null) { |
85 // disconnect this block from the old end | |
86 old.setBegin(null); | |
87 // disconnect this block from its current successors | 85 // disconnect this block from its current successors |
88 for (BlockBegin s : old.blockSuccessors()) { | 86 for (BlockBegin s : old.blockSuccessors()) { |
89 s.blockPredecessors().remove(this); | 87 s.blockPredecessors().remove(this); |
90 } | 88 } |
91 } | 89 } |
92 successors().set(super.successorCount() + SUCCESSOR_END, end); | 90 successors().set(super.successorCount() + SUCCESSOR_END, end); |
93 end.setBegin(this); | |
94 for (BlockBegin s : end.blockSuccessors()) { | 91 for (BlockBegin s : end.blockSuccessors()) { |
95 s.addPredecessor(this); | 92 s.addPredecessor(this); |
96 } | 93 } |
97 } | 94 } |
98 } | 95 } |