@Override public void virtualize(VirtualizerTool tool) { ValueNode alias = tool.getAlias(object()); if (alias instanceof VirtualObjectNode) { tool.replaceWithVirtual((VirtualObjectNode) alias); } }
@Override public void virtualize(VirtualizerTool tool) { ValueNode alias = tool.getAlias(object()); if (alias instanceof VirtualObjectNode) { VirtualInstanceNode virtual = (VirtualInstanceNode) alias; int fieldIndex = virtual.fieldIndex(field()); if (fieldIndex != -1) { tool.setVirtualEntry(virtual, fieldIndex, value(), false); tool.delete(); } } }