Mercurial > hg > truffle
diff graal/com.oracle.truffle.sl/src/com/oracle/truffle/sl/nodes/call/SLCallNode.java @ 13882:afd6fa5e8229
SL: Feedback from reviewers
author | Christian Wimmer <christian.wimmer@oracle.com> |
---|---|
date | Wed, 05 Feb 2014 08:02:15 -0800 |
parents | f9b934e1e172 |
children |
line wrap: on
line diff
--- a/graal/com.oracle.truffle.sl/src/com/oracle/truffle/sl/nodes/call/SLCallNode.java Wed Feb 05 15:50:36 2014 +0100 +++ b/graal/com.oracle.truffle.sl/src/com/oracle/truffle/sl/nodes/call/SLCallNode.java Wed Feb 05 08:02:15 2014 -0800 @@ -22,6 +22,7 @@ */ package com.oracle.truffle.sl.nodes.call; +import com.oracle.truffle.api.*; import com.oracle.truffle.api.dsl.*; import com.oracle.truffle.api.frame.*; import com.oracle.truffle.api.nodes.*; @@ -57,6 +58,14 @@ public Object executeGeneric(VirtualFrame frame) { SLFunction function = evaluateFunction(frame); + /* + * The number of arguments is constant for one call node. During compilation, the loop is + * unrolled and the execute methods of all arguments are inlined. This is triggered by the + * ExplodeLoop annotation on the method. The compiler assertion below illustrates that the + * array length is really constant. + */ + CompilerAsserts.compilationConstant(argumentNodes.length); + Object[] argumentValues = new Object[argumentNodes.length]; for (int i = 0; i < argumentNodes.length; i++) { argumentValues[i] = argumentNodes[i].executeGeneric(frame);