# HG changeset patch # User Lukas Stadler # Date 1427978011 -7200 # Node ID 5b2fd4cd7b8f2b8912e9c4dab1e020f660606860 # Parent 96acaee063024d949e2e7ab770927a19b86389f7 LoadFieldNode and StoreFieldNode don't need to be VirtualizableRoots diff -r 96acaee06302 -r 5b2fd4cd7b8f graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/java/LoadFieldNode.java --- a/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/java/LoadFieldNode.java Fri Apr 03 10:41:57 2015 +0200 +++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/java/LoadFieldNode.java Thu Apr 02 14:33:31 2015 +0200 @@ -38,7 +38,7 @@ * The {@code LoadFieldNode} represents a read of a static or instance field. */ @NodeInfo(nameTemplate = "#{p#field/s}") -public final class LoadFieldNode extends AccessFieldNode implements Canonicalizable.Unary, VirtualizableRoot, UncheckedInterfaceProvider { +public final class LoadFieldNode extends AccessFieldNode implements Canonicalizable.Unary, Virtualizable, UncheckedInterfaceProvider { public static final NodeClass TYPE = NodeClass.create(LoadFieldNode.class); diff -r 96acaee06302 -r 5b2fd4cd7b8f graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/java/StoreFieldNode.java --- a/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/java/StoreFieldNode.java Fri Apr 03 10:41:57 2015 +0200 +++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/java/StoreFieldNode.java Thu Apr 02 14:33:31 2015 +0200 @@ -34,7 +34,7 @@ * The {@code StoreFieldNode} represents a write to a static or instance field. */ @NodeInfo(nameTemplate = "StoreField#{p#field/s}") -public final class StoreFieldNode extends AccessFieldNode implements StateSplit, VirtualizableRoot { +public final class StoreFieldNode extends AccessFieldNode implements StateSplit, Virtualizable { public static final NodeClass TYPE = NodeClass.create(StoreFieldNode.class); @Input ValueNode value; diff -r 96acaee06302 -r 5b2fd4cd7b8f graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/spi/VirtualizableAllocation.java --- a/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/spi/VirtualizableAllocation.java Fri Apr 03 10:41:57 2015 +0200 +++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/spi/VirtualizableAllocation.java Thu Apr 02 14:33:31 2015 +0200 @@ -26,9 +26,11 @@ * This interface allows a node to convey information about what its effect would be if some of its * inputs were virtualized. * - * The difference to {@link VirtualizableRoot} is that removing {@link VirtualizableAllocation} - * nodes is not considered progress during the escape analysis iterations. + * The difference to {@link Virtualizable} is that the {@link #virtualize(VirtualizerTool)} method + * will be called regardless of whether this node had any interaction with virtualized nodes. This + * interface can therefore be used for object allocations, for which virtualization introduces new + * virtualized objects. */ -public interface VirtualizableAllocation extends VirtualizableRoot { +public interface VirtualizableAllocation extends Virtualizable { } diff -r 96acaee06302 -r 5b2fd4cd7b8f graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/spi/VirtualizableRoot.java --- a/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/spi/VirtualizableRoot.java Fri Apr 03 10:41:57 2015 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,37 +0,0 @@ -/* - * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * This code is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ -package com.oracle.graal.nodes.spi; - -/** - * This interface allows a node to convey information about what its effect would be if some of its - * inputs were virtualized. - * - * The difference to {@link Virtualizable} is that the {@link #virtualize(VirtualizerTool)} method - * will be called regardless of whether this node had any interaction with virtualized nodes. This - * interface can therefore be used for object allocations, for which virtualization introduces new - * virtualized objects. - * - */ -public interface VirtualizableRoot extends Virtualizable { - -} diff -r 96acaee06302 -r 5b2fd4cd7b8f graal/com.oracle.graal.virtual/src/com/oracle/graal/virtual/phases/ea/PartialEscapeClosure.java --- a/graal/com.oracle.graal.virtual/src/com/oracle/graal/virtual/phases/ea/PartialEscapeClosure.java Fri Apr 03 10:41:57 2015 +0200 +++ b/graal/com.oracle.graal.virtual/src/com/oracle/graal/virtual/phases/ea/PartialEscapeClosure.java Thu Apr 02 14:33:31 2015 +0200 @@ -119,7 +119,7 @@ @Override protected boolean processNode(Node node, BlockT state, GraphEffectList effects, FixedWithNextNode lastFixedNode) { boolean isMarked = usages.isMarked(node); - if ((isMarked && node instanceof ValueNode) || node instanceof VirtualizableRoot) { + if ((isMarked && node instanceof ValueNode) || node instanceof VirtualizableAllocation) { VirtualUtil.trace("[[%s]] ", node); FixedNode nextFixedNode = lastFixedNode == null ? null : lastFixedNode.next(); return processNode((ValueNode) node, nextFixedNode, state, effects, isMarked);