# HG changeset patch # User Christian Wimmer # Date 1392476060 28800 # Node ID 96bd95f62d92875314be8f2f586a65e77134f893 # Parent f80a8503cf2485448d6f2d01c2da9a17e175e5ca SL: small cleanups diff -r f80a8503cf24 -r 96bd95f62d92 graal/com.oracle.truffle.sl/src/com/oracle/truffle/sl/nodes/call/SLUninitializedDispatchNode.java --- 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); } } diff -r f80a8503cf24 -r 96bd95f62d92 graal/com.oracle.truffle.sl/src/com/oracle/truffle/sl/nodes/local/SLWriteLocalVariableNode.java --- 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 {