コード例 #1
0
 @Override
 public void addNode(ValueNode node) {
   if (node instanceof FloatingNode) {
     effects.addFloatingNode(node, "VirtualizerTool");
   } else {
     effects.addFixedNodeBefore((FixedWithNextNode) node, position);
   }
 }
コード例 #2
0
 @Override
 public void replaceWithVirtual(VirtualObjectNode virtual) {
   state.addAndMarkAlias(virtual, current, usages);
   if (current instanceof FixedWithNextNode) {
     effects.deleteFixedNode((FixedWithNextNode) current);
   }
   deleted = true;
 }
コード例 #3
0
 @Override
 public void createVirtualObject(
     VirtualObjectNode virtualObject, ValueNode[] entryState, int[] locks) {
   VirtualUtil.trace("{{%s}} ", current);
   if (virtualObject.isAlive()) {
     state.addAndMarkAlias(virtualObject, virtualObject, usages);
   } else {
     effects.addFloatingNode(virtualObject, "newVirtualObject");
   }
   for (int i = 0; i < entryState.length; i++) {
     entryState[i] = state.getScalarAlias(entryState[i]);
   }
   state.addObject(
       virtualObject, new ObjectState(virtualObject, entryState, EscapeState.Virtual, locks));
   state.addAndMarkAlias(virtualObject, virtualObject, usages);
   PartialEscapeClosure.METRIC_ALLOCATION_REMOVED.increment();
 }
コード例 #4
0
 @Override
 public void replaceFirstInput(Node oldInput, Node replacement) {
   effects.replaceFirstInput(current, oldInput, replacement);
 }
コード例 #5
0
 @Override
 public void delete() {
   effects.deleteFixedNode((FixedWithNextNode) current);
   deleted = true;
 }
コード例 #6
0
 @Override
 public void replaceWithValue(ValueNode replacement) {
   effects.replaceAtUsages(current, state.getScalarAlias(replacement));
   state.addScalarAlias(current, replacement);
   deleted = true;
 }