Mercurial > hg > graal-jvmci-8
comparison graal/com.oracle.truffle.sl/src/com/oracle/truffle/sl/nodes/call/SLDirectDispatchNode.java @ 14991:64dcb92ee75a
Truffle: Change signature for Truffle calls from (PackedFrame, Arguments) to (Object[]).
author | Thomas Wuerthinger <thomas.wuerthinger@oracle.com> |
---|---|
date | Sun, 06 Apr 2014 17:46:24 +0200 |
parents | a08b8694f556 |
children | f675818d9ad0 |
comparison
equal
deleted
inserted
replaced
14989:a0dbb3628f2a | 14991:64dcb92ee75a |
---|---|
69 * retrieve it via {@code function.getCallTarget()}. However, in a more complex language the | 69 * retrieve it via {@code function.getCallTarget()}. However, in a more complex language the |
70 * lookup of the call target is usually much more complicated than in SL. In addition, caching | 70 * lookup of the call target is usually much more complicated than in SL. In addition, caching |
71 * the call target allows method inlining. | 71 * the call target allows method inlining. |
72 */ | 72 */ |
73 @Override | 73 @Override |
74 protected Object executeDispatch(VirtualFrame frame, SLFunction function, SLArguments arguments) { | 74 protected Object executeDispatch(VirtualFrame frame, SLFunction function, Object[] arguments) { |
75 /* | 75 /* |
76 * The inline cache check. Note that cachedFunction must be a final field so that the | 76 * The inline cache check. Note that cachedFunction must be a final field so that the |
77 * compiler can optimize the check. | 77 * compiler can optimize the check. |
78 */ | 78 */ |
79 if (this.cachedFunction == function) { | 79 if (this.cachedFunction == function) { |
90 | 90 |
91 /* | 91 /* |
92 * Now we are really ready to perform the call. We use a Truffle CallNode for that, | 92 * Now we are really ready to perform the call. We use a Truffle CallNode for that, |
93 * because it does all the work for method inlining. | 93 * because it does all the work for method inlining. |
94 */ | 94 */ |
95 return callCachedTargetNode.call(frame.pack(), arguments); | 95 return callCachedTargetNode.call(arguments); |
96 | 96 |
97 } catch (InvalidAssumptionException ex) { | 97 } catch (InvalidAssumptionException ex) { |
98 /* | 98 /* |
99 * The function has been redefined. Remove ourself from the polymorphic inline | 99 * The function has been redefined. Remove ourself from the polymorphic inline |
100 * cache, so that we fail the check only once. Note that this replacement has subtle | 100 * cache, so that we fail the check only once. Note that this replacement has subtle |