Mercurial > hg > graal-jvmci-8
changeset 11883:673f93db4adc
Merge.
line wrap: on
line diff
--- a/graal/com.oracle.graal.graph/src/com/oracle/graal/graph/Node.java Wed Oct 02 18:40:48 2013 +0200 +++ b/graal/com.oracle.graal.graph/src/com/oracle/graal/graph/Node.java Wed Oct 02 21:40:29 2013 +0200 @@ -31,6 +31,7 @@ import com.oracle.graal.graph.NodeClass.NodeClassIterator; import com.oracle.graal.graph.NodeClass.Position; import com.oracle.graal.graph.iterators.*; +import com.oracle.graal.graph.spi.*; /** * This class is the base class for all nodes, it represent a node which can be inserted in a @@ -600,6 +601,28 @@ return clone(into, true); } + /** + * Must be overridden buy subclasses that implement {@link Canonicalizable}. The implementation + * in {@link Node} exists to obviate the need to cast a node before invoking + * {@link Canonicalizable#canonical(CanonicalizerTool)}. + * + * @param tool + */ + public Node canonical(CanonicalizerTool tool) { + throw new UnsupportedOperationException(); + } + + /** + * Must be overridden buy subclasses that implement {@link Simplifiable}. The implementation in + * {@link Node} exists to obviate the need to cast a node before invoking + * {@link Simplifiable#simplify(SimplifierTool)}. + * + * @param tool + */ + public void simplify(SimplifierTool tool) { + throw new UnsupportedOperationException(); + } + final Node clone(Graph into, boolean clearInputsAndSuccessors) { NodeClass nodeClass = getNodeClass(); if (nodeClass.valueNumberable() && nodeClass.isLeafNode()) {
--- a/graal/com.oracle.graal.graph/src/com/oracle/graal/graph/NodeClass.java Wed Oct 02 18:40:48 2013 +0200 +++ b/graal/com.oracle.graal.graph/src/com/oracle/graal/graph/NodeClass.java Wed Oct 02 21:40:29 2013 +0200 @@ -33,6 +33,7 @@ import com.oracle.graal.graph.Node.Input; import com.oracle.graal.graph.Node.Successor; import com.oracle.graal.graph.Node.Verbosity; +import com.oracle.graal.graph.spi.*; /** * Lazily associated metadata for every {@link Node} type. The metadata includes: @@ -148,9 +149,21 @@ private static final DebugMetric ITERABLE_NODE_TYPES = Debug.metric("IterableNodeTypes"); private final DebugMetric nodeIterableCount; + /** + * Determines if this node type implements {@link Canonicalizable}. + */ + private final boolean isCanonicalizable; + + /** + * Determines if this node type implements {@link Simplifiable}. + */ + private final boolean isSimplifiable; + private NodeClass(Class<?> clazz) { super(clazz); assert NODE_CLASS.isAssignableFrom(clazz); + this.isCanonicalizable = Canonicalizable.class.isAssignableFrom(clazz); + this.isSimplifiable = Simplifiable.class.isAssignableFrom(clazz); FieldScanner scanner = new FieldScanner(new DefaultCalcOffset()); scanner.scan(clazz); @@ -259,6 +272,20 @@ return isLeafNode; } + /** + * Determines if this node type implements {@link Canonicalizable}. + */ + public boolean isCanonicalizable() { + return isCanonicalizable; + } + + /** + * Determines if this node type implements {@link Simplifiable}. + */ + public boolean isSimplifiable() { + return isSimplifiable; + } + public static int cacheSize() { return nextIterableId; }
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/graal/com.oracle.graal.graph/src/com/oracle/graal/graph/spi/Canonicalizable.java Wed Oct 02 21:40:29 2013 +0200 @@ -0,0 +1,30 @@ +/* + * Copyright (c) 2011, 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.graph.spi; + +import com.oracle.graal.graph.*; + +public interface Canonicalizable { + + Node canonical(CanonicalizerTool tool); +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/graal/com.oracle.graal.graph/src/com/oracle/graal/graph/spi/CanonicalizerTool.java Wed Oct 02 21:40:29 2013 +0200 @@ -0,0 +1,38 @@ +/* + * Copyright (c) 2011, 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.graph.spi; + +import com.oracle.graal.api.code.*; +import com.oracle.graal.api.meta.*; +import com.oracle.graal.graph.*; + +public interface CanonicalizerTool { + + Assumptions assumptions(); + + MetaAccessProvider runtime(); + + boolean canonicalizeReads(); + + void removeIfUnused(Node node); +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/graal/com.oracle.graal.graph/src/com/oracle/graal/graph/spi/Simplifiable.java Wed Oct 02 21:40:29 2013 +0200 @@ -0,0 +1,37 @@ +/* + * Copyright (c) 2012, 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.graph.spi; + +/** + * This interface allows nodes to perform more complicated simplifications, in contrast to + * {@link Canonicalizable}, which supports only replacing the current node. + * + * Implementors of this interface need to be aware that they need to call + * {@link SimplifierTool#addToWorkList(com.oracle.graal.graph.Node)} for each node that might be + * influenced (in terms of simplification and canonicalization) by the actions performed in + * simplify. + */ +public interface Simplifiable { + + void simplify(SimplifierTool tool); +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/graal/com.oracle.graal.graph/src/com/oracle/graal/graph/spi/SimplifierTool.java Wed Oct 02 21:40:29 2013 +0200 @@ -0,0 +1,38 @@ +/* + * Copyright (c) 2012, 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.graph.spi; + +import com.oracle.graal.graph.*; + +/** + * @see Simplifiable + */ +public interface SimplifierTool extends CanonicalizerTool { + + void deleteBranch(Node branch); + + /** + * Adds a node to the worklist independent of whether it has already been on the worklist. + */ + void addToWorkList(Node node); +}
--- a/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/nodes/ClassCastNode.java Wed Oct 02 18:40:48 2013 +0200 +++ b/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/nodes/ClassCastNode.java Wed Oct 02 21:40:29 2013 +0200 @@ -22,11 +22,12 @@ */ package com.oracle.graal.hotspot.nodes; +import com.oracle.graal.graph.*; +import com.oracle.graal.graph.spi.*; import com.oracle.graal.hotspot.meta.*; import com.oracle.graal.hotspot.replacements.*; import com.oracle.graal.nodes.*; import com.oracle.graal.nodes.java.*; -import com.oracle.graal.nodes.spi.*; import com.oracle.graal.replacements.nodes.*; /** @@ -48,7 +49,8 @@ return arguments.get(1); } - public ValueNode canonical(CanonicalizerTool tool) { + @Override + public Node canonical(CanonicalizerTool tool) { ValueNode javaClass = getJavaClass(); if (javaClass.isConstant()) { ValueNode object = getObject();
--- a/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/nodes/ClassGetComponentTypeNode.java Wed Oct 02 18:40:48 2013 +0200 +++ b/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/nodes/ClassGetComponentTypeNode.java Wed Oct 02 21:40:29 2013 +0200 @@ -22,9 +22,10 @@ */ package com.oracle.graal.hotspot.nodes; +import com.oracle.graal.graph.*; +import com.oracle.graal.graph.spi.*; import com.oracle.graal.hotspot.replacements.*; import com.oracle.graal.nodes.*; -import com.oracle.graal.nodes.spi.*; import com.oracle.graal.replacements.nodes.*; /** @@ -42,7 +43,8 @@ return arguments.get(0); } - public ValueNode canonical(CanonicalizerTool tool) { + @Override + public Node canonical(CanonicalizerTool tool) { ValueNode javaClass = getJavaClass(); if (javaClass.isConstant()) { Class c = (Class) javaClass.asConstant().asObject();
--- a/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/nodes/ClassGetModifiersNode.java Wed Oct 02 18:40:48 2013 +0200 +++ b/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/nodes/ClassGetModifiersNode.java Wed Oct 02 21:40:29 2013 +0200 @@ -22,9 +22,10 @@ */ package com.oracle.graal.hotspot.nodes; +import com.oracle.graal.graph.*; +import com.oracle.graal.graph.spi.*; import com.oracle.graal.hotspot.replacements.*; import com.oracle.graal.nodes.*; -import com.oracle.graal.nodes.spi.*; import com.oracle.graal.replacements.nodes.*; /** @@ -42,7 +43,8 @@ return arguments.get(0); } - public ValueNode canonical(CanonicalizerTool tool) { + @Override + public Node canonical(CanonicalizerTool tool) { ValueNode javaClass = getJavaClass(); if (javaClass.isConstant()) { Class c = (Class) javaClass.asConstant().asObject();
--- a/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/nodes/ClassGetSuperclassNode.java Wed Oct 02 18:40:48 2013 +0200 +++ b/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/nodes/ClassGetSuperclassNode.java Wed Oct 02 21:40:29 2013 +0200 @@ -22,9 +22,10 @@ */ package com.oracle.graal.hotspot.nodes; +import com.oracle.graal.graph.*; +import com.oracle.graal.graph.spi.*; import com.oracle.graal.hotspot.replacements.*; import com.oracle.graal.nodes.*; -import com.oracle.graal.nodes.spi.*; import com.oracle.graal.replacements.nodes.*; /** @@ -42,7 +43,8 @@ return arguments.get(0); } - public ValueNode canonical(CanonicalizerTool tool) { + @Override + public Node canonical(CanonicalizerTool tool) { ValueNode javaClass = getJavaClass(); if (javaClass.isConstant()) { Class c = (Class) javaClass.asConstant().asObject();
--- a/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/nodes/ClassIsArrayNode.java Wed Oct 02 18:40:48 2013 +0200 +++ b/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/nodes/ClassIsArrayNode.java Wed Oct 02 21:40:29 2013 +0200 @@ -22,9 +22,10 @@ */ package com.oracle.graal.hotspot.nodes; +import com.oracle.graal.graph.*; +import com.oracle.graal.graph.spi.*; import com.oracle.graal.hotspot.replacements.*; import com.oracle.graal.nodes.*; -import com.oracle.graal.nodes.spi.*; import com.oracle.graal.replacements.nodes.*; /** @@ -42,7 +43,8 @@ return arguments.get(0); } - public ValueNode canonical(CanonicalizerTool tool) { + @Override + public Node canonical(CanonicalizerTool tool) { ValueNode javaClass = getJavaClass(); if (javaClass.isConstant()) { Class c = (Class) javaClass.asConstant().asObject();
--- a/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/nodes/ClassIsInstanceNode.java Wed Oct 02 18:40:48 2013 +0200 +++ b/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/nodes/ClassIsInstanceNode.java Wed Oct 02 21:40:29 2013 +0200 @@ -22,12 +22,13 @@ */ package com.oracle.graal.hotspot.nodes; +import com.oracle.graal.graph.*; +import com.oracle.graal.graph.spi.*; import com.oracle.graal.hotspot.meta.*; import com.oracle.graal.hotspot.replacements.*; import com.oracle.graal.nodes.*; import com.oracle.graal.nodes.calc.*; import com.oracle.graal.nodes.java.*; -import com.oracle.graal.nodes.spi.*; import com.oracle.graal.replacements.nodes.*; /** @@ -49,7 +50,8 @@ return arguments.get(1); } - public ValueNode canonical(CanonicalizerTool tool) { + @Override + public Node canonical(CanonicalizerTool tool) { ValueNode javaClass = getJavaClass(); if (javaClass.isConstant()) { ValueNode object = getObject();
--- a/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/nodes/ClassIsInterfaceNode.java Wed Oct 02 18:40:48 2013 +0200 +++ b/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/nodes/ClassIsInterfaceNode.java Wed Oct 02 21:40:29 2013 +0200 @@ -22,9 +22,10 @@ */ package com.oracle.graal.hotspot.nodes; +import com.oracle.graal.graph.*; +import com.oracle.graal.graph.spi.*; import com.oracle.graal.hotspot.replacements.*; import com.oracle.graal.nodes.*; -import com.oracle.graal.nodes.spi.*; import com.oracle.graal.replacements.nodes.*; /** @@ -42,7 +43,8 @@ return arguments.get(0); } - public ValueNode canonical(CanonicalizerTool tool) { + @Override + public Node canonical(CanonicalizerTool tool) { ValueNode javaClass = getJavaClass(); if (javaClass.isConstant()) { Class c = (Class) javaClass.asConstant().asObject();
--- a/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/nodes/ClassIsPrimitiveNode.java Wed Oct 02 18:40:48 2013 +0200 +++ b/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/nodes/ClassIsPrimitiveNode.java Wed Oct 02 21:40:29 2013 +0200 @@ -22,9 +22,10 @@ */ package com.oracle.graal.hotspot.nodes; +import com.oracle.graal.graph.*; +import com.oracle.graal.graph.spi.*; import com.oracle.graal.hotspot.replacements.*; import com.oracle.graal.nodes.*; -import com.oracle.graal.nodes.spi.*; import com.oracle.graal.replacements.nodes.*; /** @@ -42,7 +43,8 @@ return arguments.get(0); } - public ValueNode canonical(CanonicalizerTool tool) { + @Override + public Node canonical(CanonicalizerTool tool) { ValueNode javaClass = getJavaClass(); if (javaClass.isConstant()) { Class c = (Class) javaClass.asConstant().asObject();
--- a/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/replacements/AbstractMethodHandleNode.java Wed Oct 02 18:40:48 2013 +0200 +++ b/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/replacements/AbstractMethodHandleNode.java Wed Oct 02 21:40:29 2013 +0200 @@ -32,6 +32,7 @@ import com.oracle.graal.api.meta.ResolvedJavaType; import com.oracle.graal.graph.GraalInternalError; import com.oracle.graal.graph.NodeInputList; +import com.oracle.graal.graph.spi.*; import com.oracle.graal.hotspot.meta.HotSpotResolvedJavaMethod; import com.oracle.graal.hotspot.meta.HotSpotResolvedObjectType; import com.oracle.graal.hotspot.meta.HotSpotSignature; @@ -43,7 +44,6 @@ import com.oracle.graal.nodes.java.MethodCallTargetNode; import com.oracle.graal.nodes.java.MethodCallTargetNode.InvokeKind; import com.oracle.graal.nodes.java.SelfReplacingMethodCallTargetNode; -import com.oracle.graal.nodes.spi.Canonicalizable; import com.oracle.graal.nodes.type.*; import com.oracle.graal.replacements.nodes.MacroNode;
--- a/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/replacements/CallSiteTargetNode.java Wed Oct 02 18:40:48 2013 +0200 +++ b/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/replacements/CallSiteTargetNode.java Wed Oct 02 21:40:29 2013 +0200 @@ -26,6 +26,8 @@ import com.oracle.graal.api.code.*; import com.oracle.graal.api.meta.*; +import com.oracle.graal.graph.*; +import com.oracle.graal.graph.spi.*; import com.oracle.graal.nodes.*; import com.oracle.graal.nodes.spi.*; import com.oracle.graal.replacements.nodes.*; @@ -56,7 +58,7 @@ } @Override - public ValueNode canonical(CanonicalizerTool tool) { + public Node canonical(CanonicalizerTool tool) { ConstantNode target = getConstantCallTarget(tool.runtime(), tool.assumptions()); if (target != null) { return target;
--- a/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/replacements/MethodHandleInvokeBasicNode.java Wed Oct 02 18:40:48 2013 +0200 +++ b/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/replacements/MethodHandleInvokeBasicNode.java Wed Oct 02 21:40:29 2013 +0200 @@ -24,10 +24,9 @@ import java.lang.invoke.MethodHandle; -import com.oracle.graal.nodes.Invoke; -import com.oracle.graal.nodes.InvokeNode; -import com.oracle.graal.nodes.ValueNode; -import com.oracle.graal.nodes.spi.CanonicalizerTool; +import com.oracle.graal.graph.*; +import com.oracle.graal.graph.spi.*; +import com.oracle.graal.nodes.*; /** * Macro node for {@link MethodHandle}{@code .invokeBasic(Object...)}. @@ -39,7 +38,7 @@ } @Override - public ValueNode canonical(CanonicalizerTool tool) { + public Node canonical(CanonicalizerTool tool) { InvokeNode invoke = getInvokeBasicTarget(); if (invoke != null) { return invoke;
--- a/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/replacements/MethodHandleLinkToInterfaceNode.java Wed Oct 02 18:40:48 2013 +0200 +++ b/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/replacements/MethodHandleLinkToInterfaceNode.java Wed Oct 02 21:40:29 2013 +0200 @@ -24,10 +24,9 @@ import java.lang.invoke.MethodHandle; -import com.oracle.graal.nodes.Invoke; -import com.oracle.graal.nodes.InvokeNode; -import com.oracle.graal.nodes.ValueNode; -import com.oracle.graal.nodes.spi.CanonicalizerTool; +import com.oracle.graal.graph.*; +import com.oracle.graal.graph.spi.*; +import com.oracle.graal.nodes.*; /** * Macro node for {@link MethodHandle}{@code .linkToInterface(Object...)}. @@ -39,7 +38,7 @@ } @Override - public ValueNode canonical(CanonicalizerTool tool) { + public Node canonical(CanonicalizerTool tool) { InvokeNode invoke = getLinkToTarget(); if (invoke != null) { return invoke;
--- a/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/replacements/MethodHandleLinkToSpecialNode.java Wed Oct 02 18:40:48 2013 +0200 +++ b/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/replacements/MethodHandleLinkToSpecialNode.java Wed Oct 02 21:40:29 2013 +0200 @@ -24,10 +24,9 @@ import java.lang.invoke.MethodHandle; -import com.oracle.graal.nodes.Invoke; -import com.oracle.graal.nodes.InvokeNode; -import com.oracle.graal.nodes.ValueNode; -import com.oracle.graal.nodes.spi.CanonicalizerTool; +import com.oracle.graal.graph.*; +import com.oracle.graal.graph.spi.*; +import com.oracle.graal.nodes.*; /** * Macro node for {@link MethodHandle}{@code .linkToSpecial(Object...)}. @@ -39,7 +38,7 @@ } @Override - public ValueNode canonical(CanonicalizerTool tool) { + public Node canonical(CanonicalizerTool tool) { InvokeNode invoke = getLinkToTarget(); if (invoke != null) { return invoke;
--- a/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/replacements/MethodHandleLinkToStaticNode.java Wed Oct 02 18:40:48 2013 +0200 +++ b/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/replacements/MethodHandleLinkToStaticNode.java Wed Oct 02 21:40:29 2013 +0200 @@ -24,10 +24,9 @@ import java.lang.invoke.MethodHandle; -import com.oracle.graal.nodes.Invoke; -import com.oracle.graal.nodes.InvokeNode; -import com.oracle.graal.nodes.ValueNode; -import com.oracle.graal.nodes.spi.CanonicalizerTool; +import com.oracle.graal.graph.*; +import com.oracle.graal.graph.spi.*; +import com.oracle.graal.nodes.*; /** * Macro node for {@link MethodHandle}{@code .linkToStatic(Object...)}. @@ -39,7 +38,7 @@ } @Override - public ValueNode canonical(CanonicalizerTool tool) { + public Node canonical(CanonicalizerTool tool) { InvokeNode invoke = getLinkToTarget(); if (invoke != null) { return invoke;
--- a/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/replacements/MethodHandleLinkToVirtualNode.java Wed Oct 02 18:40:48 2013 +0200 +++ b/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/replacements/MethodHandleLinkToVirtualNode.java Wed Oct 02 21:40:29 2013 +0200 @@ -24,10 +24,9 @@ import java.lang.invoke.MethodHandle; -import com.oracle.graal.nodes.Invoke; -import com.oracle.graal.nodes.InvokeNode; -import com.oracle.graal.nodes.ValueNode; -import com.oracle.graal.nodes.spi.CanonicalizerTool; +import com.oracle.graal.graph.*; +import com.oracle.graal.graph.spi.*; +import com.oracle.graal.nodes.*; /** * Macro node for {@link MethodHandle}{@code .linkToVirtual(Object...)}. @@ -39,7 +38,7 @@ } @Override - public ValueNode canonical(CanonicalizerTool tool) { + public Node canonical(CanonicalizerTool tool) { InvokeNode invoke = getLinkToTarget(); if (invoke != null) { return invoke;
--- a/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/replacements/ObjectGetClassNode.java Wed Oct 02 18:40:48 2013 +0200 +++ b/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/replacements/ObjectGetClassNode.java Wed Oct 02 21:40:29 2013 +0200 @@ -26,6 +26,8 @@ import com.oracle.graal.api.meta.*; import com.oracle.graal.api.meta.ResolvedJavaType.Representation; +import com.oracle.graal.graph.*; +import com.oracle.graal.graph.spi.*; import com.oracle.graal.nodes.*; import com.oracle.graal.nodes.spi.*; import com.oracle.graal.nodes.type.*; @@ -57,7 +59,8 @@ } } - public ValueNode canonical(CanonicalizerTool tool) { + @Override + public Node canonical(CanonicalizerTool tool) { if (AOTCompilation.getValue()) { return this; }
--- a/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/replacements/ReflectionGetCallerClassNode.java Wed Oct 02 18:40:48 2013 +0200 +++ b/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/replacements/ReflectionGetCallerClassNode.java Wed Oct 02 21:40:29 2013 +0200 @@ -26,6 +26,7 @@ import com.oracle.graal.api.meta.*; import com.oracle.graal.graph.*; +import com.oracle.graal.graph.spi.*; import com.oracle.graal.hotspot.meta.*; import com.oracle.graal.nodes.*; import com.oracle.graal.nodes.spi.*; @@ -38,7 +39,7 @@ } @Override - public ValueNode canonical(CanonicalizerTool tool) { + public Node canonical(CanonicalizerTool tool) { ConstantNode callerClassNode = getCallerClassNode(tool.runtime()); if (callerClassNode != null) { return callerClassNode;
--- a/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/AbstractBeginNode.java Wed Oct 02 18:40:48 2013 +0200 +++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/AbstractBeginNode.java Wed Oct 02 21:40:29 2013 +0200 @@ -28,6 +28,7 @@ import com.oracle.graal.graph.*; import com.oracle.graal.graph.iterators.*; +import com.oracle.graal.graph.spi.*; import com.oracle.graal.nodes.extended.*; import com.oracle.graal.nodes.spi.*; import com.oracle.graal.nodes.type.*;
--- a/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/EntryMarkerNode.java Wed Oct 02 18:40:48 2013 +0200 +++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/EntryMarkerNode.java Wed Oct 02 21:40:29 2013 +0200 @@ -23,6 +23,7 @@ package com.oracle.graal.nodes; import com.oracle.graal.graph.*; +import com.oracle.graal.graph.spi.*; import com.oracle.graal.nodes.spi.*; /**
--- a/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/FixedGuardNode.java Wed Oct 02 18:40:48 2013 +0200 +++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/FixedGuardNode.java Wed Oct 02 21:40:29 2013 +0200 @@ -24,6 +24,7 @@ import com.oracle.graal.api.meta.*; import com.oracle.graal.graph.*; +import com.oracle.graal.graph.spi.*; import com.oracle.graal.nodes.extended.*; import com.oracle.graal.nodes.spi.*; import com.oracle.graal.nodes.type.*;
--- a/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/GuardNode.java Wed Oct 02 18:40:48 2013 +0200 +++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/GuardNode.java Wed Oct 02 21:40:29 2013 +0200 @@ -24,8 +24,8 @@ import com.oracle.graal.api.meta.*; import com.oracle.graal.graph.*; +import com.oracle.graal.graph.spi.*; import com.oracle.graal.nodes.extended.*; -import com.oracle.graal.nodes.spi.*; import com.oracle.graal.nodes.type.*; /** @@ -90,7 +90,7 @@ } @Override - public ValueNode canonical(CanonicalizerTool tool) { + public Node canonical(CanonicalizerTool tool) { if (condition() instanceof LogicNegationNode) { LogicNegationNode negation = (LogicNegationNode) condition(); return graph().unique(new GuardNode(negation.getInput(), getGuard(), reason, action, !negated));
--- a/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/GuardedValueNode.java Wed Oct 02 18:40:48 2013 +0200 +++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/GuardedValueNode.java Wed Oct 02 21:40:29 2013 +0200 @@ -24,6 +24,7 @@ import com.oracle.graal.api.meta.*; import com.oracle.graal.graph.*; +import com.oracle.graal.graph.spi.*; import com.oracle.graal.nodes.extended.*; import com.oracle.graal.nodes.spi.*; import com.oracle.graal.nodes.type.*; @@ -74,7 +75,8 @@ } } - public ValueNode canonical(CanonicalizerTool tool) { + @Override + public Node canonical(CanonicalizerTool tool) { if (getGuard() == graph().start()) { if (stamp().equals(object().stamp())) { return object();
--- a/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/GuardingPiNode.java Wed Oct 02 18:40:48 2013 +0200 +++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/GuardingPiNode.java Wed Oct 02 21:40:29 2013 +0200 @@ -24,6 +24,7 @@ import com.oracle.graal.api.meta.*; import com.oracle.graal.graph.*; +import com.oracle.graal.graph.spi.*; import com.oracle.graal.nodes.calc.*; import com.oracle.graal.nodes.extended.*; import com.oracle.graal.nodes.spi.*; @@ -92,7 +93,7 @@ } @Override - public ValueNode canonical(CanonicalizerTool tool) { + public Node canonical(CanonicalizerTool tool) { if (stamp() == StampFactory.illegal(object.kind())) { // The guard always fails return graph().add(new DeoptimizeNode(action, reason));
--- a/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/IfNode.java Wed Oct 02 18:40:48 2013 +0200 +++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/IfNode.java Wed Oct 02 21:40:29 2013 +0200 @@ -30,6 +30,7 @@ import com.oracle.graal.debug.*; import com.oracle.graal.graph.*; import com.oracle.graal.graph.iterators.*; +import com.oracle.graal.graph.spi.*; import com.oracle.graal.nodes.PhiNode.PhiType; import com.oracle.graal.nodes.calc.*; import com.oracle.graal.nodes.java.*;
--- a/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/LogicNegationNode.java Wed Oct 02 18:40:48 2013 +0200 +++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/LogicNegationNode.java Wed Oct 02 21:40:29 2013 +0200 @@ -23,7 +23,7 @@ package com.oracle.graal.nodes; import com.oracle.graal.graph.*; -import com.oracle.graal.nodes.spi.*; +import com.oracle.graal.graph.spi.*; /** * Logic node that negates its argument. @@ -40,7 +40,8 @@ return input; } - public ValueNode canonical(CanonicalizerTool tool) { + @Override + public Node canonical(CanonicalizerTool tool) { if (input instanceof LogicNegationNode) { return ((LogicNegationNode) input).getInput(); } else {
--- a/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/LoopBeginNode.java Wed Oct 02 18:40:48 2013 +0200 +++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/LoopBeginNode.java Wed Oct 02 21:40:29 2013 +0200 @@ -28,6 +28,7 @@ import com.oracle.graal.graph.*; import com.oracle.graal.graph.iterators.*; +import com.oracle.graal.graph.spi.*; import com.oracle.graal.nodes.extended.*; import com.oracle.graal.nodes.spi.*;
--- a/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/LoopExitNode.java Wed Oct 02 18:40:48 2013 +0200 +++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/LoopExitNode.java Wed Oct 02 21:40:29 2013 +0200 @@ -23,7 +23,7 @@ package com.oracle.graal.nodes; import com.oracle.graal.graph.*; -import com.oracle.graal.nodes.spi.*; +import com.oracle.graal.graph.spi.*; public class LoopExitNode extends BeginStateSplitNode implements IterableNodeType {
--- a/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/MergeNode.java Wed Oct 02 18:40:48 2013 +0200 +++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/MergeNode.java Wed Oct 02 21:40:29 2013 +0200 @@ -27,6 +27,7 @@ import com.oracle.graal.debug.*; import com.oracle.graal.graph.*; import com.oracle.graal.graph.iterators.*; +import com.oracle.graal.graph.spi.*; import com.oracle.graal.nodes.spi.*; import com.oracle.graal.nodes.util.*;
--- a/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/PhiNode.java Wed Oct 02 18:40:48 2013 +0200 +++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/PhiNode.java Wed Oct 02 21:40:29 2013 +0200 @@ -24,9 +24,9 @@ import com.oracle.graal.api.meta.*; import com.oracle.graal.graph.*; +import com.oracle.graal.graph.spi.*; import com.oracle.graal.nodes.calc.*; import com.oracle.graal.nodes.extended.*; -import com.oracle.graal.nodes.spi.*; import com.oracle.graal.nodes.type.*; /** @@ -231,7 +231,7 @@ } @Override - public ValueNode canonical(CanonicalizerTool tool) { + public Node canonical(CanonicalizerTool tool) { ValueNode singleValue = singleValue(); if (singleValue != null) {
--- a/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/PiArrayNode.java Wed Oct 02 18:40:48 2013 +0200 +++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/PiArrayNode.java Wed Oct 02 21:40:29 2013 +0200 @@ -22,6 +22,8 @@ */ package com.oracle.graal.nodes; +import com.oracle.graal.graph.*; +import com.oracle.graal.graph.spi.*; import com.oracle.graal.nodes.java.*; import com.oracle.graal.nodes.spi.*; import com.oracle.graal.nodes.type.*; @@ -45,7 +47,7 @@ } @Override - public ValueNode canonical(CanonicalizerTool tool) { + public Node canonical(CanonicalizerTool tool) { if (!(object() instanceof ArrayLengthProvider) || length() != ((ArrayLengthProvider) object()).length()) { return this; }
--- a/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/PiNode.java Wed Oct 02 18:40:48 2013 +0200 +++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/PiNode.java Wed Oct 02 21:40:29 2013 +0200 @@ -24,6 +24,7 @@ import com.oracle.graal.api.meta.*; import com.oracle.graal.graph.*; +import com.oracle.graal.graph.spi.*; import com.oracle.graal.nodes.extended.*; import com.oracle.graal.nodes.spi.*; import com.oracle.graal.nodes.type.*; @@ -83,7 +84,7 @@ } @Override - public ValueNode canonical(CanonicalizerTool tool) { + public Node canonical(CanonicalizerTool tool) { inferStamp(); if (stamp().equals(object().stamp())) { return object();
--- a/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/ProxyNode.java Wed Oct 02 18:40:48 2013 +0200 +++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/ProxyNode.java Wed Oct 02 21:40:29 2013 +0200 @@ -24,6 +24,7 @@ import com.oracle.graal.graph.*; import com.oracle.graal.graph.Node.ValueNumberable; +import com.oracle.graal.graph.spi.*; import com.oracle.graal.nodes.PhiNode.PhiType; import com.oracle.graal.nodes.calc.*; import com.oracle.graal.nodes.extended.*; @@ -87,7 +88,7 @@ } @Override - public ValueNode canonical(CanonicalizerTool tool) { + public Node canonical(CanonicalizerTool tool) { if (type == PhiType.Value && value.isConstant()) { return value; }
--- a/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/ShortCircuitOrNode.java Wed Oct 02 18:40:48 2013 +0200 +++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/ShortCircuitOrNode.java Wed Oct 02 21:40:29 2013 +0200 @@ -23,7 +23,7 @@ package com.oracle.graal.nodes; import com.oracle.graal.graph.*; -import com.oracle.graal.nodes.spi.*; +import com.oracle.graal.graph.spi.*; public class ShortCircuitOrNode extends LogicNode implements IterableNodeType, Canonicalizable { @@ -88,7 +88,7 @@ } @Override - public LogicNode canonical(CanonicalizerTool tool) { + public Node canonical(CanonicalizerTool tool) { ShortCircuitOrNode ret = canonicalizeNegation(); if (ret != null) { return ret;
--- a/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/StructuredGraph.java Wed Oct 02 18:40:48 2013 +0200 +++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/StructuredGraph.java Wed Oct 02 21:40:29 2013 +0200 @@ -250,7 +250,7 @@ node.safeDelete(); } - public void replaceFloating(FloatingNode node, ValueNode replacement) { + public void replaceFloating(FloatingNode node, Node replacement) { assert node != null && replacement != null && node.isAlive() && replacement.isAlive() : "cannot replace " + node + " with " + replacement; node.replaceAtUsages(replacement); node.safeDelete(); @@ -324,7 +324,7 @@ for (Node successor : snapshot) { if (successor != null && successor.isAlive()) { if (successor != survivingSuccessor) { - GraphUtil.killCFG((AbstractBeginNode) successor); + GraphUtil.killCFG(successor); } } }
--- a/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/TypeProfileProxyNode.java Wed Oct 02 18:40:48 2013 +0200 +++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/TypeProfileProxyNode.java Wed Oct 02 21:40:29 2013 +0200 @@ -25,6 +25,7 @@ import com.oracle.graal.api.meta.*; import com.oracle.graal.debug.*; import com.oracle.graal.graph.*; +import com.oracle.graal.graph.spi.*; import com.oracle.graal.nodes.calc.*; import com.oracle.graal.nodes.spi.*; import com.oracle.graal.nodes.type.*; @@ -71,7 +72,7 @@ } @Override - public ValueNode canonical(CanonicalizerTool tool) { + public Node canonical(CanonicalizerTool tool) { if (ObjectStamp.isExactType(object)) { // The profile is useless - we know the type! return object;
--- a/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/calc/AndNode.java Wed Oct 02 18:40:48 2013 +0200 +++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/calc/AndNode.java Wed Oct 02 21:40:29 2013 +0200 @@ -24,6 +24,7 @@ import com.oracle.graal.api.meta.*; import com.oracle.graal.graph.*; +import com.oracle.graal.graph.spi.*; import com.oracle.graal.nodes.*; import com.oracle.graal.nodes.spi.*; import com.oracle.graal.nodes.type.*; @@ -47,7 +48,7 @@ } @Override - public ValueNode canonical(CanonicalizerTool tool) { + public Node canonical(CanonicalizerTool tool) { if (x() == y()) { return x(); }
--- a/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/calc/CompareNode.java Wed Oct 02 18:40:48 2013 +0200 +++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/calc/CompareNode.java Wed Oct 02 21:40:29 2013 +0200 @@ -24,6 +24,7 @@ import com.oracle.graal.api.meta.*; import com.oracle.graal.graph.*; +import com.oracle.graal.graph.spi.*; import com.oracle.graal.nodes.*; import com.oracle.graal.nodes.spi.*; @@ -115,7 +116,7 @@ } @Override - public LogicNode canonical(CanonicalizerTool tool) { + public Node canonical(CanonicalizerTool tool) { if (x().isConstant() && y().isConstant() && tool.runtime() != null) { return LogicConstantNode.forBoolean(condition().foldCondition(x().asConstant(), y().asConstant(), tool.runtime(), unorderedIsTrue()), graph()); }
--- a/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/calc/ConditionalNode.java Wed Oct 02 18:40:48 2013 +0200 +++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/calc/ConditionalNode.java Wed Oct 02 21:40:29 2013 +0200 @@ -25,6 +25,8 @@ import static com.oracle.graal.nodes.calc.CompareNode.*; import com.oracle.graal.api.meta.*; +import com.oracle.graal.graph.*; +import com.oracle.graal.graph.spi.*; import com.oracle.graal.nodes.*; import com.oracle.graal.nodes.java.*; import com.oracle.graal.nodes.spi.*; @@ -66,7 +68,7 @@ } @Override - public ValueNode canonical(CanonicalizerTool tool) { + public Node canonical(CanonicalizerTool tool) { if (condition instanceof LogicNegationNode) { LogicNegationNode negated = (LogicNegationNode) condition; return graph().unique(new ConditionalNode(negated.getInput(), falseValue(), trueValue()));
--- a/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/calc/ConvertNode.java Wed Oct 02 18:40:48 2013 +0200 +++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/calc/ConvertNode.java Wed Oct 02 21:40:29 2013 +0200 @@ -26,6 +26,7 @@ import com.oracle.graal.api.meta.*; import com.oracle.graal.graph.*; +import com.oracle.graal.graph.spi.*; import com.oracle.graal.nodes.*; import com.oracle.graal.nodes.spi.*; import com.oracle.graal.nodes.type.*; @@ -200,7 +201,7 @@ } @Override - public ValueNode canonical(CanonicalizerTool tool) { + public Node canonical(CanonicalizerTool tool) { if (value.isConstant()) { return ConstantNode.forPrimitive(evalConst(value.asConstant()), graph()); }
--- a/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/calc/FloatAddNode.java Wed Oct 02 18:40:48 2013 +0200 +++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/calc/FloatAddNode.java Wed Oct 02 21:40:29 2013 +0200 @@ -24,6 +24,7 @@ import com.oracle.graal.api.meta.*; import com.oracle.graal.graph.*; +import com.oracle.graal.graph.spi.*; import com.oracle.graal.nodes.*; import com.oracle.graal.nodes.spi.*; @@ -45,7 +46,7 @@ } @Override - public ValueNode canonical(CanonicalizerTool tool) { + public Node canonical(CanonicalizerTool tool) { if (x().isConstant() && !y().isConstant()) { return graph().unique(new FloatAddNode(kind(), y(), x(), isStrictFP())); }
--- a/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/calc/FloatDivNode.java Wed Oct 02 18:40:48 2013 +0200 +++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/calc/FloatDivNode.java Wed Oct 02 21:40:29 2013 +0200 @@ -24,6 +24,7 @@ import com.oracle.graal.api.meta.*; import com.oracle.graal.graph.*; +import com.oracle.graal.graph.spi.*; import com.oracle.graal.nodes.*; import com.oracle.graal.nodes.spi.*; @@ -45,7 +46,7 @@ } @Override - public ValueNode canonical(CanonicalizerTool tool) { + public Node canonical(CanonicalizerTool tool) { if (x().isConstant() && y().isConstant()) { return ConstantNode.forPrimitive(evalConst(x().asConstant(), y().asConstant()), graph()); }
--- a/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/calc/FloatLessThanNode.java Wed Oct 02 18:40:48 2013 +0200 +++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/calc/FloatLessThanNode.java Wed Oct 02 21:40:29 2013 +0200 @@ -24,8 +24,8 @@ import com.oracle.graal.api.meta.*; import com.oracle.graal.graph.*; +import com.oracle.graal.graph.spi.*; import com.oracle.graal.nodes.*; -import com.oracle.graal.nodes.spi.*; @NodeInfo(shortName = "<") public final class FloatLessThanNode extends CompareNode { @@ -58,7 +58,7 @@ } @Override - public LogicNode canonical(CanonicalizerTool tool) { + public Node canonical(CanonicalizerTool tool) { if (x() == y() && !unorderedIsTrue()) { return LogicConstantNode.contradiction(graph()); }
--- a/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/calc/FloatMulNode.java Wed Oct 02 18:40:48 2013 +0200 +++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/calc/FloatMulNode.java Wed Oct 02 21:40:29 2013 +0200 @@ -24,6 +24,7 @@ import com.oracle.graal.api.meta.*; import com.oracle.graal.graph.*; +import com.oracle.graal.graph.spi.*; import com.oracle.graal.nodes.*; import com.oracle.graal.nodes.spi.*; @@ -45,7 +46,7 @@ } @Override - public ValueNode canonical(CanonicalizerTool tool) { + public Node canonical(CanonicalizerTool tool) { if (x().isConstant() && !y().isConstant()) { return graph().unique(new FloatMulNode(kind(), y(), x(), isStrictFP())); }
--- a/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/calc/FloatRemNode.java Wed Oct 02 18:40:48 2013 +0200 +++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/calc/FloatRemNode.java Wed Oct 02 21:40:29 2013 +0200 @@ -24,6 +24,7 @@ import com.oracle.graal.api.meta.*; import com.oracle.graal.graph.*; +import com.oracle.graal.graph.spi.*; import com.oracle.graal.nodes.*; import com.oracle.graal.nodes.spi.*; @@ -45,7 +46,7 @@ } @Override - public ValueNode canonical(CanonicalizerTool tool) { + public Node canonical(CanonicalizerTool tool) { if (x().isConstant() && y().isConstant()) { return ConstantNode.forPrimitive(evalConst(x().asConstant(), y().asConstant()), graph()); }
--- a/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/calc/FloatSubNode.java Wed Oct 02 18:40:48 2013 +0200 +++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/calc/FloatSubNode.java Wed Oct 02 21:40:29 2013 +0200 @@ -24,6 +24,7 @@ import com.oracle.graal.api.meta.*; import com.oracle.graal.graph.*; +import com.oracle.graal.graph.spi.*; import com.oracle.graal.nodes.*; import com.oracle.graal.nodes.spi.*; @@ -45,7 +46,7 @@ } @Override - public ValueNode canonical(CanonicalizerTool tool) { + public Node canonical(CanonicalizerTool tool) { if (x() == y()) { return ConstantNode.forFloatingKind(kind(), 0.0f, graph()); }
--- a/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/calc/IntegerAddNode.java Wed Oct 02 18:40:48 2013 +0200 +++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/calc/IntegerAddNode.java Wed Oct 02 21:40:29 2013 +0200 @@ -24,6 +24,7 @@ import com.oracle.graal.api.meta.*; import com.oracle.graal.graph.*; +import com.oracle.graal.graph.spi.*; import com.oracle.graal.nodes.*; import com.oracle.graal.nodes.spi.*; import com.oracle.graal.nodes.type.*; @@ -47,7 +48,7 @@ } @Override - public ValueNode canonical(CanonicalizerTool tool) { + public Node canonical(CanonicalizerTool tool) { if (x().isConstant() && !y().isConstant()) { return graph().unique(new IntegerAddNode(kind(), y(), x())); }
--- a/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/calc/IntegerBelowThanNode.java Wed Oct 02 18:40:48 2013 +0200 +++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/calc/IntegerBelowThanNode.java Wed Oct 02 21:40:29 2013 +0200 @@ -24,8 +24,8 @@ import com.oracle.graal.api.meta.*; import com.oracle.graal.graph.*; +import com.oracle.graal.graph.spi.*; import com.oracle.graal.nodes.*; -import com.oracle.graal.nodes.spi.*; import com.oracle.graal.nodes.type.*; @NodeInfo(shortName = "|<|") @@ -54,7 +54,7 @@ } @Override - public LogicNode canonical(CanonicalizerTool tool) { + public Node canonical(CanonicalizerTool tool) { if (x() == y()) { return LogicConstantNode.contradiction(graph()); } else {
--- a/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/calc/IntegerDivNode.java Wed Oct 02 18:40:48 2013 +0200 +++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/calc/IntegerDivNode.java Wed Oct 02 21:40:29 2013 +0200 @@ -25,6 +25,7 @@ import com.oracle.graal.api.code.*; import com.oracle.graal.api.meta.*; import com.oracle.graal.graph.*; +import com.oracle.graal.graph.spi.*; import com.oracle.graal.nodes.*; import com.oracle.graal.nodes.spi.*; import com.oracle.graal.nodes.type.*; @@ -42,7 +43,7 @@ } @Override - public ValueNode canonical(CanonicalizerTool tool) { + public Node canonical(CanonicalizerTool tool) { if (x().isConstant() && y().isConstant()) { long yConst = y().asConstant().asLong(); if (yConst == 0) {
--- a/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/calc/IntegerEqualsNode.java Wed Oct 02 18:40:48 2013 +0200 +++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/calc/IntegerEqualsNode.java Wed Oct 02 21:40:29 2013 +0200 @@ -24,8 +24,8 @@ import com.oracle.graal.api.meta.*; import com.oracle.graal.graph.*; +import com.oracle.graal.graph.spi.*; import com.oracle.graal.nodes.*; -import com.oracle.graal.nodes.spi.*; @NodeInfo(shortName = "==") public final class IntegerEqualsNode extends CompareNode { @@ -68,7 +68,7 @@ } @Override - public LogicNode canonical(CanonicalizerTool tool) { + public Node canonical(CanonicalizerTool tool) { if (x() == y()) { return LogicConstantNode.tautology(graph()); } else if (x().stamp().alwaysDistinct(y().stamp())) {
--- a/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/calc/IntegerLessThanNode.java Wed Oct 02 18:40:48 2013 +0200 +++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/calc/IntegerLessThanNode.java Wed Oct 02 21:40:29 2013 +0200 @@ -24,8 +24,8 @@ import com.oracle.graal.api.meta.*; import com.oracle.graal.graph.*; +import com.oracle.graal.graph.spi.*; import com.oracle.graal.nodes.*; -import com.oracle.graal.nodes.spi.*; import com.oracle.graal.nodes.type.*; @NodeInfo(shortName = "<") @@ -70,7 +70,7 @@ } @Override - public LogicNode canonical(CanonicalizerTool tool) { + public Node canonical(CanonicalizerTool tool) { if (x() == y()) { return LogicConstantNode.contradiction(graph()); }
--- a/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/calc/IntegerMulNode.java Wed Oct 02 18:40:48 2013 +0200 +++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/calc/IntegerMulNode.java Wed Oct 02 21:40:29 2013 +0200 @@ -25,6 +25,7 @@ import com.oracle.graal.api.code.*; import com.oracle.graal.api.meta.*; import com.oracle.graal.graph.*; +import com.oracle.graal.graph.spi.*; import com.oracle.graal.nodes.*; import com.oracle.graal.nodes.spi.*; @@ -42,7 +43,7 @@ } @Override - public ValueNode canonical(CanonicalizerTool tool) { + public Node canonical(CanonicalizerTool tool) { if (x().isConstant() && !y().isConstant()) { return graph().unique(new IntegerMulNode(kind(), y(), x())); }
--- a/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/calc/IntegerRemNode.java Wed Oct 02 18:40:48 2013 +0200 +++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/calc/IntegerRemNode.java Wed Oct 02 21:40:29 2013 +0200 @@ -25,6 +25,7 @@ import com.oracle.graal.api.code.*; import com.oracle.graal.api.meta.*; import com.oracle.graal.graph.*; +import com.oracle.graal.graph.spi.*; import com.oracle.graal.nodes.*; import com.oracle.graal.nodes.spi.*; import com.oracle.graal.nodes.type.*; @@ -37,7 +38,7 @@ } @Override - public ValueNode canonical(CanonicalizerTool tool) { + public Node canonical(CanonicalizerTool tool) { if (x().isConstant() && y().isConstant()) { long yConst = y().asConstant().asLong(); if (yConst == 0) {
--- a/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/calc/IntegerSubNode.java Wed Oct 02 18:40:48 2013 +0200 +++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/calc/IntegerSubNode.java Wed Oct 02 21:40:29 2013 +0200 @@ -24,6 +24,7 @@ import com.oracle.graal.api.meta.*; import com.oracle.graal.graph.*; +import com.oracle.graal.graph.spi.*; import com.oracle.graal.nodes.*; import com.oracle.graal.nodes.spi.*; import com.oracle.graal.nodes.type.*; @@ -47,7 +48,7 @@ } @Override - public ValueNode canonical(CanonicalizerTool tool) { + public Node canonical(CanonicalizerTool tool) { if (x() == y()) { return ConstantNode.forIntegerKind(kind(), 0, graph()); }
--- a/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/calc/IntegerTestNode.java Wed Oct 02 18:40:48 2013 +0200 +++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/calc/IntegerTestNode.java Wed Oct 02 21:40:29 2013 +0200 @@ -22,6 +22,8 @@ */ package com.oracle.graal.nodes.calc; +import com.oracle.graal.graph.*; +import com.oracle.graal.graph.spi.*; import com.oracle.graal.nodes.*; import com.oracle.graal.nodes.spi.*; import com.oracle.graal.nodes.type.*; @@ -61,7 +63,7 @@ } @Override - public LogicNode canonical(CanonicalizerTool tool) { + public Node canonical(CanonicalizerTool tool) { if (x().isConstant() && y().isConstant()) { return LogicConstantNode.forBoolean((x().asConstant().asLong() & y().asConstant().asLong()) == 0, graph()); }
--- a/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/calc/IsNullNode.java Wed Oct 02 18:40:48 2013 +0200 +++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/calc/IsNullNode.java Wed Oct 02 21:40:29 2013 +0200 @@ -23,6 +23,8 @@ package com.oracle.graal.nodes.calc; import com.oracle.graal.api.meta.*; +import com.oracle.graal.graph.*; +import com.oracle.graal.graph.spi.*; import com.oracle.graal.nodes.*; import com.oracle.graal.nodes.spi.*; import com.oracle.graal.nodes.type.*; @@ -60,7 +62,7 @@ } @Override - public LogicNode canonical(CanonicalizerTool tool) { + public Node canonical(CanonicalizerTool tool) { Constant constant = object().asConstant(); if (constant != null) { assert constant.getKind() == Kind.Object;
--- a/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/calc/LeftShiftNode.java Wed Oct 02 18:40:48 2013 +0200 +++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/calc/LeftShiftNode.java Wed Oct 02 21:40:29 2013 +0200 @@ -24,6 +24,7 @@ import com.oracle.graal.api.meta.*; import com.oracle.graal.graph.*; +import com.oracle.graal.graph.spi.*; import com.oracle.graal.nodes.*; import com.oracle.graal.nodes.spi.*; import com.oracle.graal.nodes.type.*; @@ -52,7 +53,7 @@ } @Override - public ValueNode canonical(CanonicalizerTool tool) { + public Node canonical(CanonicalizerTool tool) { if (x().isConstant() && y().isConstant()) { return ConstantNode.forPrimitive(evalConst(x().asConstant(), y().asConstant()), graph()); } else if (y().isConstant()) {
--- a/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/calc/NegateNode.java Wed Oct 02 18:40:48 2013 +0200 +++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/calc/NegateNode.java Wed Oct 02 21:40:29 2013 +0200 @@ -24,6 +24,7 @@ import com.oracle.graal.api.meta.*; import com.oracle.graal.graph.*; +import com.oracle.graal.graph.spi.*; import com.oracle.graal.nodes.*; import com.oracle.graal.nodes.spi.*; import com.oracle.graal.nodes.type.*; @@ -71,7 +72,7 @@ } @Override - public ValueNode canonical(CanonicalizerTool tool) { + public Node canonical(CanonicalizerTool tool) { if (x().isConstant()) { return ConstantNode.forPrimitive(evalConst(x.asConstant()), graph()); }
--- a/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/calc/NotNode.java Wed Oct 02 18:40:48 2013 +0200 +++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/calc/NotNode.java Wed Oct 02 21:40:29 2013 +0200 @@ -23,6 +23,8 @@ package com.oracle.graal.nodes.calc; import com.oracle.graal.api.meta.*; +import com.oracle.graal.graph.*; +import com.oracle.graal.graph.spi.*; import com.oracle.graal.nodes.*; import com.oracle.graal.nodes.spi.*; import com.oracle.graal.nodes.type.*; @@ -61,7 +63,7 @@ } @Override - public ValueNode canonical(CanonicalizerTool tool) { + public Node canonical(CanonicalizerTool tool) { if (x().isConstant()) { return ConstantNode.forPrimitive(evalConst(x().asConstant()), graph()); }
--- a/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/calc/ObjectEqualsNode.java Wed Oct 02 18:40:48 2013 +0200 +++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/calc/ObjectEqualsNode.java Wed Oct 02 21:40:29 2013 +0200 @@ -24,6 +24,7 @@ import com.oracle.graal.api.meta.*; import com.oracle.graal.graph.*; +import com.oracle.graal.graph.spi.*; import com.oracle.graal.nodes.*; import com.oracle.graal.nodes.spi.*; import com.oracle.graal.nodes.type.*; @@ -54,7 +55,7 @@ } @Override - public LogicNode canonical(CanonicalizerTool tool) { + public Node canonical(CanonicalizerTool tool) { if (x() == y()) { return LogicConstantNode.tautology(graph()); }
--- a/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/calc/OrNode.java Wed Oct 02 18:40:48 2013 +0200 +++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/calc/OrNode.java Wed Oct 02 21:40:29 2013 +0200 @@ -24,6 +24,7 @@ import com.oracle.graal.api.meta.*; import com.oracle.graal.graph.*; +import com.oracle.graal.graph.spi.*; import com.oracle.graal.nodes.*; import com.oracle.graal.nodes.spi.*; import com.oracle.graal.nodes.type.*; @@ -47,7 +48,7 @@ } @Override - public ValueNode canonical(CanonicalizerTool tool) { + public Node canonical(CanonicalizerTool tool) { if (x() == y()) { return x(); }
--- a/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/calc/RightShiftNode.java Wed Oct 02 18:40:48 2013 +0200 +++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/calc/RightShiftNode.java Wed Oct 02 21:40:29 2013 +0200 @@ -24,6 +24,7 @@ import com.oracle.graal.api.meta.*; import com.oracle.graal.graph.*; +import com.oracle.graal.graph.spi.*; import com.oracle.graal.nodes.*; import com.oracle.graal.nodes.spi.*; import com.oracle.graal.nodes.type.*; @@ -47,7 +48,7 @@ } @Override - public ValueNode canonical(CanonicalizerTool tool) { + public Node canonical(CanonicalizerTool tool) { if (x().stamp() instanceof IntegerStamp && ((IntegerStamp) x().stamp()).isPositive()) { return graph().unique(new UnsignedRightShiftNode(kind(), x(), y())); }
--- a/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/calc/UnsignedDivNode.java Wed Oct 02 18:40:48 2013 +0200 +++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/calc/UnsignedDivNode.java Wed Oct 02 21:40:29 2013 +0200 @@ -25,6 +25,7 @@ import com.oracle.graal.api.code.*; import com.oracle.graal.api.meta.*; import com.oracle.graal.graph.*; +import com.oracle.graal.graph.spi.*; import com.oracle.graal.nodes.*; import com.oracle.graal.nodes.spi.*; import com.oracle.graal.nodes.type.*; @@ -37,7 +38,7 @@ } @Override - public ValueNode canonical(CanonicalizerTool tool) { + public Node canonical(CanonicalizerTool tool) { if (x().isConstant() && y().isConstant()) { long yConst = y().asConstant().asLong(); if (yConst == 0) {
--- a/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/calc/UnsignedRemNode.java Wed Oct 02 18:40:48 2013 +0200 +++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/calc/UnsignedRemNode.java Wed Oct 02 21:40:29 2013 +0200 @@ -25,6 +25,7 @@ import com.oracle.graal.api.code.*; import com.oracle.graal.api.meta.*; import com.oracle.graal.graph.*; +import com.oracle.graal.graph.spi.*; import com.oracle.graal.nodes.*; import com.oracle.graal.nodes.spi.*; import com.oracle.graal.nodes.type.*; @@ -37,7 +38,7 @@ } @Override - public ValueNode canonical(CanonicalizerTool tool) { + public Node canonical(CanonicalizerTool tool) { if (x().isConstant() && y().isConstant()) { long yConst = y().asConstant().asLong(); if (yConst == 0) {
--- a/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/calc/UnsignedRightShiftNode.java Wed Oct 02 18:40:48 2013 +0200 +++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/calc/UnsignedRightShiftNode.java Wed Oct 02 21:40:29 2013 +0200 @@ -24,6 +24,7 @@ import com.oracle.graal.api.meta.*; import com.oracle.graal.graph.*; +import com.oracle.graal.graph.spi.*; import com.oracle.graal.nodes.*; import com.oracle.graal.nodes.spi.*; import com.oracle.graal.nodes.type.*; @@ -52,7 +53,7 @@ } @Override - public ValueNode canonical(CanonicalizerTool tool) { + public Node canonical(CanonicalizerTool tool) { if (x().isConstant() && y().isConstant()) { return ConstantNode.forPrimitive(evalConst(x().asConstant(), y().asConstant()), graph()); } else if (y().isConstant()) {
--- a/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/calc/XorNode.java Wed Oct 02 18:40:48 2013 +0200 +++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/calc/XorNode.java Wed Oct 02 21:40:29 2013 +0200 @@ -24,6 +24,7 @@ import com.oracle.graal.api.meta.*; import com.oracle.graal.graph.*; +import com.oracle.graal.graph.spi.*; import com.oracle.graal.nodes.*; import com.oracle.graal.nodes.spi.*; import com.oracle.graal.nodes.type.*; @@ -47,7 +48,7 @@ } @Override - public ValueNode canonical(CanonicalizerTool tool) { + public Node canonical(CanonicalizerTool tool) { if (x() == y()) { return ConstantNode.forIntegerKind(kind(), 0, graph()); }
--- a/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/debug/SurvivingCounterNode.java Wed Oct 02 18:40:48 2013 +0200 +++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/debug/SurvivingCounterNode.java Wed Oct 02 21:40:29 2013 +0200 @@ -22,6 +22,7 @@ */ package com.oracle.graal.nodes.debug; +import com.oracle.graal.graph.spi.*; import com.oracle.graal.nodes.*; import com.oracle.graal.nodes.calc.*; import com.oracle.graal.nodes.spi.*;
--- a/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/extended/AddLocationNode.java Wed Oct 02 18:40:48 2013 +0200 +++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/extended/AddLocationNode.java Wed Oct 02 21:40:29 2013 +0200 @@ -24,6 +24,7 @@ import com.oracle.graal.api.meta.*; import com.oracle.graal.graph.*; +import com.oracle.graal.graph.spi.*; import com.oracle.graal.nodes.*; import com.oracle.graal.nodes.calc.*; import com.oracle.graal.nodes.spi.*; @@ -69,7 +70,7 @@ } @Override - public ValueNode canonical(CanonicalizerTool tool) { + public Node canonical(CanonicalizerTool tool) { if (x instanceof ConstantLocationNode) { return canonical((ConstantLocationNode) x, getY()); }
--- a/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/extended/BoxNode.java Wed Oct 02 18:40:48 2013 +0200 +++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/extended/BoxNode.java Wed Oct 02 21:40:29 2013 +0200 @@ -23,6 +23,8 @@ package com.oracle.graal.nodes.extended; import com.oracle.graal.api.meta.*; +import com.oracle.graal.graph.*; +import com.oracle.graal.graph.spi.*; import com.oracle.graal.nodes.*; import com.oracle.graal.nodes.calc.*; import com.oracle.graal.nodes.spi.*; @@ -58,7 +60,7 @@ } @Override - public ValueNode canonical(CanonicalizerTool tool) { + public Node canonical(CanonicalizerTool tool) { /* * Constant values are not canonicalized into their constant boxing objects because this * would mean that the information that they came from a valueOf is lost.
--- a/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/extended/BranchProbabilityNode.java Wed Oct 02 18:40:48 2013 +0200 +++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/extended/BranchProbabilityNode.java Wed Oct 02 21:40:29 2013 +0200 @@ -23,6 +23,7 @@ package com.oracle.graal.nodes.extended; import com.oracle.graal.graph.*; +import com.oracle.graal.graph.spi.*; import com.oracle.graal.nodes.*; import com.oracle.graal.nodes.calc.*; import com.oracle.graal.nodes.spi.*; @@ -64,7 +65,7 @@ } @Override - public ValueNode canonical(CanonicalizerTool tool) { + public Node canonical(CanonicalizerTool tool) { if (probability.isConstant()) { double probabilityValue = probability.asConstant().asDouble(); if (probabilityValue < 0.0) {
--- a/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/extended/FloatingReadNode.java Wed Oct 02 18:40:48 2013 +0200 +++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/extended/FloatingReadNode.java Wed Oct 02 21:40:29 2013 +0200 @@ -24,6 +24,7 @@ import com.oracle.graal.api.meta.*; import com.oracle.graal.graph.*; +import com.oracle.graal.graph.spi.*; import com.oracle.graal.nodes.*; import com.oracle.graal.nodes.PhiNode.PhiType; import com.oracle.graal.nodes.spi.*; @@ -66,7 +67,7 @@ } @Override - public ValueNode canonical(CanonicalizerTool tool) { + public Node canonical(CanonicalizerTool tool) { return ReadNode.canonicalizeRead(this, location(), object(), tool, isCompressible()); }
--- a/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/extended/IndexedLocationNode.java Wed Oct 02 18:40:48 2013 +0200 +++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/extended/IndexedLocationNode.java Wed Oct 02 21:40:29 2013 +0200 @@ -24,6 +24,7 @@ import com.oracle.graal.api.meta.*; import com.oracle.graal.graph.*; +import com.oracle.graal.graph.spi.*; import com.oracle.graal.nodes.*; import com.oracle.graal.nodes.spi.*; import com.oracle.graal.nodes.type.*; @@ -85,7 +86,7 @@ } @Override - public ValueNode canonical(CanonicalizerTool tool) { + public Node canonical(CanonicalizerTool tool) { if (index == null || indexScaling == 0) { return ConstantLocationNode.create(getLocationIdentity(), getValueKind(), displacement, graph()); } else if (index.isConstant()) {
--- a/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/extended/IntegerSwitchNode.java Wed Oct 02 18:40:48 2013 +0200 +++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/extended/IntegerSwitchNode.java Wed Oct 02 21:40:29 2013 +0200 @@ -25,6 +25,7 @@ import java.util.*; import com.oracle.graal.api.meta.*; +import com.oracle.graal.graph.spi.*; import com.oracle.graal.nodes.*; import com.oracle.graal.nodes.spi.*; import com.oracle.graal.nodes.type.*;
--- a/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/extended/LoadHubNode.java Wed Oct 02 18:40:48 2013 +0200 +++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/extended/LoadHubNode.java Wed Oct 02 21:40:29 2013 +0200 @@ -24,6 +24,8 @@ import com.oracle.graal.api.meta.*; import com.oracle.graal.api.meta.ResolvedJavaType.Representation; +import com.oracle.graal.graph.*; +import com.oracle.graal.graph.spi.*; import com.oracle.graal.nodes.*; import com.oracle.graal.nodes.spi.*; import com.oracle.graal.nodes.type.*; @@ -65,7 +67,7 @@ } @Override - public ValueNode canonical(CanonicalizerTool tool) { + public Node canonical(CanonicalizerTool tool) { MetaAccessProvider runtime = tool.runtime(); if (runtime != null && object.stamp() instanceof ObjectStamp) { ObjectStamp stamp = (ObjectStamp) object.stamp();
--- a/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/extended/ReadNode.java Wed Oct 02 18:40:48 2013 +0200 +++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/extended/ReadNode.java Wed Oct 02 21:40:29 2013 +0200 @@ -23,6 +23,8 @@ package com.oracle.graal.nodes.extended; import com.oracle.graal.api.meta.*; +import com.oracle.graal.graph.*; +import com.oracle.graal.graph.spi.*; import com.oracle.graal.nodes.*; import com.oracle.graal.nodes.spi.*; import com.oracle.graal.nodes.type.*; @@ -60,7 +62,7 @@ } @Override - public ValueNode canonical(CanonicalizerTool tool) { + public Node canonical(CanonicalizerTool tool) { return canonicalizeRead(this, location(), object(), tool, isCompressible()); }
--- a/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/extended/SnippetLocationNode.java Wed Oct 02 18:40:48 2013 +0200 +++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/extended/SnippetLocationNode.java Wed Oct 02 21:40:29 2013 +0200 @@ -26,6 +26,7 @@ import com.oracle.graal.api.meta.*; import com.oracle.graal.graph.*; +import com.oracle.graal.graph.spi.*; import com.oracle.graal.nodes.*; import com.oracle.graal.nodes.spi.*; import com.oracle.graal.nodes.type.*; @@ -80,7 +81,7 @@ } @Override - public ValueNode canonical(CanonicalizerTool tool) { + public Node canonical(CanonicalizerTool tool) { if (valueKind.isConstant() && locationIdentity.isConstant() && displacement.isConstant() && (indexScaling == null || indexScaling.isConstant())) { Kind constKind = (Kind) valueKind.asConstant().asObject(); LocationIdentity constLocation = (LocationIdentity) locationIdentity.asConstant().asObject();
--- a/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/extended/UnboxNode.java Wed Oct 02 18:40:48 2013 +0200 +++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/extended/UnboxNode.java Wed Oct 02 21:40:29 2013 +0200 @@ -23,6 +23,8 @@ package com.oracle.graal.nodes.extended; import com.oracle.graal.api.meta.*; +import com.oracle.graal.graph.*; +import com.oracle.graal.graph.spi.*; import com.oracle.graal.nodes.*; import com.oracle.graal.nodes.calc.*; import com.oracle.graal.nodes.spi.*; @@ -61,7 +63,7 @@ } @Override - public ValueNode canonical(CanonicalizerTool tool) { + public Node canonical(CanonicalizerTool tool) { if (value.isConstant()) { Constant constant = value.asConstant(); Object o = constant.asObject();
--- a/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/extended/UnsafeAccessNode.java Wed Oct 02 18:40:48 2013 +0200 +++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/extended/UnsafeAccessNode.java Wed Oct 02 21:40:29 2013 +0200 @@ -23,8 +23,9 @@ package com.oracle.graal.nodes.extended; import com.oracle.graal.api.meta.*; +import com.oracle.graal.graph.*; +import com.oracle.graal.graph.spi.*; import com.oracle.graal.nodes.*; -import com.oracle.graal.nodes.spi.*; import com.oracle.graal.nodes.type.*; public abstract class UnsafeAccessNode extends FixedWithNextNode implements Canonicalizable { @@ -60,7 +61,7 @@ } @Override - public ValueNode canonical(CanonicalizerTool tool) { + public Node canonical(CanonicalizerTool tool) { if (offset().isConstant()) { long constantOffset = offset().asConstant().asLong();
--- a/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/extended/UnsafeCastNode.java Wed Oct 02 18:40:48 2013 +0200 +++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/extended/UnsafeCastNode.java Wed Oct 02 21:40:29 2013 +0200 @@ -24,6 +24,7 @@ import com.oracle.graal.api.meta.*; import com.oracle.graal.graph.*; +import com.oracle.graal.graph.spi.*; import com.oracle.graal.nodes.*; import com.oracle.graal.nodes.spi.*; import com.oracle.graal.nodes.type.*; @@ -58,7 +59,7 @@ } @Override - public ValueNode canonical(CanonicalizerTool tool) { + public Node canonical(CanonicalizerTool tool) { assert kind() == Kind.Object && object.kind() == Kind.Object; ObjectStamp my = (ObjectStamp) stamp();
--- a/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/extended/ValueAnchorNode.java Wed Oct 02 18:40:48 2013 +0200 +++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/extended/ValueAnchorNode.java Wed Oct 02 21:40:29 2013 +0200 @@ -23,6 +23,7 @@ package com.oracle.graal.nodes.extended; import com.oracle.graal.graph.*; +import com.oracle.graal.graph.spi.*; import com.oracle.graal.nodes.*; import com.oracle.graal.nodes.spi.*; import com.oracle.graal.nodes.type.*; @@ -49,7 +50,7 @@ } @Override - public ValueNode canonical(CanonicalizerTool tool) { + public Node canonical(CanonicalizerTool tool) { if (anchored != null && !anchored.isConstant() && !(anchored instanceof FixedNode)) { // Found entry that needs this anchor. return this;
--- a/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/java/AbstractNewArrayNode.java Wed Oct 02 18:40:48 2013 +0200 +++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/java/AbstractNewArrayNode.java Wed Oct 02 21:40:29 2013 +0200 @@ -22,6 +22,8 @@ */ package com.oracle.graal.nodes.java; +import com.oracle.graal.graph.*; +import com.oracle.graal.graph.spi.*; import com.oracle.graal.nodes.*; import com.oracle.graal.nodes.spi.*; import com.oracle.graal.nodes.type.*; @@ -75,7 +77,7 @@ } @Override - public ValueNode canonical(CanonicalizerTool tool) { + public Node canonical(CanonicalizerTool tool) { if (usages().isEmpty()) { Stamp stamp = length.stamp(); if (stamp instanceof IntegerStamp && ((IntegerStamp) stamp).isPositive()) {
--- a/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/java/ArrayLengthNode.java Wed Oct 02 18:40:48 2013 +0200 +++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/java/ArrayLengthNode.java Wed Oct 02 21:40:29 2013 +0200 @@ -23,6 +23,8 @@ package com.oracle.graal.nodes.java; import com.oracle.graal.api.meta.*; +import com.oracle.graal.graph.*; +import com.oracle.graal.graph.spi.*; import com.oracle.graal.nodes.*; import com.oracle.graal.nodes.spi.*; import com.oracle.graal.nodes.type.*; @@ -44,7 +46,7 @@ } @Override - public ValueNode canonical(CanonicalizerTool tool) { + public Node canonical(CanonicalizerTool tool) { ValueNode length = readArrayLength(array(), tool.runtime()); if (length != null) { return length;
--- a/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/java/CheckCastDynamicNode.java Wed Oct 02 18:40:48 2013 +0200 +++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/java/CheckCastDynamicNode.java Wed Oct 02 21:40:29 2013 +0200 @@ -23,6 +23,8 @@ package com.oracle.graal.nodes.java; import com.oracle.graal.api.meta.*; +import com.oracle.graal.graph.*; +import com.oracle.graal.graph.spi.*; import com.oracle.graal.nodes.*; import com.oracle.graal.nodes.spi.*; import com.oracle.graal.nodes.type.*; @@ -68,7 +70,7 @@ } @Override - public ValueNode canonical(CanonicalizerTool tool) { + public Node canonical(CanonicalizerTool tool) { assert object() != null : this; if (ObjectStamp.isObjectAlwaysNull(object())) {
--- a/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/java/CheckCastNode.java Wed Oct 02 18:40:48 2013 +0200 +++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/java/CheckCastNode.java Wed Oct 02 21:40:29 2013 +0200 @@ -29,6 +29,7 @@ import com.oracle.graal.api.meta.*; import com.oracle.graal.api.meta.ProfilingInfo.TriState; import com.oracle.graal.graph.*; +import com.oracle.graal.graph.spi.*; import com.oracle.graal.nodes.*; import com.oracle.graal.nodes.calc.*; import com.oracle.graal.nodes.spi.*; @@ -135,7 +136,7 @@ } @Override - public ValueNode canonical(CanonicalizerTool tool) { + public Node canonical(CanonicalizerTool tool) { assert object() != null : this; ResolvedJavaType objectType = ObjectStamp.typeOrNull(object());
--- a/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/java/DynamicNewArrayNode.java Wed Oct 02 18:40:48 2013 +0200 +++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/java/DynamicNewArrayNode.java Wed Oct 02 21:40:29 2013 +0200 @@ -25,8 +25,9 @@ import java.lang.reflect.*; import com.oracle.graal.api.meta.*; +import com.oracle.graal.graph.*; +import com.oracle.graal.graph.spi.*; import com.oracle.graal.nodes.*; -import com.oracle.graal.nodes.spi.*; import com.oracle.graal.nodes.type.*; /** @@ -51,7 +52,7 @@ } @Override - public ValueNode canonical(CanonicalizerTool tool) { + public Node canonical(CanonicalizerTool tool) { if (elementType.isConstant()) { Class<?> elementClass = (Class<?>) elementType.asConstant().asObject(); if (elementClass != null && !(elementClass.equals(void.class))) {
--- a/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/java/ExceptionObjectNode.java Wed Oct 02 18:40:48 2013 +0200 +++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/java/ExceptionObjectNode.java Wed Oct 02 21:40:29 2013 +0200 @@ -27,6 +27,7 @@ import com.oracle.graal.api.code.*; import com.oracle.graal.api.meta.*; import com.oracle.graal.graph.*; +import com.oracle.graal.graph.spi.*; import com.oracle.graal.nodes.*; import com.oracle.graal.nodes.extended.*; import com.oracle.graal.nodes.spi.*;
--- a/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/java/InstanceOfDynamicNode.java Wed Oct 02 18:40:48 2013 +0200 +++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/java/InstanceOfDynamicNode.java Wed Oct 02 21:40:29 2013 +0200 @@ -23,6 +23,8 @@ package com.oracle.graal.nodes.java; import com.oracle.graal.api.meta.*; +import com.oracle.graal.graph.*; +import com.oracle.graal.graph.spi.*; import com.oracle.graal.nodes.*; import com.oracle.graal.nodes.spi.*; import com.oracle.graal.nodes.type.*; @@ -55,7 +57,7 @@ } @Override - public LogicNode canonical(CanonicalizerTool tool) { + public Node canonical(CanonicalizerTool tool) { assert object() != null : this; if (mirror().isConstant()) { Class clazz = (Class) mirror().asConstant().asObject();
--- a/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/java/InstanceOfNode.java Wed Oct 02 18:40:48 2013 +0200 +++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/java/InstanceOfNode.java Wed Oct 02 21:40:29 2013 +0200 @@ -23,6 +23,8 @@ package com.oracle.graal.nodes.java; import com.oracle.graal.api.meta.*; +import com.oracle.graal.graph.*; +import com.oracle.graal.graph.spi.*; import com.oracle.graal.nodes.*; import com.oracle.graal.nodes.calc.*; import com.oracle.graal.nodes.spi.*; @@ -56,7 +58,7 @@ } @Override - public LogicNode canonical(CanonicalizerTool tool) { + public Node canonical(CanonicalizerTool tool) { Stamp stamp = object().stamp(); if (!(stamp instanceof ObjectStamp)) { return this;
--- a/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/java/LoadFieldNode.java Wed Oct 02 18:40:48 2013 +0200 +++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/java/LoadFieldNode.java Wed Oct 02 21:40:29 2013 +0200 @@ -27,6 +27,7 @@ import com.oracle.graal.api.meta.*; import com.oracle.graal.graph.*; import com.oracle.graal.graph.iterators.*; +import com.oracle.graal.graph.spi.*; import com.oracle.graal.nodes.*; import com.oracle.graal.nodes.spi.*; import com.oracle.graal.nodes.type.*; @@ -58,7 +59,7 @@ } @Override - public ValueNode canonical(CanonicalizerTool tool) { + public Node canonical(CanonicalizerTool tool) { MetaAccessProvider runtime = tool.runtime(); if (tool.canonicalizeReads() && runtime != null) { ConstantNode constant = asConstant(runtime);
--- a/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/java/MethodCallTargetNode.java Wed Oct 02 18:40:48 2013 +0200 +++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/java/MethodCallTargetNode.java Wed Oct 02 21:40:29 2013 +0200 @@ -26,8 +26,8 @@ import com.oracle.graal.api.meta.*; import com.oracle.graal.graph.*; +import com.oracle.graal.graph.spi.*; import com.oracle.graal.nodes.*; -import com.oracle.graal.nodes.spi.*; import com.oracle.graal.nodes.type.*; public class MethodCallTargetNode extends CallTargetNode implements IterableNodeType, Canonicalizable { @@ -125,7 +125,7 @@ } @Override - public ValueNode canonical(CanonicalizerTool tool) { + public Node canonical(CanonicalizerTool tool) { if (!isStatic()) { ValueNode receiver = receiver(); if (receiver != null && ObjectStamp.isExactType(receiver) && ObjectStamp.typeOrNull(receiver) != null) {
--- a/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/java/NewInstanceNode.java Wed Oct 02 18:40:48 2013 +0200 +++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/java/NewInstanceNode.java Wed Oct 02 21:40:29 2013 +0200 @@ -24,6 +24,7 @@ import com.oracle.graal.api.meta.*; import com.oracle.graal.graph.*; +import com.oracle.graal.graph.spi.*; import com.oracle.graal.nodes.*; import com.oracle.graal.nodes.spi.*; import com.oracle.graal.nodes.type.*; @@ -68,7 +69,7 @@ } @Override - public ValueNode canonical(CanonicalizerTool tool) { + public Node canonical(CanonicalizerTool tool) { if (usages().isEmpty()) { return null; } else {
--- a/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/java/RegisterFinalizerNode.java Wed Oct 02 18:40:48 2013 +0200 +++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/java/RegisterFinalizerNode.java Wed Oct 02 21:40:29 2013 +0200 @@ -24,6 +24,8 @@ import com.oracle.graal.api.code.*; import com.oracle.graal.api.meta.*; +import com.oracle.graal.graph.*; +import com.oracle.graal.graph.spi.*; import com.oracle.graal.nodes.*; import com.oracle.graal.nodes.spi.*; import com.oracle.graal.nodes.type.*; @@ -55,7 +57,7 @@ } @Override - public ValueNode canonical(CanonicalizerTool tool) { + public Node canonical(CanonicalizerTool tool) { if (!(object.stamp() instanceof ObjectStamp)) { return this; }
--- a/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/java/TypeSwitchNode.java Wed Oct 02 18:40:48 2013 +0200 +++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/java/TypeSwitchNode.java Wed Oct 02 21:40:29 2013 +0200 @@ -26,6 +26,7 @@ import com.oracle.graal.api.meta.*; import com.oracle.graal.api.meta.ResolvedJavaType.*; +import com.oracle.graal.graph.spi.*; import com.oracle.graal.nodes.*; import com.oracle.graal.nodes.extended.*; import com.oracle.graal.nodes.spi.*;
--- a/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/spi/Canonicalizable.java Wed Oct 02 18:40:48 2013 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,30 +0,0 @@ -/* - * Copyright (c) 2011, 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; - -import com.oracle.graal.nodes.*; - -public interface Canonicalizable { - - ValueNode canonical(CanonicalizerTool tool); -}
--- a/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/spi/CanonicalizerTool.java Wed Oct 02 18:40:48 2013 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,38 +0,0 @@ -/* - * Copyright (c) 2011, 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; - -import com.oracle.graal.api.code.*; -import com.oracle.graal.api.meta.*; -import com.oracle.graal.graph.*; - -public interface CanonicalizerTool { - - Assumptions assumptions(); - - MetaAccessProvider runtime(); - - boolean canonicalizeReads(); - - void removeIfUnused(Node node); -}
--- a/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/spi/Simplifiable.java Wed Oct 02 18:40:48 2013 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,37 +0,0 @@ -/* - * Copyright (c) 2012, 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 nodes to perform more complicated simplifications, in contrast to - * {@link Canonicalizable}, which supports only replacing the current node. - * - * Implementors of this interface need to be aware that they need to call - * {@link SimplifierTool#addToWorkList(com.oracle.graal.graph.Node)} for each node that might be - * influenced (in terms of simplification and canonicalization) by the actions performed in - * simplify. - */ -public interface Simplifiable { - - void simplify(SimplifierTool tool); -}
--- a/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/spi/SimplifierTool.java Wed Oct 02 18:40:48 2013 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,39 +0,0 @@ -/* - * Copyright (c) 2012, 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; - -import com.oracle.graal.graph.*; -import com.oracle.graal.nodes.*; - -/** - * @see Simplifiable - */ -public interface SimplifierTool extends CanonicalizerTool { - - void deleteBranch(FixedNode branch); - - /** - * Adds a node to the worklist independent of whether it has already been on the worklist. - */ - void addToWorkList(Node node); -}
--- a/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/util/GraphUtil.java Wed Oct 02 18:40:48 2013 +0200 +++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/util/GraphUtil.java Wed Oct 02 21:40:29 2013 +0200 @@ -43,7 +43,7 @@ } }; - public static void killCFG(FixedNode node) { + public static void killCFG(Node node) { assert node.isAlive(); if (node instanceof AbstractEndNode) { // We reached a control flow end. @@ -58,7 +58,7 @@ * while processing one branch. */ for (Node successor : node.successors()) { - killCFG((FixedNode) successor); + killCFG(successor); } } propagateKill(node);
--- a/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/virtual/CommitAllocationNode.java Wed Oct 02 18:40:48 2013 +0200 +++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/virtual/CommitAllocationNode.java Wed Oct 02 21:40:29 2013 +0200 @@ -26,6 +26,7 @@ import com.oracle.graal.api.meta.*; import com.oracle.graal.graph.*; +import com.oracle.graal.graph.spi.*; import com.oracle.graal.nodes.*; import com.oracle.graal.nodes.spi.*; import com.oracle.graal.nodes.type.*;
--- a/graal/com.oracle.graal.phases.common/src/com/oracle/graal/phases/common/CanonicalizerPhase.java Wed Oct 02 18:40:48 2013 +0200 +++ b/graal/com.oracle.graal.phases.common/src/com/oracle/graal/phases/common/CanonicalizerPhase.java Wed Oct 02 21:40:29 2013 +0200 @@ -29,9 +29,9 @@ import com.oracle.graal.debug.*; import com.oracle.graal.graph.*; import com.oracle.graal.graph.Graph.NodeChangedListener; +import com.oracle.graal.graph.spi.*; import com.oracle.graal.nodes.*; import com.oracle.graal.nodes.calc.*; -import com.oracle.graal.nodes.spi.*; import com.oracle.graal.nodes.util.*; import com.oracle.graal.phases.*; import com.oracle.graal.phases.PhasePlan.PhasePosition; @@ -179,13 +179,14 @@ if (node.isAlive()) { METRIC_PROCESSED_NODES.increment(); - if (tryGlobalValueNumbering(node)) { + NodeClass nodeClass = node.getNodeClass(); + if (tryGlobalValueNumbering(node, nodeClass)) { return; } StructuredGraph graph = (StructuredGraph) node.graph(); int mark = graph.getMark(); if (!tryKillUnused(node)) { - if (!tryCanonicalize(node)) { + if (!tryCanonicalize(node, nodeClass)) { if (node instanceof ValueNode) { ValueNode valueNode = (ValueNode) node; boolean improvedStamp = tryInferStamp(valueNode); @@ -194,7 +195,7 @@ performReplacement(valueNode, ConstantNode.forConstant(constant, runtime, valueNode.graph())); } else if (improvedStamp) { // the improved stamp may enable additional canonicalization - tryCanonicalize(valueNode); + tryCanonicalize(valueNode, nodeClass); } } } @@ -214,8 +215,7 @@ return false; } - public static boolean tryGlobalValueNumbering(Node node) { - NodeClass nodeClass = node.getNodeClass(); + public static boolean tryGlobalValueNumbering(Node node, NodeClass nodeClass) { if (nodeClass.valueNumberable() && !nodeClass.isLeafNode()) { Node newNode = node.graph().findDuplicate(node); if (newNode != null) { @@ -230,34 +230,34 @@ return false; } - public boolean tryCanonicalize(final Node node) { - boolean result = baseTryCanonicalize(node); + public boolean tryCanonicalize(final Node node, NodeClass nodeClass) { + boolean result = baseTryCanonicalize(node, nodeClass); if (!result && customCanonicalizer != null && node instanceof ValueNode) { ValueNode valueNode = (ValueNode) node; - ValueNode canonical = customCanonicalizer.canonicalize(valueNode); + Node canonical = customCanonicalizer.canonicalize(valueNode); result = performReplacement(node, canonical); } return result; } - public boolean baseTryCanonicalize(final Node node) { - if (node instanceof Canonicalizable) { - assert !(node instanceof Simplifiable); + public boolean baseTryCanonicalize(final Node node, NodeClass nodeClass) { + if (nodeClass.isCanonicalizable()) { + assert !nodeClass.isSimplifiable(); METRIC_CANONICALIZATION_CONSIDERED_NODES.increment(); return Debug.scope("CanonicalizeNode", node, new Callable<Boolean>() { public Boolean call() { - ValueNode canonical = ((Canonicalizable) node).canonical(tool); + Node canonical = node.canonical(tool); return performReplacement(node, canonical); } }); - } else if (node instanceof Simplifiable) { + } else if (nodeClass.isSimplifiable()) { Debug.log("Canonicalizer: simplifying %s", node); METRIC_SIMPLIFICATION_CONSIDERED_NODES.increment(); Debug.scope("SimplifyNode", node, new Runnable() { public void run() { - ((Simplifiable) node).simplify(tool); + node.simplify(tool); } }); } @@ -280,7 +280,7 @@ // -------------------------------------------- // X: must not happen (checked with assertions) // @formatter:on - private boolean performReplacement(final Node node, ValueNode canonical) { + private boolean performReplacement(final Node node, Node canonical) { if (canonical == node) { Debug.log("Canonicalizer: work on %s", node); return false; @@ -362,7 +362,7 @@ private final class Tool implements SimplifierTool { @Override - public void deleteBranch(FixedNode branch) { + public void deleteBranch(Node branch) { branch.predecessor().replaceFirstSuccessor(branch, null); GraphUtil.killCFG(branch); }
--- a/graal/com.oracle.graal.phases.common/src/com/oracle/graal/phases/common/IterativeConditionalEliminationPhase.java Wed Oct 02 18:40:48 2013 +0200 +++ b/graal/com.oracle.graal.phases.common/src/com/oracle/graal/phases/common/IterativeConditionalEliminationPhase.java Wed Oct 02 21:40:29 2013 +0200 @@ -24,8 +24,8 @@ import com.oracle.graal.api.code.*; import com.oracle.graal.graph.*; +import com.oracle.graal.graph.spi.*; import com.oracle.graal.nodes.*; -import com.oracle.graal.nodes.spi.*; import com.oracle.graal.phases.*; import com.oracle.graal.phases.common.util.*; import com.oracle.graal.phases.tiers.*;
--- a/graal/com.oracle.graal.replacements/src/com/oracle/graal/replacements/nodes/BitCountNode.java Wed Oct 02 18:40:48 2013 +0200 +++ b/graal/com.oracle.graal.replacements/src/com/oracle/graal/replacements/nodes/BitCountNode.java Wed Oct 02 21:40:29 2013 +0200 @@ -25,10 +25,11 @@ import com.oracle.graal.api.meta.*; import com.oracle.graal.compiler.gen.*; import com.oracle.graal.compiler.target.*; +import com.oracle.graal.graph.*; +import com.oracle.graal.graph.spi.*; import com.oracle.graal.lir.*; import com.oracle.graal.nodes.*; import com.oracle.graal.nodes.calc.*; -import com.oracle.graal.nodes.spi.*; import com.oracle.graal.nodes.type.*; public class BitCountNode extends FloatingNode implements LIRGenLowerable, Canonicalizable { @@ -41,7 +42,7 @@ } @Override - public ValueNode canonical(CanonicalizerTool tool) { + public Node canonical(CanonicalizerTool tool) { if (value.isConstant()) { long v = value.asConstant().asLong(); if (value.kind().getStackKind() == Kind.Int) {
--- a/graal/com.oracle.graal.replacements/src/com/oracle/graal/replacements/nodes/BitScanForwardNode.java Wed Oct 02 18:40:48 2013 +0200 +++ b/graal/com.oracle.graal.replacements/src/com/oracle/graal/replacements/nodes/BitScanForwardNode.java Wed Oct 02 21:40:29 2013 +0200 @@ -25,10 +25,11 @@ import com.oracle.graal.api.meta.*; import com.oracle.graal.compiler.gen.*; import com.oracle.graal.compiler.target.*; +import com.oracle.graal.graph.*; +import com.oracle.graal.graph.spi.*; import com.oracle.graal.lir.*; import com.oracle.graal.nodes.*; import com.oracle.graal.nodes.calc.*; -import com.oracle.graal.nodes.spi.*; import com.oracle.graal.nodes.type.*; public class BitScanForwardNode extends FloatingNode implements LIRGenLowerable, Canonicalizable { @@ -41,7 +42,7 @@ } @Override - public ValueNode canonical(CanonicalizerTool tool) { + public Node canonical(CanonicalizerTool tool) { if (value.isConstant()) { long v = value.asConstant().asLong(); if (value.kind().getStackKind() == Kind.Int) {
--- a/graal/com.oracle.graal.replacements/src/com/oracle/graal/replacements/nodes/BitScanReverseNode.java Wed Oct 02 18:40:48 2013 +0200 +++ b/graal/com.oracle.graal.replacements/src/com/oracle/graal/replacements/nodes/BitScanReverseNode.java Wed Oct 02 21:40:29 2013 +0200 @@ -25,10 +25,11 @@ import com.oracle.graal.api.meta.*; import com.oracle.graal.compiler.gen.*; import com.oracle.graal.compiler.target.*; +import com.oracle.graal.graph.*; +import com.oracle.graal.graph.spi.*; import com.oracle.graal.lir.*; import com.oracle.graal.nodes.*; import com.oracle.graal.nodes.calc.*; -import com.oracle.graal.nodes.spi.*; import com.oracle.graal.nodes.type.*; public class BitScanReverseNode extends FloatingNode implements LIRGenLowerable, Canonicalizable { @@ -41,7 +42,7 @@ } @Override - public ValueNode canonical(CanonicalizerTool tool) { + public Node canonical(CanonicalizerTool tool) { if (value.isConstant()) { long v = value.asConstant().asLong(); if (value.kind().getStackKind() == Kind.Int) {
--- a/graal/com.oracle.graal.replacements/src/com/oracle/graal/replacements/nodes/LoadSnippetVarargParameterNode.java Wed Oct 02 18:40:48 2013 +0200 +++ b/graal/com.oracle.graal.replacements/src/com/oracle/graal/replacements/nodes/LoadSnippetVarargParameterNode.java Wed Oct 02 21:40:29 2013 +0200 @@ -22,8 +22,9 @@ */ package com.oracle.graal.replacements.nodes; +import com.oracle.graal.graph.*; +import com.oracle.graal.graph.spi.*; import com.oracle.graal.nodes.*; -import com.oracle.graal.nodes.spi.*; import com.oracle.graal.nodes.type.*; import com.oracle.graal.replacements.Snippet.*; @@ -43,7 +44,7 @@ } @Override - public ValueNode canonical(CanonicalizerTool tool) { + public Node canonical(CanonicalizerTool tool) { if (index.isConstant()) { return locals[index.asConstant().asInt()]; }
--- a/graal/com.oracle.graal.replacements/src/com/oracle/graal/replacements/nodes/MathIntrinsicNode.java Wed Oct 02 18:40:48 2013 +0200 +++ b/graal/com.oracle.graal.replacements/src/com/oracle/graal/replacements/nodes/MathIntrinsicNode.java Wed Oct 02 21:40:29 2013 +0200 @@ -24,6 +24,7 @@ import com.oracle.graal.api.meta.*; import com.oracle.graal.graph.*; +import com.oracle.graal.graph.spi.*; import com.oracle.graal.nodes.*; import com.oracle.graal.nodes.calc.*; import com.oracle.graal.nodes.spi.*; @@ -91,7 +92,7 @@ } @Override - public ValueNode canonical(CanonicalizerTool tool) { + public Node canonical(CanonicalizerTool tool) { if (x().isConstant()) { return ConstantNode.forPrimitive(evalConst(x().asConstant()), graph()); }
--- a/graal/com.oracle.graal.replacements/src/com/oracle/graal/replacements/nodes/PureFunctionMacroNode.java Wed Oct 02 18:40:48 2013 +0200 +++ b/graal/com.oracle.graal.replacements/src/com/oracle/graal/replacements/nodes/PureFunctionMacroNode.java Wed Oct 02 21:40:29 2013 +0200 @@ -23,8 +23,9 @@ package com.oracle.graal.replacements.nodes; import com.oracle.graal.api.meta.*; +import com.oracle.graal.graph.*; +import com.oracle.graal.graph.spi.*; import com.oracle.graal.nodes.*; -import com.oracle.graal.nodes.spi.*; /** * This node class can be used to create {@link MacroNode}s for simple pure functions like @@ -42,7 +43,8 @@ */ protected abstract Constant evaluate(Constant param, MetaAccessProvider metaAccess); - public ValueNode canonical(CanonicalizerTool tool) { + @Override + public Node canonical(CanonicalizerTool tool) { if (usages().isEmpty()) { return null; } else {
--- a/graal/com.oracle.graal.replacements/src/com/oracle/graal/replacements/nodes/ReverseBytesNode.java Wed Oct 02 18:40:48 2013 +0200 +++ b/graal/com.oracle.graal.replacements/src/com/oracle/graal/replacements/nodes/ReverseBytesNode.java Wed Oct 02 21:40:29 2013 +0200 @@ -25,10 +25,11 @@ import com.oracle.graal.api.meta.*; import com.oracle.graal.compiler.gen.*; import com.oracle.graal.compiler.target.*; +import com.oracle.graal.graph.*; +import com.oracle.graal.graph.spi.*; import com.oracle.graal.lir.*; import com.oracle.graal.nodes.*; import com.oracle.graal.nodes.calc.*; -import com.oracle.graal.nodes.spi.*; import com.oracle.graal.nodes.type.*; public class ReverseBytesNode extends FloatingNode implements LIRGenLowerable, Canonicalizable { @@ -42,7 +43,7 @@ } @Override - public ValueNode canonical(CanonicalizerTool tool) { + public Node canonical(CanonicalizerTool tool) { if (value.isConstant()) { long v = value.asConstant().asLong(); if (kind().getStackKind() == Kind.Int) {
--- a/graal/com.oracle.graal.truffle/src/com/oracle/graal/truffle/PartialEvaluator.java Wed Oct 02 18:40:48 2013 +0200 +++ b/graal/com.oracle.graal.truffle/src/com/oracle/graal/truffle/PartialEvaluator.java Wed Oct 02 21:40:29 2013 +0200 @@ -35,6 +35,7 @@ import com.oracle.graal.debug.internal.*; import com.oracle.graal.graph.*; import com.oracle.graal.graph.Node; +import com.oracle.graal.graph.spi.*; import com.oracle.graal.hotspot.*; import com.oracle.graal.hotspot.meta.*; import com.oracle.graal.java.*;
--- a/graal/com.oracle.graal.truffle/src/com/oracle/graal/truffle/TruffleCache.java Wed Oct 02 18:40:48 2013 +0200 +++ b/graal/com.oracle.graal.truffle/src/com/oracle/graal/truffle/TruffleCache.java Wed Oct 02 21:40:29 2013 +0200 @@ -33,6 +33,7 @@ import com.oracle.graal.debug.*; import com.oracle.graal.graph.*; import com.oracle.graal.graph.Node; +import com.oracle.graal.graph.spi.*; import com.oracle.graal.java.*; import com.oracle.graal.nodes.*; import com.oracle.graal.nodes.java.*;
--- a/graal/com.oracle.graal.truffle/src/com/oracle/graal/truffle/nodes/AssumptionNode.java Wed Oct 02 18:40:48 2013 +0200 +++ b/graal/com.oracle.graal.truffle/src/com/oracle/graal/truffle/nodes/AssumptionNode.java Wed Oct 02 21:40:29 2013 +0200 @@ -23,8 +23,8 @@ package com.oracle.graal.truffle.nodes; import com.oracle.graal.api.meta.*; +import com.oracle.graal.graph.spi.*; import com.oracle.graal.nodes.*; -import com.oracle.graal.nodes.spi.*; import com.oracle.graal.replacements.nodes.*; import com.oracle.graal.truffle.*; @@ -39,6 +39,7 @@ return arguments.first(); } + @Override public void simplify(SimplifierTool tool) { ValueNode assumption = getAssumption(); if (tool.assumptions() != null && assumption.isConstant()) {
--- a/graal/com.oracle.graal.truffle/src/com/oracle/graal/truffle/nodes/BailoutNode.java Wed Oct 02 18:40:48 2013 +0200 +++ b/graal/com.oracle.graal.truffle/src/com/oracle/graal/truffle/nodes/BailoutNode.java Wed Oct 02 21:40:29 2013 +0200 @@ -23,8 +23,9 @@ package com.oracle.graal.truffle.nodes; import com.oracle.graal.api.code.*; +import com.oracle.graal.graph.*; +import com.oracle.graal.graph.spi.*; import com.oracle.graal.nodes.*; -import com.oracle.graal.nodes.spi.*; import com.oracle.graal.replacements.nodes.*; public class BailoutNode extends MacroNode implements Canonicalizable { @@ -35,7 +36,7 @@ } @Override - public ValueNode canonical(CanonicalizerTool tool) { + public Node canonical(CanonicalizerTool tool) { ValueNode arg = arguments.get(0); String message = ""; if (arg.isConstant()) {
--- a/graal/com.oracle.graal.truffle/src/com/oracle/graal/truffle/nodes/LoadIndexedFinalNode.java Wed Oct 02 18:40:48 2013 +0200 +++ b/graal/com.oracle.graal.truffle/src/com/oracle/graal/truffle/nodes/LoadIndexedFinalNode.java Wed Oct 02 21:40:29 2013 +0200 @@ -27,6 +27,8 @@ import sun.misc.*; import com.oracle.graal.api.meta.*; +import com.oracle.graal.graph.*; +import com.oracle.graal.graph.spi.*; import com.oracle.graal.nodes.*; import com.oracle.graal.nodes.java.*; import com.oracle.graal.nodes.spi.*; @@ -49,7 +51,7 @@ } @Override - public ValueNode canonical(CanonicalizerTool tool) { + public Node canonical(CanonicalizerTool tool) { if (array().isConstant() && !array().isNullConstant() && index().isConstant()) { Object array = array().asConstant().asObject(); long index = index().asConstant().asLong();
--- a/graal/com.oracle.graal.truffle/src/com/oracle/graal/truffle/nodes/arithmetic/IntegerAddExactNode.java Wed Oct 02 18:40:48 2013 +0200 +++ b/graal/com.oracle.graal.truffle/src/com/oracle/graal/truffle/nodes/arithmetic/IntegerAddExactNode.java Wed Oct 02 21:40:29 2013 +0200 @@ -23,6 +23,8 @@ package com.oracle.graal.truffle.nodes.arithmetic; import com.oracle.graal.api.meta.*; +import com.oracle.graal.graph.*; +import com.oracle.graal.graph.spi.*; import com.oracle.graal.nodes.*; import com.oracle.graal.nodes.calc.*; import com.oracle.graal.nodes.spi.*; @@ -47,7 +49,7 @@ } @Override - public ValueNode canonical(CanonicalizerTool tool) { + public Node canonical(CanonicalizerTool tool) { if (x().isConstant() && !y().isConstant()) { return graph().unique(new IntegerAddExactNode(y(), x())); }
--- a/graal/com.oracle.graal.truffle/src/com/oracle/graal/truffle/nodes/arithmetic/IntegerMulExactNode.java Wed Oct 02 18:40:48 2013 +0200 +++ b/graal/com.oracle.graal.truffle/src/com/oracle/graal/truffle/nodes/arithmetic/IntegerMulExactNode.java Wed Oct 02 21:40:29 2013 +0200 @@ -23,6 +23,8 @@ package com.oracle.graal.truffle.nodes.arithmetic; import com.oracle.graal.api.meta.*; +import com.oracle.graal.graph.*; +import com.oracle.graal.graph.spi.*; import com.oracle.graal.nodes.*; import com.oracle.graal.nodes.calc.*; import com.oracle.graal.nodes.spi.*; @@ -40,7 +42,7 @@ } @Override - public ValueNode canonical(CanonicalizerTool tool) { + public Node canonical(CanonicalizerTool tool) { if (x().isConstant() && !y().isConstant()) { return graph().unique(new IntegerMulExactNode(y(), x())); }
--- a/graal/com.oracle.graal.truffle/src/com/oracle/graal/truffle/nodes/arithmetic/IntegerSubExactNode.java Wed Oct 02 18:40:48 2013 +0200 +++ b/graal/com.oracle.graal.truffle/src/com/oracle/graal/truffle/nodes/arithmetic/IntegerSubExactNode.java Wed Oct 02 21:40:29 2013 +0200 @@ -23,6 +23,8 @@ package com.oracle.graal.truffle.nodes.arithmetic; import com.oracle.graal.api.meta.*; +import com.oracle.graal.graph.*; +import com.oracle.graal.graph.spi.*; import com.oracle.graal.nodes.*; import com.oracle.graal.nodes.calc.*; import com.oracle.graal.nodes.spi.*; @@ -47,7 +49,7 @@ } @Override - public ValueNode canonical(CanonicalizerTool tool) { + public Node canonical(CanonicalizerTool tool) { if (x() == y()) { return ConstantNode.forIntegerKind(kind(), 0, graph()); }
--- a/graal/com.oracle.graal.truffle/src/com/oracle/graal/truffle/nodes/asserts/CompilationConstantNode.java Wed Oct 02 18:40:48 2013 +0200 +++ b/graal/com.oracle.graal.truffle/src/com/oracle/graal/truffle/nodes/asserts/CompilationConstantNode.java Wed Oct 02 21:40:29 2013 +0200 @@ -22,8 +22,9 @@ */ package com.oracle.graal.truffle.nodes.asserts; +import com.oracle.graal.graph.*; +import com.oracle.graal.graph.spi.*; import com.oracle.graal.nodes.*; -import com.oracle.graal.nodes.spi.*; public class CompilationConstantNode extends NeverPartOfCompilationNode implements Canonicalizable { @@ -33,7 +34,7 @@ } @Override - public ValueNode canonical(CanonicalizerTool tool) { + public Node canonical(CanonicalizerTool tool) { if (arguments.get(0).isConstant()) { return arguments.get(0); }
--- a/graal/com.oracle.graal.truffle/src/com/oracle/graal/truffle/nodes/frame/FrameAccessNode.java Wed Oct 02 18:40:48 2013 +0200 +++ b/graal/com.oracle.graal.truffle/src/com/oracle/graal/truffle/nodes/frame/FrameAccessNode.java Wed Oct 02 21:40:29 2013 +0200 @@ -26,6 +26,7 @@ import java.util.*; import com.oracle.graal.api.meta.*; +import com.oracle.graal.graph.spi.*; import com.oracle.graal.nodes.*; import com.oracle.graal.nodes.calc.*; import com.oracle.graal.nodes.java.*;
--- a/graal/com.oracle.graal.truffle/src/com/oracle/graal/truffle/nodes/frame/NewFrameNode.java Wed Oct 02 18:40:48 2013 +0200 +++ b/graal/com.oracle.graal.truffle/src/com/oracle/graal/truffle/nodes/frame/NewFrameNode.java Wed Oct 02 21:40:29 2013 +0200 @@ -27,6 +27,7 @@ import com.oracle.graal.api.meta.*; import com.oracle.graal.api.runtime.*; import com.oracle.graal.graph.*; +import com.oracle.graal.graph.spi.*; import com.oracle.graal.nodes.*; import com.oracle.graal.nodes.java.*; import com.oracle.graal.nodes.spi.*; @@ -205,7 +206,7 @@ } @Override - public ValueNode canonical(CanonicalizerTool tool) { + public Node canonical(CanonicalizerTool tool) { if (usages().isEmpty()) { return null; } else {
--- a/graal/com.oracle.graal.truffle/src/com/oracle/graal/truffle/nodes/typesystem/CustomTypeCheckMacroNode.java Wed Oct 02 18:40:48 2013 +0200 +++ b/graal/com.oracle.graal.truffle/src/com/oracle/graal/truffle/nodes/typesystem/CustomTypeCheckMacroNode.java Wed Oct 02 21:40:29 2013 +0200 @@ -22,9 +22,10 @@ */ package com.oracle.graal.truffle.nodes.typesystem; +import com.oracle.graal.graph.*; +import com.oracle.graal.graph.spi.*; import com.oracle.graal.nodes.*; import com.oracle.graal.nodes.calc.*; -import com.oracle.graal.nodes.spi.*; import com.oracle.graal.truffle.nodes.asserts.*; import com.oracle.truffle.api.*; @@ -44,7 +45,7 @@ } @Override - public ValueNode canonical(CanonicalizerTool tool) { + public Node canonical(CanonicalizerTool tool) { ValueNode customTypeArgument = arguments.get(CUSTOM_TYPE_ARGUMENT_INDEX); if (customTypeArgument.isConstant()) { Object typeToken = customTypeArgument.asConstant().asObject();
--- a/graal/com.oracle.graal.truffle/src/com/oracle/graal/truffle/nodes/typesystem/TypeCastMacroNode.java Wed Oct 02 18:40:48 2013 +0200 +++ b/graal/com.oracle.graal.truffle/src/com/oracle/graal/truffle/nodes/typesystem/TypeCastMacroNode.java Wed Oct 02 21:40:29 2013 +0200 @@ -23,8 +23,9 @@ package com.oracle.graal.truffle.nodes.typesystem; import com.oracle.graal.api.meta.*; +import com.oracle.graal.graph.*; +import com.oracle.graal.graph.spi.*; import com.oracle.graal.nodes.*; -import com.oracle.graal.nodes.spi.*; import com.oracle.graal.truffle.nodes.asserts.*; import com.oracle.truffle.api.*; @@ -46,7 +47,7 @@ } @Override - public ValueNode canonical(CanonicalizerTool tool) { + public Node canonical(CanonicalizerTool tool) { ValueNode classArgument = arguments.get(CLASS_ARGUMENT_INDEX); ValueNode customTypeArgument = arguments.get(CUSTOM_TYPE_ARGUMENT_INDEX); if (classArgument.isConstant() && customTypeArgument.isConstant()) {
--- a/graal/com.oracle.graal.truffle/src/com/oracle/graal/truffle/nodes/typesystem/UnsafeCustomizationMacroNode.java Wed Oct 02 18:40:48 2013 +0200 +++ b/graal/com.oracle.graal.truffle/src/com/oracle/graal/truffle/nodes/typesystem/UnsafeCustomizationMacroNode.java Wed Oct 02 21:40:29 2013 +0200 @@ -22,8 +22,9 @@ */ package com.oracle.graal.truffle.nodes.typesystem; +import com.oracle.graal.graph.*; +import com.oracle.graal.graph.spi.*; import com.oracle.graal.nodes.*; -import com.oracle.graal.nodes.spi.*; import com.oracle.graal.truffle.nodes.asserts.*; import com.oracle.truffle.api.*; @@ -43,7 +44,7 @@ } @Override - public ValueNode canonical(CanonicalizerTool tool) { + public Node canonical(CanonicalizerTool tool) { ValueNode customTypeArgument = this.arguments.get(CUSTOM_TYPE_ARGUMENT_INDEX); ValueNode locationIdentityArgument = this.arguments.get(LOCATION_IDENTITY_ARGUMENT_INDEX); if (customTypeArgument.isConstant() && locationIdentityArgument.isConstant()) {
--- a/graal/com.oracle.graal.virtual/src/com/oracle/graal/virtual/phases/ea/EffectsPhase.java Wed Oct 02 18:40:48 2013 +0200 +++ b/graal/com.oracle.graal.virtual/src/com/oracle/graal/virtual/phases/ea/EffectsPhase.java Wed Oct 02 21:40:29 2013 +0200 @@ -26,8 +26,8 @@ import com.oracle.graal.debug.*; import com.oracle.graal.graph.*; +import com.oracle.graal.graph.spi.*; import com.oracle.graal.nodes.*; -import com.oracle.graal.nodes.spi.*; import com.oracle.graal.phases.*; import com.oracle.graal.phases.common.*; import com.oracle.graal.phases.common.util.*;
--- a/graal/com.oracle.graal.word/src/com/oracle/graal/word/nodes/WordCastNode.java Wed Oct 02 18:40:48 2013 +0200 +++ b/graal/com.oracle.graal.word/src/com/oracle/graal/word/nodes/WordCastNode.java Wed Oct 02 21:40:29 2013 +0200 @@ -23,6 +23,8 @@ package com.oracle.graal.word.nodes; import com.oracle.graal.api.meta.*; +import com.oracle.graal.graph.*; +import com.oracle.graal.graph.spi.*; import com.oracle.graal.nodes.*; import com.oracle.graal.nodes.spi.*; import com.oracle.graal.nodes.type.*; @@ -55,7 +57,8 @@ return input; } - public ValueNode canonical(CanonicalizerTool tool) { + @Override + public Node canonical(CanonicalizerTool tool) { if (usages().count() == 0) { /* If the cast is unused, it can be eliminated. */ return input;
--- a/mx/projects Wed Oct 02 18:40:48 2013 +0200 +++ b/mx/projects Wed Oct 02 21:40:29 2013 +0200 @@ -186,7 +186,7 @@ # graal.graph project@com.oracle.graal.graph@subDir=graal project@com.oracle.graal.graph@sourceDirs=src -project@com.oracle.graal.graph@dependencies=com.oracle.graal.debug +project@com.oracle.graal.graph@dependencies=com.oracle.graal.debug,com.oracle.graal.api.code project@com.oracle.graal.graph@javaCompliance=1.7 project@com.oracle.graal.graph@workingSets=Graal,Graph @@ -297,7 +297,7 @@ # graal.nodes project@com.oracle.graal.nodes@subDir=graal project@com.oracle.graal.nodes@sourceDirs=src -project@com.oracle.graal.nodes@dependencies=com.oracle.graal.graph,com.oracle.graal.api.replacements,com.oracle.graal.api.code +project@com.oracle.graal.nodes@dependencies=com.oracle.graal.graph,com.oracle.graal.api.replacements project@com.oracle.graal.nodes@checkstyle=com.oracle.graal.graph project@com.oracle.graal.nodes@javaCompliance=1.7 project@com.oracle.graal.nodes@workingSets=Graal,Graph