changeset 22263:7abe84b97eaa

Merge
author Tom Rodriguez <tom.rodriguez@oracle.com>
date Mon, 20 Jul 2015 11:21:28 -0700
parents 71a696ca2862 (current diff) 5c350399111e (diff)
children 97ee41c80b1d
files jvmci/jdk.internal.jvmci.options.processor/src/jdk/internal/jvmci/options/processor/JVMCIJars.java
diffstat 20 files changed, 201 insertions(+), 111 deletions(-) [+]
line wrap: on
line diff
--- a/graal/com.oracle.graal.graphbuilderconf/src/com/oracle/graal/graphbuilderconf/InvocationPlugins.java	Mon Jul 20 11:19:52 2015 -0700
+++ b/graal/com.oracle.graal.graphbuilderconf/src/com/oracle/graal/graphbuilderconf/InvocationPlugins.java	Mon Jul 20 11:21:28 2015 -0700
@@ -311,8 +311,7 @@
                     assert sig[0] == GraphBuilderContext.class;
                     assert sig[1] == ResolvedJavaMethod.class;
                     assert sig[2] == InvocationPlugin.Receiver.class;
-                    Class<?>[] sigTail = Arrays.copyOfRange(sig, 3, sig.length);
-                    assert Arrays.asList(sigTail).stream().allMatch(c -> c == ValueNode.class);
+                    assert Arrays.asList(sig).subList(3, sig.length).stream().allMatch(c -> c == ValueNode.class);
                     while (sigs.size() < sig.length - 2) {
                         sigs.add(null);
                     }
--- a/graal/com.oracle.graal.lir.jtt/src/com/oracle/graal/lir/jtt/StackMoveTest.java	Mon Jul 20 11:19:52 2015 -0700
+++ b/graal/com.oracle.graal.lir.jtt/src/com/oracle/graal/lir/jtt/StackMoveTest.java	Mon Jul 20 11:21:28 2015 -0700
@@ -83,11 +83,11 @@
 
     @Test
     public void runInt() throws Throwable {
-        runTest("testInt", Integer.MIN_VALUE, supply(() -> new int[3]));
+        runTest("testInt", Integer.MIN_VALUE, supply(() -> new int[4]));
         runTest("testInt", -1, supply(() -> new int[4]));
-        runTest("testInt", 0, supply(() -> new int[3]));
-        runTest("testInt", 1, supply(() -> new int[3]));
-        runTest("testInt", Integer.MAX_VALUE, supply(() -> new int[3]));
+        runTest("testInt", 0, supply(() -> new int[4]));
+        runTest("testInt", 1, supply(() -> new int[4]));
+        runTest("testInt", Integer.MAX_VALUE, supply(() -> new int[4]));
     }
 
     /*
--- a/graal/com.oracle.graal.lir.sparc/src/com/oracle/graal/lir/sparc/SPARCLIRInstruction.java	Mon Jul 20 11:19:52 2015 -0700
+++ b/graal/com.oracle.graal.lir.sparc/src/com/oracle/graal/lir/sparc/SPARCLIRInstruction.java	Mon Jul 20 11:21:28 2015 -0700
@@ -101,5 +101,10 @@
                 return new SizeEstimate(instructionSize, 0);
             }
         }
+
+        @Override
+        public String toString() {
+            return "SE[i=" + instructionSize + ", c=" + constantSize + "]";
+        }
     }
 }
--- a/graal/com.oracle.graal.lir.sparc/src/com/oracle/graal/lir/sparc/SPARCMove.java	Mon Jul 20 11:19:52 2015 -0700
+++ b/graal/com.oracle.graal.lir.sparc/src/com/oracle/graal/lir/sparc/SPARCMove.java	Mon Jul 20 11:21:28 2015 -0700
@@ -635,13 +635,13 @@
                     JavaConstant constant) {
         if (constant.isDefaultForKind() || constant.isNull()) {
             SPARCAddress resultAddress = (SPARCAddress) crb.asAddress(result);
-            emitStore(g0.asValue(LIRKind.combine(input)), resultAddress, input.getPlatformKind(), delaySlotLir, null, crb, masm);
+            emitStore(g0.asValue(LIRKind.combine(input)), resultAddress, result.getPlatformKind(), delaySlotLir, null, crb, masm);
         } else {
             try (ScratchRegister sc = masm.getScratchRegister()) {
                 Value scratchRegisterValue = sc.getRegister().asValue(LIRKind.combine(constant));
                 const2reg(crb, masm, scratchRegisterValue, constantTableBase, constant, SPARCDelayedControlTransfer.DUMMY);
                 SPARCAddress resultAddress = (SPARCAddress) crb.asAddress(result);
-                emitStore(scratchRegisterValue, resultAddress, input.getPlatformKind(), delaySlotLir, null, crb, masm);
+                emitStore(scratchRegisterValue, resultAddress, result.getPlatformKind(), delaySlotLir, null, crb, masm);
             }
         }
     }
--- a/graal/com.oracle.graal.lir/src/com/oracle/graal/lir/dfa/ValueSet.java	Mon Jul 20 11:19:52 2015 -0700
+++ b/graal/com.oracle.graal.lir/src/com/oracle/graal/lir/dfa/ValueSet.java	Mon Jul 20 11:21:28 2015 -0700
@@ -150,4 +150,26 @@
     public int hashCode() {
         throw new UnsupportedOperationException();
     }
+
+    @Override
+    public String toString() {
+        StringBuilder sb = new StringBuilder("[");
+        boolean comma = false;
+
+        for (int i = 0; i < values.length; i++) {
+            if (values[i] != null) {
+                if (comma) {
+                    sb.append(", ");
+                } else {
+                    comma = true;
+                }
+
+                sb.append(i);
+                sb.append(": ");
+                sb.append(values[i]);
+            }
+        }
+        sb.append(']');
+        return sb.toString();
+    }
 }
--- a/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/spi/NodeValueMap.java	Mon Jul 20 11:19:52 2015 -0700
+++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/spi/NodeValueMap.java	Mon Jul 20 11:21:28 2015 -0700
@@ -30,15 +30,33 @@
 
 public interface NodeValueMap {
 
-    Value operand(Node object);
+    /**
+     * Returns the operand that has been previously initialized by
+     * {@link #setResult(ValueNode, Value)} with the result of an instruction. It's a code
+     * generation error to ask for the operand of ValueNode that doesn't have one yet.
+     *
+     * @param node A node that produces a result value.
+     */
+    Value operand(Node node);
 
