diff --git a/docs/reference-manual/java-on-truffle/README.md b/docs/reference-manual/java-on-truffle/README.md index f38c9e39faac..8419c55d1df8 100644 --- a/docs/reference-manual/java-on-truffle/README.md +++ b/docs/reference-manual/java-on-truffle/README.md @@ -52,7 +52,8 @@ You can download a standalone based on Oracle GraalVM or GraalVM Community Editi 3. A standalone comes with a JVM in addition to its native launcher. Check the version to see the Java on Truffle runtime is active: ```shell - ./path/to/bin/java -truffle --version + # Path to Java on Truffle (Espresso) installation + ./path/to/bin/java -truffle -version ``` ## Run Java on Truffle @@ -99,7 +100,8 @@ This might be important for options such as `MaxDirectMemorySize` which can be s To ensure you have successfully installed Java on Truffle, verify its version: ```shell -java -truffle -version +# Path to Java on Truffle (Espresso) installation +./path/to/bin/java -truffle -version ``` Taking this `HelloWorld.java` example, compile it and run from the command line: diff --git a/substratevm/src/com.oracle.graal.pointsto/src/com/oracle/graal/pointsto/flow/MethodTypeFlowBuilder.java b/substratevm/src/com.oracle.graal.pointsto/src/com/oracle/graal/pointsto/flow/MethodTypeFlowBuilder.java index 9a1f417ee7d6..83b6e3f201ce 100644 --- a/substratevm/src/com.oracle.graal.pointsto/src/com/oracle/graal/pointsto/flow/MethodTypeFlowBuilder.java +++ b/substratevm/src/com.oracle.graal.pointsto/src/com/oracle/graal/pointsto/flow/MethodTypeFlowBuilder.java @@ -1474,7 +1474,7 @@ protected void processMethodInvocation(TypeFlowsOfNodes state, Invoke invoke, In } /* Get a reasonable position for inlined invokes, avoiding cycles in the parsing backtrace. */ - private BytecodePosition getInvokePosition(FixedNode invokeNode) { + protected BytecodePosition getInvokePosition(FixedNode invokeNode) { BytecodePosition invokePosition = invokeNode.getNodeSourcePosition(); /* Get the outermost caller position for inlined invokes. */ while (invokePosition != null && invokePosition.getCaller() != null) { diff --git a/substratevm/src/com.oracle.graal.pointsto/src/com/oracle/graal/pointsto/meta/AnalysisMethod.java b/substratevm/src/com.oracle.graal.pointsto/src/com/oracle/graal/pointsto/meta/AnalysisMethod.java index 64c5ea8d67cb..a6c8c1a6b857 100644 --- a/substratevm/src/com.oracle.graal.pointsto/src/com/oracle/graal/pointsto/meta/AnalysisMethod.java +++ b/substratevm/src/com.oracle.graal.pointsto/src/com/oracle/graal/pointsto/meta/AnalysisMethod.java @@ -927,11 +927,19 @@ private void waitOnLock(ReentrantLock lock) { } } + public StructuredGraph decodeAnalyzedGraph(DebugContext debug, Iterable nodeReferences) { + if (analyzedGraph == null) { + return null; + } + + return decodeAnalyzedGraph(debug, nodeReferences, analyzedGraph.trackNodeSourcePosition()); + } + /** * Returns the {@link StructuredGraph Graal IR} for the method that has been processed by the * static analysis. */ - public StructuredGraph decodeAnalyzedGraph(DebugContext debug, Iterable nodeReferences) { + public StructuredGraph decodeAnalyzedGraph(DebugContext debug, Iterable nodeReferences, boolean trackNodeSourcePosition) { if (analyzedGraph == null) { return null; } @@ -939,7 +947,7 @@ public StructuredGraph decodeAnalyzedGraph(DebugContext debug, Iterable