Add a new def to an existing Node. Keep the edges correct by adding the corresponding def->use edge. @param new_def the new definition, appended to the end of existing definitions @return new_def for flow coding
(Node new_def)
| 159 | _type=null; // Flag as dead |
| 160 | assert isDead(); // Really dead now |
| 161 | } |
| 162 | |
| 163 | // Mostly used for asserts and printing. |
| 164 | public boolean isDead() { return isUnused() && nIns()==0 && _type==null; } |
| 165 | |
| 166 | // Shortcuts to stop DCE mid-parse |
| 167 | // Add bogus null use to keep node alive |
| 168 | public <N extends Node> N keep() { addUse(null); return (N)this; } |
| 169 | // Remove bogus null. |
| 170 | public <N extends Node> N unkeep() { delUse(null); return (N)this; } |
| 171 | // ------------------------------------------------------------------------ |