-    boolean hasOperand(Node object);
+    /**
+     * @return {@code true} if there is an {@link Value operand} associated with the {@code node} in
+     *         the current block.
+     */
+    boolean hasOperand(Node node);
 
-    Value setResult(ValueNode x, Value operand);
+    /**
+     * Associates {@code operand} with the {@code node} in the current block.
+     *
+     * @return {@code operand}
+     */
+    Value setResult(ValueNode node, Value operand);
 
     /**
      * Gets the the {@link ValueNode} that produced a {@code value}. If the {@code value} is not
      * associated with a {@link ValueNode} {@code null} is returned.
+     *
+     * This method is intended for debugging purposes only.
      */
     ValueNode valueForOperand(Value value);
 }
--- a/graal/com.oracle.graal.printer/src/com/oracle/graal/printer/CFGPrinter.java	Mon Jul 20 11:19:52 2015 -0700
+++ b/graal/com.oracle.graal.printer/src/com/oracle/graal/printer/CFGPrinter.java	Mon Jul 20 11:21:28 2015 -0700
@@ -455,9 +455,9 @@
                 inst.forEachState(state -> {
                     if (state.hasDebugInfo()) {
                         DebugInfo di = state.debugInfo();
-                        stateString.append(debugInfoToString(di.getBytecodePosition(), di.getReferenceMap(), di.getCalleeSaveInfo()));
+                        stateString.append(debugInfoToString(di.getBytecodePosition(), di.getReferenceMap(), state.getLiveBasePointers(), di.getCalleeSaveInfo()));
                     } else {
-                        stateString.append(debugInfoToString(state.topFrame, null, null));
+                        stateString.append(debugInfoToString(state.topFrame, null, state.getLiveBasePointers(), null));
                     }
                 });
                 if (stateString.length() > 0) {
--- a/graal/com.oracle.graal.printer/src/com/oracle/graal/printer/CompilationPrinter.java	Mon Jul 20 11:19:52 2015 -0700
+++ b/graal/com.oracle.graal.printer/src/com/oracle/graal/printer/CompilationPrinter.java	Mon Jul 20 11:21:28 2015 -0700
@@ -29,6 +29,8 @@
 import jdk.internal.jvmci.debug.*;
 import jdk.internal.jvmci.meta.*;
 
+import com.oracle.graal.lir.dfa.*;
+
 /**
  * Utility for printing compilation related data structures at various compilation phases. The
  * output format is such that it can then be fed to the <a
@@ -112,12 +114,18 @@
     /**
      * Formats given debug info as a multi line string.
      */
-    protected String debugInfoToString(BytecodePosition codePos, ReferenceMap refMap, RegisterSaveLayout calleeSaveInfo) {
+    protected String debugInfoToString(BytecodePosition codePos, ReferenceMap refMap, ValueSet liveBasePointers, RegisterSaveLayout calleeSaveInfo) {
         StringBuilder sb = new StringBuilder();
         if (refMap != null) {
+            sb.append("reference-map: ");
             sb.append(refMap.toString());
             sb.append("\n");
         }
+        if (liveBasePointers != null) {
+            sb.append("live-base-pointers: ");
+            sb.append(liveBasePointers);
+            sb.append("\n");
+        }
 
         if (calleeSaveInfo != null) {
             sb.append("callee-save-info:");
--- a/graal/com.oracle.graal.truffle.test/src/com/oracle/graal/truffle/test/BytecodeInterpreterPartialEvaluationTest.java	Mon Jul 20 11:19:52 2015 -0700
+++ b/graal/com.oracle.graal.truffle.test/src/com/oracle/graal/truffle/test/BytecodeInterpreterPartialEvaluationTest.java	Mon Jul 20 11:21:28 2015 -0700
@@ -52,6 +52,7 @@
         @CompilationFinal private final FrameSlot[] stack;
 
         public Program(String name, byte[] bytecodes, int maxLocals, int maxStack) {
+            super(MockLanguage.class, null, null);
             this.name = name;
             this.bytecodes = bytecodes;
             locals = new FrameSlot[maxLocals];
@@ -438,7 +439,7 @@
         protected final FrameSlot returnSlot;
 
         public InstArrayProgram(String name, Inst[] inst, FrameSlot returnSlot, FrameDescriptor fd) {
-            super(null, fd);
+            super(MockLanguage.class, null, fd);
             this.name = name;
             this.inst = inst;
             this.returnSlot = returnSlot;
--- a/graal/com.oracle.graal.truffle.test/src/com/oracle/graal/truffle/test/ControlFlowExceptionPartialEvaluationTest.java	Mon Jul 20 11:19:52 2015 -0700
+++ b/graal/com.oracle.graal.truffle.test/src/com/oracle/graal/truffle/test/ControlFlowExceptionPartialEvaluationTest.java	Mon Jul 20 11:21:28 2015 -0700
@@ -24,7 +24,9 @@
 
 import org.junit.*;
 
+import com.oracle.graal.truffle.*;
 import com.oracle.graal.truffle.test.nodes.*;
+import com.oracle.truffle.api.*;
 import com.oracle.truffle.api.frame.*;
 import com.oracle.truffle.api.nodes.*;
 
@@ -47,6 +49,21 @@
         assertPartialEvalEquals("constant42", new RootTestNode(fd, "catchSlowPathAndControlFlowException", result));
     }
 
+    @Test
+    public void catchControlFlowExceptionWithLoopExplosion() {
+        FrameDescriptor fd = new FrameDescriptor();
+        AbstractTestNode result = new CatchControlFlowExceptionTestNode(new BlockTestNode(new ThrowControlFlowExceptionTestNode()));
+        assertPartialEvalEquals("constant42", new RootTestNode(fd, "catchControlFlowExceptionWithLoopExplosion", result));
+    }
+
+    @Test
+    public void catchControlFlowExceptionFromCall() {
+        Assume.assumeTrue(TruffleCompilerOptions.TruffleFunctionInlining.getValue());
+        CallTarget callTarget = Truffle.getRuntime().createCallTarget(new RootTestNode(new FrameDescriptor(), "throwControlFlowException", new ThrowControlFlowExceptionTestNode()));
+        AbstractTestNode result = new CatchControlFlowExceptionTestNode(new CallTestNode(callTarget));
+        assertPartialEvalEquals("constant42", new RootTestNode(new FrameDescriptor(), "catchControlFlowExceptionFromCall", result));
+    }
+
     public static class ThrowControlFlowExceptionTestNode extends AbstractTestNode {
         @Override
         public int execute(VirtualFrame frame) {
@@ -94,4 +111,42 @@
             return child.execute(frame);
         }
     }
+
+    public static class BlockTestNode extends AbstractTestNode {
+        @Children private final AbstractTestNode[] statements;
+
+        public BlockTestNode(AbstractTestNode... statements) {
+            this.statements = statements;
+        }
+
+        @Override
+        public int execute(VirtualFrame frame) {
+            return executeSpecial(frame);
+        }
+
+        /*
+         * A statically resolvable method, so that ExplodeLoop annotation is visible during parsing.
+         */
+        @ExplodeLoop
+        private int executeSpecial(VirtualFrame frame) {
+            int result = 0;
+            for (AbstractTestNode statement : statements) {
+                result = statement.execute(frame);
+            }
+            return result;
+        }
+    }
+
+    public static class CallTestNode extends AbstractTestNode {
+        @Child private DirectCallNode callNode;
+
+        public CallTestNode(CallTarget callTarget) {
+            this.callNode = Truffle.getRuntime().createDirectCallNode(callTarget);
+        }
+
+        @Override
+        public int execute(VirtualFrame frame) {
+            return (int) callNode.call(frame, new Object[0]);
+        }
+    }
 }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/graal/com.oracle.graal.truffle.test/src/com/oracle/graal/truffle/test/MockLanguage.java	Mon Jul 20 11:21:28 2015 -0700
@@ -0,0 +1,31 @@
+/*
+ * Copyright (c) 2015, 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.truffle.test;
+
+import com.oracle.truffle.api.TruffleLanguage;
+
+public abstract class MockLanguage extends TruffleLanguage {
+    public MockLanguage(Env env) {
+        super(env);
+    }
+}
--- a/graal/com.oracle.graal.truffle.test/src/com/oracle/graal/truffle/test/nodes/RootTestNode.java	Mon Jul 20 11:19:52 2015 -0700
+++ b/graal/com.oracle.graal.truffle.test/src/com/oracle/graal/truffle/test/nodes/RootTestNode.java	Mon Jul 20 11:21:28 2015 -0700
@@ -22,6 +22,7 @@
  */
 package com.oracle.graal.truffle.test.nodes;
 
+import com.oracle.graal.truffle.test.MockLanguage;
 import com.oracle.truffle.api.frame.*;
 import com.oracle.truffle.api.instrument.*;
 import com.oracle.truffle.api.nodes.*;
@@ -33,7 +34,7 @@
     @Child AbstractTestNode node;
 
     public RootTestNode(FrameDescriptor descriptor, String name, AbstractTestNode node) {
-        super(null, descriptor);
+        super(MockLanguage.class, null, descriptor);
         this.name = name;
         this.node = node;
     }
--- a/graal/com.oracle.graal.truffle/src/com/oracle/graal/truffle/OptimizedOSRLoopNode.java	Mon Jul 20 11:19:52 2015 -0700
+++ b/graal/com.oracle.graal.truffle/src/com/oracle/graal/truffle/OptimizedOSRLoopNode.java	Mon Jul 20 11:21:28 2015 -0700
@@ -183,7 +183,7 @@
         @Child private OptimizedOSRLoopNode loopNode;
 
         public OSRRootNode(OptimizedOSRLoopNode loop) {
-            super(loop.getSourceSection(), loop.getRootNode().getFrameDescriptor());
+            super(TruffleLanguage.class, loop.getSourceSection(), loop.getRootNode().getFrameDescriptor());
             this.loopNode = loop;
         }
 
--- a/graal/com.oracle.graal.truffle/src/com/oracle/graal/truffle/PartialEvaluator.java	Mon Jul 20 11:19:52 2015 -0700
+++ b/graal/com.oracle.graal.truffle/src/com/oracle/graal/truffle/PartialEvaluator.java	Mon Jul 20 11:21:28 2015 -0700
@@ -243,8 +243,10 @@
 
         @Override
         public InlineInfo shouldInlineInvoke(GraphBuilderContext builder, ResolvedJavaMethod original, ValueNode[] arguments, JavaType returnType) {
-            if (invocationPlugins.lookupInvocation(original) != null || loopExplosionPlugin.shouldExplodeLoops(original)) {
+            if (invocationPlugins.lookupInvocation(original) != null) {
                 return InlineInfo.DO_NOT_INLINE_NO_EXCEPTION;
+            } else if (loopExplosionPlugin.shouldExplodeLoops(original)) {
+                return InlineInfo.DO_NOT_INLINE_WITH_EXCEPTION;
             }
             TruffleBoundary truffleBoundary = original.getAnnotation(TruffleBoundary.class);
             if (truffleBoundary != null) {
@@ -255,7 +257,7 @@
             }
 
             if (original.equals(callSiteProxyMethod) || original.equals(callDirectMethod)) {
-                return InlineInfo.DO_NOT_INLINE_NO_EXCEPTION;
+                return InlineInfo.DO_NOT_INLINE_WITH_EXCEPTION;
             }
             if (hasMethodHandleArgument(arguments)) {
                 /*
--- a/graal/com.oracle.graal.truffle/src/com/oracle/graal/truffle/TruffleCompiler.java	Mon Jul 20 11:19:52 2015 -0700
+++ b/graal/com.oracle.graal.truffle/src/com/oracle/graal/truffle/TruffleCompiler.java	Mon Jul 20 11:21:28 2015 -0700
@@ -156,6 +156,11 @@
 
         CompilationResult result = null;
         try (DebugCloseable a = CompilationTime.start(); Scope s = Debug.scope("TruffleGraal.GraalCompiler", graph, providers.getCodeCache()); DebugCloseable c = CompilationMemUse.start()) {
+            SpeculationLog speculationLog = graph.getSpeculationLog();
+            if (speculationLog != null) {
+                speculationLog.collectFailedSpeculations();
+            }
+
             CodeCacheProvider codeCache = providers.getCodeCache();
             CallingConvention cc = getCallingConvention(codeCache, Type.JavaCallee, graph.method(), false);
             CompilationResult compilationResult = new CompilationResult(name);
--- a/jvmci/jdk.internal.jvmci.options.processor/src/jdk/internal/jvmci/options/processor/JVMCIJars.java	Mon Jul 20 11:19:52 2015 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,63 +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 jdk.internal.jvmci.options.processor;
-
-import java.io.*;
-import java.util.*;
-import java.util.stream.*;
-import java.util.zip.*;
-
-public class JVMCIJars implements Iterable<ZipEntry> {
-    private final List<ZipFile> jars = new ArrayList<>(2);
-
-    public JVMCIJars() {
-        String classPath = System.getProperty("java.class.path");
-        for (String e : classPath.split(File.pathSeparator)) {
-            if (e.endsWith(File.separatorChar + "graal.jar") || e.endsWith(File.separatorChar + "graal-truffle.jar")) {
-                try {
-                    jars.add(new ZipFile(e));
-                } catch (IOException ioe) {
-                    throw new InternalError(ioe);
-                }
-            }
-        }
-        if (jars.size() != 2) {
-            throw new InternalError("Could not find graal.jar or graal-truffle.jar on class path: " + classPath);
-        }
-    }
-
-    public Iterator<ZipEntry> iterator() {
-        Stream<ZipEntry> entries = jars.stream().flatMap(ZipFile::stream);
-        return entries.iterator();
-    }
-
-    public InputStream getInputStream(String classFilePath) throws IOException {
-        for (ZipFile jar : jars) {
-            ZipEntry entry = jar.getEntry(classFilePath);
-            if (entry != null) {
-                return jar.getInputStream(entry);
-            }
-        }
-        return null;
-    }
-}
--- a/mx.graal/suite.py	Mon Jul 20 11:19:52 2015 -0700
+++ b/mx.graal/suite.py	Mon Jul 20 11:21:28 2015 -0700
@@ -95,27 +95,27 @@
     # ------------- Truffle -------------
 
     "TRUFFLE" : {
-      "path" : "lib/truffle-0.8-SNAPSHOT.jar",
+      "path" : "lib/truffle-0.9-SNAPSHOT.jar",
       "urls" : [
-        "http://lafo.ssw.uni-linz.ac.at/nexus/content/repositories/snapshots/com/oracle/truffle-api/0.8-397164a68abffa1e934a581ead91cd882eaae954-SNAPSHOT/truffle-api-0.8-397164a68abffa1e934a581ead91cd882eaae954-20150713.145252-1.jar",
+        "http://lafo.ssw.uni-linz.ac.at/nexus/content/repositories/snapshots/com/oracle/truffle-api/0.9-5bc7f7b867abc0cc464205d8884d6a20e21c803b-SNAPSHOT/truffle-api-0.9-5bc7f7b867abc0cc464205d8884d6a20e21c803b-20150718.160556-1.jar",
       ],
-      "sha1" : "969c49cb04fb7acfbd20892579847ca8d80f4235",
+      "sha1" : "5b13fb55d78d9bd00efbd9b8ea5583fe32259c4a",
     },
     "TRUFFLE_DSL_PROCESSOR" : {
-      "path" : "lib/truffle-dsl-processor-0.8-SNAPSHOT.jar",
+      "path" : "lib/truffle-dsl-processor-0.9-SNAPSHOT.jar",
       "urls" : [
-        "http://lafo.ssw.uni-linz.ac.at/nexus/content/repositories/snapshots/com/oracle/truffle-dsl-processor/0.8-397164a68abffa1e934a581ead91cd882eaae954-SNAPSHOT/truffle-dsl-processor-0.8-397164a68abffa1e934a581ead91cd882eaae954-20150713.145255-1.jar"
+        "http://lafo.ssw.uni-linz.ac.at/nexus/content/repositories/snapshots/com/oracle/truffle-dsl-processor/0.9-5bc7f7b867abc0cc464205d8884d6a20e21c803b-SNAPSHOT/truffle-dsl-processor-0.9-5bc7f7b867abc0cc464205d8884d6a20e21c803b-20150718.160558-1.jar"
       ],
-      "sha1" : "39ddec960e0e463284b1cc6783cda11dcc80f939",
+      "sha1" : "92e7d01277bad6165d3f263e05215dd3477a20f4",
       "annotationProcessor" : "true",
       "dependencies" : ["TRUFFLE"]
     },
     "TRUFFLE_SL" : {
-      "path" : "lib/truffle-sl-0.8-SNAPSHOT.jar",
+      "path" : "lib/truffle-sl-0.9-SNAPSHOT.jar",
       "urls" : [
-        "http://lafo.ssw.uni-linz.ac.at/nexus/content/repositories/snapshots/com/oracle/truffle-sl/0.8-397164a68abffa1e934a581ead91cd882eaae954-SNAPSHOT/truffle-sl-0.8-397164a68abffa1e934a581ead91cd882eaae954-20150713.145259-1.jar",
+        "http://lafo.ssw.uni-linz.ac.at/nexus/content/repositories/snapshots/com/oracle/truffle-sl/0.9-5bc7f7b867abc0cc464205d8884d6a20e21c803b-SNAPSHOT/truffle-sl-0.9-5bc7f7b867abc0cc464205d8884d6a20e21c803b-20150718.160603-1.jar",
       ],
-      "sha1" : "9ffddd8f3659955bb34a018a540603c2391d2115",
+      "sha1" : "3ca368465d187b67cfd84f828fa91b7496b3949f",
     }
   },
 
--- a/mxtool/mx.py	Mon Jul 20 11:19:52 2015 -0700
+++ b/mxtool/mx.py	Mon Jul 20 11:21:28 2015 -0700
@@ -647,7 +647,7 @@
         return self._annotationProcessors
 
     """
-    Gets the class path composed of the distribution jars containing the 
+    Gets the class path composed of the distribution jars containing the
     annotation processors that will be applied when compiling this project.
     """
     def annotation_processors_path(self):
@@ -800,7 +800,7 @@
 that may use functionality in one JRE (e.g., Oracle JRE)
 that is not present in another JRE (e.g., OpenJDK). A
 motivating example is the Java Flight Recorder library
-found in the Oracle JRE. 
+found in the Oracle JRE.
 """
 class JreLibrary(BaseLibrary):
     def __init__(self, suite, name, jar, optional):
--- a/src/share/vm/code/nmethod.cpp	Mon Jul 20 11:19:52 2015 -0700
+++ b/src/share/vm/code/nmethod.cpp	Mon Jul 20 11:21:28 2015 -0700
@@ -43,6 +43,21 @@
 #include "utilities/dtrace.hpp"
 #include "utilities/events.hpp"
 #include "utilities/xmlstream.hpp"
+#ifdef TARGET_ARCH_x86
+# include "nativeInst_x86.hpp"
+#endif
+#ifdef TARGET_ARCH_sparc
+# include "nativeInst_sparc.hpp"
+#endif
+#ifdef TARGET_ARCH_zero
+# include "nativeInst_zero.hpp"
+#endif
+#ifdef TARGET_ARCH_arm
+# include "nativeInst_arm.hpp"
+#endif
+#ifdef TARGET_ARCH_ppc
+# include "nativeInst_ppc.hpp"
+#endif
 #ifdef SHARK
 #include "shark/sharkCompiler.hpp"
 #endif
@@ -2610,6 +2625,14 @@
   memcpy(scopes_data_begin(), buffer, size);
 }
 
+// When using JVMCI the address might be off by the size of a call instruction.
+bool nmethod::is_deopt_entry(address pc) {
+  return pc == deopt_handler_begin()
+#ifdef JVMCI
+    || pc == (deopt_handler_begin() + NativeCall::instruction_size)
+#endif // JVMCI
+    ;
+}
 
 #ifdef ASSERT
 static PcDesc* linear_search(nmethod* nm, int pc_offset, bool approximate) {
--- a/src/share/vm/code/nmethod.hpp	Mon Jul 20 11:19:52 2015 -0700
+++ b/src/share/vm/code/nmethod.hpp	Mon Jul 20 11:21:28 2015 -0700
@@ -694,24 +694,7 @@
   // Deopt
   // Return true is the PC is one would expect if the frame is being deopted.
   bool is_deopt_pc      (address pc) { return is_deopt_entry(pc) || is_deopt_mh_entry(pc); }
-
-  // (thomaswue) When using jvmci, the address might be off by 5 (because this is the size of the call instruction.
-  // (thomaswue) TODO: Replace this by a more general mechanism.
-  // (sanzinger) SPARC has another offset, looked for some variable existing in HotSpot which describes this offset, but i have not
-  // found anything.
-  bool is_deopt_entry   (address pc) {
-    return pc == deopt_handler_begin()
-#ifdef JVMCI
-      || pc == deopt_handler_begin() +
-#ifdef TARGET_ARCH_sparc
-  8
-#endif // sparc
-#ifdef TARGET_ARCH_x86
-  5
-#endif // x86
-#endif // JVMCI
-      ;
-  }
+  bool is_deopt_entry(address pc);
   bool is_deopt_mh_entry(address pc) { return pc == deopt_mh_handler_begin(); }
   // Accessor/mutator for the original pc of a frame before a frame was deopted.
   address get_original_pc(const frame* fr) { return *orig_pc_addr(fr); }