changeset 13959:96bd95f62d92

SL: small cleanups
author Christian Wimmer <christian.wimmer@oracle.com>
date Sat, 15 Feb 2014 06:54:20 -0800
parents f80a8503cf24
children 7392b9e0470b
files graal/com.oracle.truffle.sl/src/com/oracle/truffle/sl/nodes/call/SLUninitializedDispatchNode.java graal/com.oracle.truffle.sl/src/com/oracle/truffle/sl/nodes/local/SLWriteLocalVariableNode.java
diffstat 2 files changed, 7 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/graal/com.oracle.truffle.sl/src/com/oracle/truffle/sl/nodes/call/SLUninitializedDispatchNode.java	Fri Feb 14 20:43:43 2014 +0100
+++ b/graal/com.oracle.truffle.sl/src/com/oracle/truffle/sl/nodes/call/SLUninitializedDispatchNode.java	Sat Feb 15 06:54:20 2014 -0800
@@ -56,7 +56,7 @@
         }
         SLInvokeNode invokeNode = (SLInvokeNode) cur.getParent();
 
-        SLAbstractDispatchNode specialized;
+        SLAbstractDispatchNode replacement;
         if (function.getCallTarget() == null) {
             /* Corner case: the function is not defined, so report an error to the user. */
             throw new SLException("Call of undefined function: " + function.getName());
@@ -64,21 +64,21 @@
         } else if (depth < INLINE_CACHE_SIZE) {
             /* Extend the inline cache. Allocate the new cache entry, and the new end of the cache. */
             SLAbstractDispatchNode next = new SLUninitializedDispatchNode();
-            SLAbstractDispatchNode direct = new SLDirectDispatchNode(next, function);
+            replacement = new SLDirectDispatchNode(next, function);
             /* Replace ourself with the new cache entry. */
-            specialized = replace(direct);
+            replace(replacement);
 
         } else {
             /* Cache size exceeded, fall back to a single generic dispatch node. */
-            SLAbstractDispatchNode generic = new SLGenericDispatchNode();
+            replacement = new SLGenericDispatchNode();
             /* Replace the whole chain, not just ourself, with the new generic node. */
-            specialized = invokeNode.dispatchNode.replace(generic);
+            invokeNode.dispatchNode.replace(replacement);
         }
 
         /*
          * Execute the newly created node perform the actual dispatch. That saves us from
          * duplicating the actual call logic here.
          */
-        return specialized.executeDispatch(frame, function, arguments);
+        return replacement.executeDispatch(frame, function, arguments);
     }
 }
--- a/graal/com.oracle.truffle.sl/src/com/oracle/truffle/sl/nodes/local/SLWriteLocalVariableNode.java	Fri Feb 14 20:43:43 2014 +0100
+++ b/graal/com.oracle.truffle.sl/src/com/oracle/truffle/sl/nodes/local/SLWriteLocalVariableNode.java	Sat Feb 15 06:54:20 2014 -0800
@@ -31,7 +31,7 @@
  * Node to write a local variable to a function's {@link VirtualFrame frame}. The Truffle frame API
  * allows to store primitive values of all Java primitive types, and Object values.
  */
-@NodeChild(value = "valueNode")
+@NodeChild("valueNode")
 @NodeField(name = "slot", type = FrameSlot.class)
 public abstract class SLWriteLocalVariableNode extends SLExpressionNode {