MCPcopy Create free account
hub / github.com/SeaOfNodes/Simple / addDef

Method addDef

chapter18/src/main/java/com/seaofnodes/simple/node/Node.java:204–212  ·  view source on GitHub ↗

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)

Source from the content-addressed store, hash-verified

202 * @return new_def for flow coding
203 */
204 public Node addDef(Node new_def) {
205 unlock();
206 // Add use->def edge
207 _inputs.add(new_def);
208 // If new def is not null, add the corresponding def->use edge
209 if( new_def != null )
210 new_def.addUse(this);
211 return new_def;
212 }
213
214 // Breaks the edge invariants, used temporarily
215 protected <N extends Node> void addUse(N n) { _outputs.add(n); }

Callers 14

forceExitMethod · 0.95
anti_depMethod · 0.45
parseFunctionBodyMethod · 0.45
parseStructMethod · 0.45
functionCallMethod · 0.45
linkMethod · 0.45
mergeMethod · 0.45
aliasMethod · 0.45
PhiNodeMethod · 0.45
defineMethod · 0.45
dupMethod · 0.45
balanceIfMethod · 0.45

Calls 3

unlockMethod · 0.95
addMethod · 0.45
addUseMethod · 0.45

Tested by

no test coverage detected