|
10 | 10 | package org.truffleruby.language.dispatch;
|
11 | 11 |
|
12 | 12 | import com.oracle.truffle.api.CompilerDirectives;
|
| 13 | +import com.oracle.truffle.api.RootCallTarget; |
13 | 14 | import com.oracle.truffle.api.frame.MaterializedFrame;
|
14 | 15 | import com.oracle.truffle.api.frame.VirtualFrame;
|
15 | 16 | import com.oracle.truffle.api.interop.TruffleObject;
|
@@ -199,17 +200,19 @@ protected RubySymbol nameToSymbol(String methodName) {
|
199 | 200 |
|
200 | 201 | /** This will be called from the {@link CallInternalMethodNode} child whenever it creates a new
|
201 | 202 | * {@link DirectCallNode}. */
|
202 |
| - public final void applySplittingInliningStrategy(InternalMethod method, DirectCallNode callNode) { |
| 203 | + public final void applySplittingInliningStrategy(RootCallTarget callTarget, String methodName, |
| 204 | + DirectCallNode callNode) { |
| 205 | + |
203 | 206 |
|
204 | 207 | final Options options = getContext().getOptions();
|
205 | 208 |
|
206 | 209 | // The way that #method_missing is used is usually as an indirection to call some other method, and possibly to
|
207 | 210 | // modify the arguments. In both cases, but especially the latter, it makes a lot of sense to manually clone the
|
208 | 211 | // call target and to inline it.
|
209 |
| - final boolean isMethodMissing = method.getName().equals("method_missing"); |
| 212 | + final boolean isMethodMissing = methodName.equals("method_missing"); |
210 | 213 |
|
211 | 214 | if (callNode.isCallTargetCloningAllowed() &&
|
212 |
| - (((RubyRootNode) method.getCallTarget().getRootNode()).shouldAlwaysClone() || |
| 215 | + (((RubyRootNode) callTarget.getRootNode()).shouldAlwaysClone() || |
213 | 216 | isMethodMissing && options.METHODMISSING_ALWAYS_CLONE)) {
|
214 | 217 | callNode.cloneCallTarget();
|
215 | 218 | }
|
|
0 commit comments