changeset 15094:04703cff4ef2

Truffle: fixed some minor formatting/findbugs problems.
author Christian Humer <christian.humer@gmail.com>
date Mon, 14 Apr 2014 20:37:16 +0200
parents 5634b199c4da
children 6133189d8eea
files graal/com.oracle.graal.truffle/src/com/oracle/graal/truffle/MaterializedFrameNotify.java graal/com.oracle.graal.truffle/src/com/oracle/graal/truffle/OptimizedCallTargetLog.java graal/com.oracle.truffle.api/src/com/oracle/truffle/api/nodes/RootNode.java graal/com.oracle.truffle.sl/src/com/oracle/truffle/sl/nodes/call/SLDirectDispatchNode.java
diffstat 4 files changed, 13 insertions(+), 15 deletions(-) [+]
line wrap: on
line diff
--- a/graal/com.oracle.graal.truffle/src/com/oracle/graal/truffle/MaterializedFrameNotify.java	Mon Apr 14 20:32:25 2014 +0200
+++ b/graal/com.oracle.graal.truffle/src/com/oracle/graal/truffle/MaterializedFrameNotify.java	Mon Apr 14 20:37:16 2014 +0200
@@ -4,9 +4,7 @@
  *
  * 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.  Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
+ * 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
--- a/graal/com.oracle.graal.truffle/src/com/oracle/graal/truffle/OptimizedCallTargetLog.java	Mon Apr 14 20:32:25 2014 +0200
+++ b/graal/com.oracle.graal.truffle/src/com/oracle/graal/truffle/OptimizedCallTargetLog.java	Mon Apr 14 20:37:16 2014 +0200
@@ -69,7 +69,7 @@
             TruffleInliningProfile profile = result.getProfiles().get(callNode);
             boolean inlined = result.isInlined(callNode);
             String msg = inlined ? "inline success" : "inline failed";
-            logInlinedImpl(msg, profile, depth);
+            logInlinedImpl(msg, callNode, profile, depth);
             if (profile.getRecursiveResult() != null && inlined) {
                 logInliningDecisionRecursive(profile.getRecursiveResult(), depth + 1);
             }
@@ -89,13 +89,13 @@
         return callNodes;
     }
 
-    private static void logInlinedImpl(String status, TruffleInliningProfile profile, int depth) {
+    private static void logInlinedImpl(String status, OptimizedDirectCallNode callNode, TruffleInliningProfile profile, int depth) {
         Map<String, Object> properties = new LinkedHashMap<>();
-        addASTSizeProperty(profile.getCallNode().getCurrentCallTarget(), properties);
+        addASTSizeProperty(callNode.getCurrentCallTarget(), properties);
         if (profile != null) {
             properties.putAll(profile.getDebugProperties());
         }
-        log((depth * 2), status, profile.getCallNode().getCurrentCallTarget().toString(), properties);
+        log((depth * 2), status, callNode.getCurrentCallTarget().toString(), properties);
     }
 
     private static void logInliningStart(OptimizedCallTarget target) {
--- a/graal/com.oracle.truffle.api/src/com/oracle/truffle/api/nodes/RootNode.java	Mon Apr 14 20:32:25 2014 +0200
+++ b/graal/com.oracle.truffle.api/src/com/oracle/truffle/api/nodes/RootNode.java	Mon Apr 14 20:37:16 2014 +0200
@@ -58,7 +58,7 @@
      * Creates a split {@link RootNode} based on the current {@link RootNode}. This method should
      * return an AST that was never executed and must not be shared with other {@link RootNode} or
      * {@link CallTarget} instances. This method is intended to be overridden by a subclass.
-     * 
+     *
      * @return the split {@link RootNode}
      */
     public RootNode split() {
@@ -67,10 +67,10 @@
 
     /**
      * Returns <code>true</code> if this {@link RootNode} can be split. A {@link RootNode} can be
-     * split inside of a {@link CallTarget} that is invoked using a {@link DirectCallNode}. If this method
-     * returns <code>true</code> a proper implementation of {@link #split()} must also be provided.
-     * This method is intended to be overridden by a subclass.
-     * 
+     * split inside of a {@link CallTarget} that is invoked using a {@link DirectCallNode}. If this
+     * method returns <code>true</code> a proper implementation of {@link #split()} must also be
+     * provided. This method is intended to be overridden by a subclass.
+     *
      * @return <code>true</code> if splittable else <code>false</code>.
      */
     public boolean isSplittable() {
@@ -89,7 +89,7 @@
 
     /**
      * Executes this function using the specified frame and returns the result value.
-     * 
+     *
      * @param frame the frame of the currently executing guest language method
      * @return the value of the execution
      */
--- a/graal/com.oracle.truffle.sl/src/com/oracle/truffle/sl/nodes/call/SLDirectDispatchNode.java	Mon Apr 14 20:32:25 2014 +0200
+++ b/graal/com.oracle.truffle.sl/src/com/oracle/truffle/sl/nodes/call/SLDirectDispatchNode.java	Mon Apr 14 20:37:16 2014 +0200
@@ -36,8 +36,8 @@
     private final SLFunction cachedFunction;
 
     /**
-     * {@link DirectCallNode} is part of the Truffle API and handles all the steps necessary for method
-     * inlining: if the call is executed frequently and the callee is small, then the call is
+     * {@link DirectCallNode} is part of the Truffle API and handles all the steps necessary for
+     * method inlining: if the call is executed frequently and the callee is small, then the call is
      * inlined, i.e., the call node is replaced with a copy of the callee's AST.
      */
     @Child private DirectCallNode callCachedTargetNode;