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

Method popN

chapter03/src/main/java/com/seaofnodes/simple/node/Node.java:192–199  ·  view source on GitHub ↗
(int n)

Source from the content-addressed store, hash-verified

190 Type type = _type = compute();
191
192 // Replace constant computations from non-constants with a constant node
193 if (!(this instanceof ConstantNode) && type.isConstant()) {
194 kill(); // Kill `this` because replacing with a Constant
195 return new ConstantNode(type).peephole();
196 }
197
198 // Future chapter: Global Value Numbering goes here
199
200 // Ask each node for a better replacement
201 Node n = idealize();
202 if( n != null ) return n;

Callers 2

killMethod · 0.95
popMethod · 0.45

Calls 3

delUseMethod · 0.95
killMethod · 0.95
removeLastMethod · 0.45

Tested by

no test coverage detected