Mercurial > hg > graal-jvmci-8
changeset 22393:bdfd42480dc9
Merge
author | Tom Rodriguez <tom.rodriguez@oracle.com> |
---|---|
date | Tue, 28 Jul 2015 13:19:14 -0700 |
parents | 59a2f85de5c7 (diff) 88b623010537 (current diff) |
children | 528eeeca785e |
files | |
diffstat | 9 files changed, 56 insertions(+), 66 deletions(-) [+] |
line wrap: on
line diff
--- a/graal/com.oracle.graal.debug/src/com/oracle/graal/debug/GraalDebugConfig.java Tue Jul 28 19:58:40 2015 +0200 +++ b/graal/com.oracle.graal.debug/src/com/oracle/graal/debug/GraalDebugConfig.java Tue Jul 28 13:19:14 2015 -0700 @@ -199,8 +199,8 @@ * @return the {@link JavaMethod} represented by {@code context} or null */ public static JavaMethod asJavaMethod(Object context) { - if (context instanceof JavaMethodContex) { - return ((JavaMethodContex) context).asJavaMethod(); + if (context instanceof JavaMethodContext) { + return ((JavaMethodContext) context).asJavaMethod(); } return null; }
--- a/graal/com.oracle.graal.debug/src/com/oracle/graal/debug/JavaMethodContex.java Tue Jul 28 19:58:40 2015 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,33 +0,0 @@ -/* - * Copyright (c) 2015, 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.debug; - -import jdk.internal.jvmci.meta.*; - -/** - * Interface for objects used in Debug {@linkplain Debug#context() context} that can provide a - * {@link JavaMethod}. - */ -public interface JavaMethodContex { - JavaMethod asJavaMethod(); -}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/graal/com.oracle.graal.debug/src/com/oracle/graal/debug/JavaMethodContext.java Tue Jul 28 13:19:14 2015 -0700 @@ -0,0 +1,33 @@ +/* + * Copyright (c) 2015, 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.debug; + +import jdk.internal.jvmci.meta.*; + +/** + * Interface for objects used in Debug {@linkplain Debug#context() context} that can provide a + * {@link JavaMethod}. + */ +public interface JavaMethodContext { + JavaMethod asJavaMethod(); +}
--- a/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/replacements/ObjectCloneSnippets.java Tue Jul 28 19:58:40 2015 +0200 +++ b/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/replacements/ObjectCloneSnippets.java Tue Jul 28 13:19:14 2015 -0700 @@ -57,63 +57,63 @@ } } - @Snippet(removeAllFrameStates = true) + @Snippet public static boolean[] booleanArrayClone(boolean[] src) { boolean[] result = (boolean[]) NewArrayNode.newUninitializedArray(Boolean.TYPE, src.length); ArrayCopyCallNode.disjointArraycopy(src, 0, result, 0, src.length, Kind.Boolean); return result; } - @Snippet(removeAllFrameStates = true) + @Snippet public static byte[] byteArrayClone(byte[] src) { byte[] result = (byte[]) NewArrayNode.newUninitializedArray(Byte.TYPE, src.length); ArrayCopyCallNode.disjointArraycopy(src, 0, result, 0, src.length, Kind.Byte); return result; } - @Snippet(removeAllFrameStates = true) + @Snippet public static short[] shortArrayClone(short[] src) { short[] result = (short[]) NewArrayNode.newUninitializedArray(Short.TYPE, src.length); ArrayCopyCallNode.disjointArraycopy(src, 0, result, 0, src.length, Kind.Short); return result; } - @Snippet(removeAllFrameStates = true) + @Snippet public static char[] charArrayClone(char[] src) { char[] result = (char[]) NewArrayNode.newUninitializedArray(Character.TYPE, src.length); ArrayCopyCallNode.disjointArraycopy(src, 0, result, 0, src.length, Kind.Char); return result; } - @Snippet(removeAllFrameStates = true) + @Snippet public static int[] intArrayClone(int[] src) { int[] result = (int[]) NewArrayNode.newUninitializedArray(Integer.TYPE, src.length); ArrayCopyCallNode.disjointArraycopy(src, 0, result, 0, src.length, Kind.Int); return result; } - @Snippet(removeAllFrameStates = true) + @Snippet public static float[] floatArrayClone(float[] src) { float[] result = (float[]) NewArrayNode.newUninitializedArray(Float.TYPE, src.length); ArrayCopyCallNode.disjointArraycopy(src, 0, result, 0, src.length, Kind.Float); return result; } - @Snippet(removeAllFrameStates = true) + @Snippet public static long[] longArrayClone(long[] src) { long[] result = (long[]) NewArrayNode.newUninitializedArray(Long.TYPE, src.length); ArrayCopyCallNode.disjointArraycopy(src, 0, result, 0, src.length, Kind.Long); return result; } - @Snippet(removeAllFrameStates = true) + @Snippet public static double[] doubleArrayClone(double[] src) { double[] result = (double[]) NewArrayNode.newUninitializedArray(Double.TYPE, src.length); ArrayCopyCallNode.disjointArraycopy(src, 0, result, 0, src.length, Kind.Double); return result; } - @Snippet(removeAllFrameStates = true) + @Snippet public static Object[] objectArrayClone(Object[] src) { /* Since this snippet is lowered early the array must be initialized */ Object[] result = (Object[]) DynamicNewArrayNode.newArray(GraalDirectives.guardingNonNull(src.getClass().getComponentType()), src.length, Kind.Object);
--- a/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/stubs/ForeignCallStub.java Tue Jul 28 19:58:40 2015 +0200 +++ b/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/stubs/ForeignCallStub.java Tue Jul 28 13:19:14 2015 -0700 @@ -113,7 +113,7 @@ return null; } - private class DebugScopeContext implements JavaMethod, JavaMethodContex { + private class DebugScopeContext implements JavaMethod, JavaMethodContext { public JavaMethod asJavaMethod() { return this; }
--- a/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/PiNode.java Tue Jul 28 19:58:40 2015 +0200 +++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/PiNode.java Tue Jul 28 13:19:14 2015 -0700 @@ -111,18 +111,15 @@ return object(); } if (getGuard() != null) { - for (Node use : getGuard().asNode().usages()) { - if (use instanceof PiNode) { - PiNode otherPi = (PiNode) use; - if (object() == otherPi.object() && stamp().equals(otherPi.stamp())) { - /* - * Two PiNodes with the same guard and same result, so return the one with - * the more precise piStamp. - */ - Stamp newStamp = piStamp.join(otherPi.piStamp); - if (newStamp.equals(otherPi.piStamp)) { - return otherPi; - } + for (PiNode otherPi : getGuard().asNode().usages().filter(PiNode.class)) { + if (object() == otherPi.object() && stamp().equals(otherPi.stamp())) { + /* + * Two PiNodes with the same guard and same result, so return the one with the + * more precise piStamp. + */ + Stamp newStamp = piStamp.join(otherPi.piStamp); + if (newStamp.equals(otherPi.piStamp)) { + return otherPi; } } }
--- a/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/StructuredGraph.java Tue Jul 28 19:58:40 2015 +0200 +++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/StructuredGraph.java Tue Jul 28 13:19:14 2015 -0700 @@ -42,7 +42,7 @@ * A graph that contains at least one distinguished node : the {@link #start() start} node. This * node is the start of the control flow of the graph. */ -public class StructuredGraph extends Graph implements JavaMethodContex { +public class StructuredGraph extends Graph implements JavaMethodContext { /** * The different stages of the compilation of a {@link Graph} regarding the status of
--- a/graal/com.oracle.graal.replacements/src/com/oracle/graal/replacements/Snippet.java Tue Jul 28 19:58:40 2015 +0200 +++ b/graal/com.oracle.graal.replacements/src/com/oracle/graal/replacements/Snippet.java Tue Jul 28 13:19:14 2015 -0700 @@ -35,13 +35,6 @@ public @interface Snippet { /** - * Specifies whether all FrameStates within this snippet should always be removed. If this is - * false, FrameStates are only removed if there are no side-effecting instructions in the - * snippet. - */ - boolean removeAllFrameStates() default false; - - /** * Denotes a snippet parameter representing 0 or more arguments that will be bound during * snippet template {@linkplain SnippetTemplate#instantiate instantiation}. During snippet * template creation, its value must be an array whose length specifies the number of arguments
--- a/graal/com.oracle.graal.truffle/src/com/oracle/graal/truffle/TruffleDebugJavaMethod.java Tue Jul 28 19:58:40 2015 +0200 +++ b/graal/com.oracle.graal.truffle/src/com/oracle/graal/truffle/TruffleDebugJavaMethod.java Tue Jul 28 13:19:14 2015 -0700 @@ -31,7 +31,7 @@ * Enables a Truffle compilable to masquerade as a {@link JavaMethod} for use as a context value in * {@linkplain Debug#scope(Object) debug scopes}. */ -public class TruffleDebugJavaMethod implements JavaMethod, JavaMethodContex { +public class TruffleDebugJavaMethod implements JavaMethod, JavaMethodContext { private final RootCallTarget compilable; private static final JavaType declaringClass = new JavaType() {