Skip to content

Commit be4b0cc

Browse files
committed
do not use uncached function calltarget lookup on fast path
1 parent f54e22b commit be4b0cc

File tree

13 files changed

+110
-73
lines changed

13 files changed

+110
-73
lines changed

graalpython/com.oracle.graal.python/src/com/oracle/graal/python/builtins/modules/GraalPythonModuleBuiltins.java

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,7 @@
8989
import com.oracle.graal.python.nodes.ErrorMessages;
9090
import com.oracle.graal.python.nodes.argument.ReadIndexedArgumentNode;
9191
import com.oracle.graal.python.nodes.argument.ReadVarArgsNode;
92+
import com.oracle.graal.python.nodes.builtins.FunctionNodes.GetCallTargetNode;
9293
import com.oracle.graal.python.nodes.builtins.FunctionNodes.GetSignatureNode;
9394
import com.oracle.graal.python.nodes.call.CallNode;
9495
import com.oracle.graal.python.nodes.classes.IsSubtypeNode;
@@ -479,15 +480,13 @@ public abstract static class DumpTruffleAstNode extends PythonUnaryBuiltinNode {
479480
@Specialization
480481
@TruffleBoundary
481482
public String doIt(PFunction func) {
482-
return NodeUtil.printTreeToString(func.getCallTargetUncached().getRootNode());
483+
return NodeUtil.printTreeToString(GetCallTargetNode.getUncached().execute(func).getRootNode());
483484
}
484485

485486
@Specialization(guards = "isFunction(method.getFunction())")
486487
@TruffleBoundary
487488
public String doIt(PMethod method) {
488-
// cast ensured by guard
489-
PFunction fun = (PFunction) method.getFunction();
490-
return NodeUtil.printTreeToString(fun.getCallTargetUncached().getRootNode());
489+
return NodeUtil.printTreeToString(GetCallTargetNode.getUncached().execute(method).getRootNode());
491490
}
492491

493492
@Specialization

graalpython/com.oracle.graal.python/src/com/oracle/graal/python/builtins/modules/PythonCextBuiltins.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -229,6 +229,7 @@
229229
import com.oracle.graal.python.nodes.attributes.WriteAttributeToDynamicObjectNode;
230230
import com.oracle.graal.python.nodes.attributes.WriteAttributeToObjectNode;
231231
import com.oracle.graal.python.nodes.builtins.FunctionNodes.GetSignatureNode;
232+
import com.oracle.graal.python.nodes.builtins.FunctionNodes.GetCallTargetNode;
232233
import com.oracle.graal.python.nodes.call.CallNode;
233234
import com.oracle.graal.python.nodes.call.special.CallBinaryMethodNode;
234235
import com.oracle.graal.python.nodes.call.special.LookupAndCallBinaryNode;
@@ -1875,7 +1876,7 @@ abstract static class MakeMayRaiseWrapperNode extends PythonBuiltinNode {
18751876
@Specialization
18761877
@TruffleBoundary
18771878
Object make(PFunction func, Object errorResultObj) {
1878-
RootCallTarget originalCallTarget = func.getCallTargetUncached();
1879+
RootCallTarget originalCallTarget = GetCallTargetNode.getUncached().execute(func);
18791880

18801881
// Replace the first expression node with the MayRaiseNode
18811882
RootCallTarget wrapperCallTarget = getLanguage().createCachedCallTarget(

graalpython/com.oracle.graal.python/src/com/oracle/graal/python/builtins/objects/function/PFunction.java

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@
3535
import com.oracle.graal.python.builtins.objects.object.PythonObjectLibrary;
3636
import com.oracle.graal.python.nodes.PRootNode;
3737
import com.oracle.graal.python.nodes.argument.positional.PositionalArgumentsNode;
38+
import com.oracle.graal.python.nodes.builtins.FunctionNodes.GetCallTargetNode;
3839
import com.oracle.graal.python.nodes.call.CallNode;
3940
import com.oracle.graal.python.nodes.generator.GeneratorFunctionRootNode;
4041
import com.oracle.graal.python.runtime.GilNode;
@@ -95,13 +96,6 @@ public PFunction(PythonLanguage lang, String name, String qualname, String enclo
9596
this.defaultsStableAssumption = defaultsStableAssumption;
9697
}
9798

98-
/**
99-
* Prefer to use a cached CodeNodes.GetCodeCallTargetNode on the fast path.
100-
*/
101-
public RootCallTarget getCallTargetUncached() {
102-
return GetCodeCallTargetNode.getUncached().execute(code);
103-
}
104-
10599
public Assumption getCodeStableAssumption() {
106100
return codeStableAssumption;
107101
}
@@ -177,7 +171,7 @@ public void setKwDefaults(PKeyword[] defaults) {
177171

178172
@TruffleBoundary
179173
String getSourceCode() {
180-
RootNode rootNode = getCallTargetUncached().getRootNode();
174+
RootNode rootNode = GetCallTargetNode.getUncached().execute(this).getRootNode();
181175
if (rootNode instanceof GeneratorFunctionRootNode) {
182176
rootNode = ((GeneratorFunctionRootNode) rootNode).getFunctionRootNode();
183177
}

graalpython/com.oracle.graal.python/src/com/oracle/graal/python/nodes/argument/CreateArgumentsNode.java

Lines changed: 4 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@
6868
import com.oracle.graal.python.nodes.argument.CreateArgumentsNodeGen.FindKwDefaultNodeGen;
6969
import com.oracle.graal.python.nodes.argument.CreateArgumentsNodeGen.HandleTooManyArgumentsNodeGen;
7070
import com.oracle.graal.python.nodes.argument.CreateArgumentsNodeGen.ApplyKeywordsNodeGen.SearchNamedParameterNodeGen;
71+
import com.oracle.graal.python.nodes.builtins.FunctionNodes.GetCallTargetNode;
7172
import com.oracle.graal.python.nodes.builtins.FunctionNodes.GetDefaultsNode;
7273
import com.oracle.graal.python.nodes.builtins.FunctionNodes.GetKeywordDefaultsNode;
7374
import com.oracle.graal.python.nodes.builtins.FunctionNodes.GetSignatureNode;
@@ -172,9 +173,10 @@ Object[] doFunctionCached(PythonObject callable, Object[] userArguments, PKeywor
172173
return createAndCheckArgumentsNode.execute(callable, userArguments, keywords, signature, null, defaults, kwdefaults, false);
173174
}
174175

175-
@Specialization(guards = {"getCallTarget(callable) == cachedCallTarget", "cachedCallTarget != null"}, limit = "getVariableArgumentInlineCacheLimit()", replaces = {"doMethodFunctionCached",
176+
@Specialization(guards = {"getCt.execute(callable) == cachedCallTarget", "cachedCallTarget != null"}, limit = "getVariableArgumentInlineCacheLimit()", replaces = {"doMethodFunctionCached",
176177
"doFunctionCached"})
177178
Object[] doCallTargetCached(PythonObject callable, Object[] userArguments, PKeyword[] keywords,
179+
@SuppressWarnings("unused") @Cached GetCallTargetNode getCt,
178180
@Cached CreateAndCheckArgumentsNode createAndCheckArgumentsNode,
179181
@SuppressWarnings("unused") @Cached GetSignatureNode getSignatureNode,
180182
@Cached("getSignatureNode.execute(callable)") Signature signature, // signatures
@@ -185,7 +187,7 @@ Object[] doCallTargetCached(PythonObject callable, Object[] userArguments, PKeyw
185187
@Cached ConditionProfile gotMethod,
186188
@Cached GetDefaultsNode getDefaultsNode,
187189
@Cached GetKeywordDefaultsNode getKwDefaultsNode,
188-
@Cached("getCallTarget(callable)") @SuppressWarnings("unused") RootCallTarget cachedCallTarget) {
190+
@Cached("getCt.execute(callable)") @SuppressWarnings("unused") RootCallTarget cachedCallTarget) {
189191
Object[] defaults = getDefaultsNode.execute(callable);
190192
PKeyword[] kwdefaults = getKwDefaultsNode.execute(callable);
191193
Object self = null;
@@ -944,24 +946,6 @@ protected static Object getFunction(Object callable) {
944946
return null;
945947
}
946948

947-
protected static RootCallTarget getCallTarget(Object callable) {
948-
if (callable instanceof PBuiltinMethod) {
949-
return ((PBuiltinMethod) callable).getFunction().getCallTarget();
950-
} else if (callable instanceof PMethod) {
951-
Object function = ((PMethod) callable).getFunction();
952-
if (function instanceof PBuiltinFunction) {
953-
return ((PBuiltinFunction) function).getCallTarget();
954-
} else if (function instanceof PFunction) {
955-
return ((PFunction) function).getCallTargetUncached();
956-
}
957-
} else if (callable instanceof PBuiltinFunction) {
958-
return ((PBuiltinFunction) callable).getCallTarget();
959-
} else if (callable instanceof PFunction) {
960-
return ((PFunction) callable).getCallTargetUncached();
961-
}
962-
return null;
963-
}
964-
965949
protected static boolean isMethodCall(Object self) {
966950
return !(self instanceof PythonModule);
967951
}

graalpython/com.oracle.graal.python/src/com/oracle/graal/python/nodes/builtins/FunctionNodes.java

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,10 +53,13 @@
5353
import com.oracle.graal.python.nodes.builtins.FunctionNodesFactory.GetDefaultsNodeGen;
5454
import com.oracle.graal.python.nodes.builtins.FunctionNodesFactory.GetKeywordDefaultsNodeGen;
5555
import com.oracle.graal.python.nodes.builtins.FunctionNodesFactory.GetSignatureNodeGen;
56+
import com.oracle.graal.python.nodes.builtins.FunctionNodesFactory.GetCallTargetNodeGen;
5657
import com.oracle.truffle.api.Assumption;
58+
import com.oracle.truffle.api.RootCallTarget;
5759
import com.oracle.truffle.api.dsl.Bind;
5860
import com.oracle.truffle.api.dsl.Cached;
5961
import com.oracle.truffle.api.dsl.Cached.Shared;
62+
import com.oracle.truffle.api.dsl.Fallback;
6063
import com.oracle.truffle.api.dsl.GenerateUncached;
6164
import com.oracle.truffle.api.dsl.ImportStatic;
6265
import com.oracle.truffle.api.dsl.Specialization;
@@ -244,4 +247,51 @@ public static GetSignatureNode getUncached() {
244247
return GetSignatureNodeGen.getUncached();
245248
}
246249
}
250+
251+
@ImportStatic(PGuards.class)
252+
@GenerateUncached
253+
public abstract static class GetCallTargetNode extends PNodeWithContext {
254+
255+
public abstract RootCallTarget execute(Object function);
256+
257+
@Specialization
258+
static RootCallTarget doFunction(PFunction function,
259+
@Shared("getCode") @Cached GetFunctionCodeNode getFunctionCodeNode,
260+
@Shared("getCt") @Cached CodeNodes.GetCodeCallTargetNode getCt) {
261+
return getCt.execute(getFunctionCodeNode.execute(function));
262+
}
263+
264+
@Specialization
265+
static RootCallTarget doBuiltinFunction(PBuiltinFunction builtinFunction) {
266+
return builtinFunction.getCallTarget();
267+
}
268+
269+
@Specialization(guards = "isPFunction(function)")
270+
static RootCallTarget doMethod(@SuppressWarnings("unused") PMethod method,
271+
@Bind("method.getFunction()") Object function,
272+
@Shared("getCode") @Cached GetFunctionCodeNode getFunctionCodeNode,
273+
@Shared("getCt") @Cached CodeNodes.GetCodeCallTargetNode getCt) {
274+
return getCt.execute(getFunctionCodeNode.execute((PFunction)function));
275+
}
276+
277+
@Specialization(guards = "isPBuiltinFunction(method.getFunction())")
278+
static RootCallTarget doMethod(@SuppressWarnings("unused") PMethod method,
279+
@Bind("method.getFunction()") Object function) {
280+
return ((PBuiltinFunction) function).getCallTarget();
281+
}
282+
283+
@Specialization
284+
static RootCallTarget doBuiltinMethod(PBuiltinMethod builtinMethod) {
285+
return builtinMethod.getFunction().getCallTarget();
286+
}
287+
288+
@Fallback
289+
static RootCallTarget fallback(Object callable) {
290+
return null;
291+
}
292+
293+
public static GetCallTargetNode getUncached() {
294+
return GetCallTargetNodeGen.getUncached();
295+
}
296+
}
247297
}

graalpython/com.oracle.graal.python/src/com/oracle/graal/python/nodes/call/CallDispatchNode.java

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,10 @@
3131
import com.oracle.graal.python.builtins.objects.function.PBuiltinFunction;
3232
import com.oracle.graal.python.builtins.objects.function.PFunction;
3333
import com.oracle.graal.python.nodes.builtins.FunctionNodes.GetFunctionCodeNode;
34+
import com.oracle.graal.python.nodes.builtins.FunctionNodes.GetCallTargetNode;
3435
import com.oracle.graal.python.runtime.PythonOptions;
3536
import com.oracle.truffle.api.Assumption;
37+
import com.oracle.truffle.api.CompilerAsserts;
3638
import com.oracle.truffle.api.RootCallTarget;
3739
import com.oracle.truffle.api.dsl.Cached;
3840
import com.oracle.truffle.api.dsl.GenerateUncached;
@@ -110,10 +112,15 @@ protected Object callFunctionCachedCode(VirtualFrame frame, @SuppressWarnings("u
110112
return invoke.execute(frame, arguments);
111113
}
112114

115+
protected static RootCallTarget getCallTargetUncached(PFunction callee) {
116+
CompilerAsserts.neverPartOfCompilation();
117+
return GetCallTargetNode.getUncached().execute(callee);
118+
}
119+
113120
// We have multiple contexts, don't cache the objects so that contexts can be cleaned up
114121
@Specialization(guards = {"getCt.execute(callee.getCode()) == ct"}, limit = "getCallSiteInlineCacheMaxDepth()", replaces = "callFunctionCachedCode")
115122
protected Object callFunctionCachedCt(VirtualFrame frame, PFunction callee, Object[] arguments,
116-
@SuppressWarnings("unused") @Cached("callee.getCallTargetUncached()") RootCallTarget ct,
123+
@SuppressWarnings("unused") @Cached("getCallTargetUncached(callee)") RootCallTarget ct,
117124
@SuppressWarnings("unused") @Cached GetCodeCallTargetNode getCt,
118125
@Cached("createCtInvokeNode(callee)") CallTargetInvokeNode invoke) {
119126
return invoke.execute(frame, callee, callee.getGlobals(), callee.getClosure(), arguments);

graalpython/com.oracle.graal.python/src/com/oracle/graal/python/nodes/call/InvokeNode.java

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@
3131
import com.oracle.graal.python.builtins.objects.function.PFunction;
3232
import com.oracle.graal.python.builtins.objects.method.PBuiltinMethod;
3333
import com.oracle.graal.python.nodes.IndirectCallNode;
34+
import com.oracle.graal.python.nodes.builtins.FunctionNodes.GetCallTargetNode;
3435
import com.oracle.graal.python.nodes.function.ClassBodyRootNode;
3536
import com.oracle.graal.python.nodes.generator.GeneratorFunctionRootNode;
3637
import com.oracle.graal.python.runtime.PythonOptions;
@@ -59,14 +60,10 @@ protected static boolean forceSplitBuiltins() {
5960

6061
@TruffleBoundary
6162
protected static RootCallTarget getCallTarget(Object callee) {
62-
RootCallTarget callTarget;
6363
Object actualCallee = callee;
64-
if (actualCallee instanceof PFunction) {
65-
callTarget = ((PFunction) actualCallee).getCallTargetUncached();
66-
} else if (actualCallee instanceof PBuiltinFunction) {
67-
callTarget = ((PBuiltinFunction) callee).getCallTarget();
68-
} else {
69-
throw new UnsupportedOperationException("Unsupported callee type " + actualCallee);
64+
RootCallTarget callTarget = GetCallTargetNode.getUncached().execute(actualCallee);
65+
if (callTarget == null) {
66+
throw CompilerDirectives.shouldNotReachHere("Unsupported callee type " + actualCallee);
7067
}
7168
return callTarget;
7269
}

graalpython/com.oracle.graal.python/src/com/oracle/graal/python/nodes/call/special/CallBinaryMethodNode.java

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@
4949
import com.oracle.graal.python.builtins.objects.function.PBuiltinFunction;
5050
import com.oracle.graal.python.builtins.objects.function.PKeyword;
5151
import com.oracle.graal.python.builtins.objects.method.PBuiltinMethod;
52+
import com.oracle.graal.python.nodes.builtins.FunctionNodes.GetCallTargetNode;
5253
import com.oracle.graal.python.nodes.call.CallNode;
5354
import com.oracle.graal.python.nodes.call.GenericInvokeNode;
5455
import com.oracle.graal.python.nodes.call.special.MaybeBindDescriptorNode.BoundDescriptor;
@@ -172,18 +173,20 @@ Object callSelfMethodSingleContext(VirtualFrame frame, @SuppressWarnings("unused
172173
return builtinNode.call(frame, func.getSelf(), arg1, arg2);
173174
}
174175

175-
@Specialization(guards = {"builtinNode != null", "getCallTarget(func) == ct", "!takesSelfArg", "frame != null || unusedFrame"}, limit = "getCallSiteInlineCacheMaxDepth()")
176+
@Specialization(guards = {"builtinNode != null", "getCallTarget(func, getCt) == ct", "!takesSelfArg", "frame != null || unusedFrame"}, limit = "getCallSiteInlineCacheMaxDepth()")
176177
Object callMethod(VirtualFrame frame, @SuppressWarnings("unused") PBuiltinMethod func, Object arg1, Object arg2,
177-
@SuppressWarnings("unused") @Cached("getCallTarget(func)") RootCallTarget ct,
178+
@SuppressWarnings("unused") @Cached GetCallTargetNode getCt,
179+
@SuppressWarnings("unused") @Cached("getCallTarget(func, getCt)") RootCallTarget ct,
178180
@SuppressWarnings("unused") @Cached("takesSelfArg(func)") boolean takesSelfArg,
179181
@Cached("getBinary(frame, func.getFunction())") PythonBinaryBuiltinNode builtinNode,
180182
@SuppressWarnings("unused") @Cached("frameIsUnused(builtinNode)") boolean unusedFrame) {
181183
return builtinNode.call(frame, arg1, arg2);
182184
}
183185

184-
@Specialization(guards = {"builtinNode != null", "getCallTarget(func) == ct", "takesSelfArg", "frame != null || unusedFrame"}, limit = "getCallSiteInlineCacheMaxDepth()")
186+
@Specialization(guards = {"builtinNode != null", "getCallTarget(func, getCt) == ct", "takesSelfArg", "frame != null || unusedFrame"}, limit = "getCallSiteInlineCacheMaxDepth()")
185187
Object callSelfMethod(VirtualFrame frame, @SuppressWarnings("unused") PBuiltinMethod func, Object arg1, Object arg2,
186-
@SuppressWarnings("unused") @Cached("getCallTarget(func)") RootCallTarget ct,
188+
@SuppressWarnings("unused") @Cached GetCallTargetNode getCt,
189+
@SuppressWarnings("unused") @Cached("getCallTarget(func, getCt)") RootCallTarget ct,
187190
@SuppressWarnings("unused") @Cached("takesSelfArg(func)") boolean takesSelfArg,
188191
@Cached("getTernary(frame, func.getFunction())") PythonTernaryBuiltinNode builtinNode,
189192
@SuppressWarnings("unused") @Cached("frameIsUnused(builtinNode)") boolean unusedFrame) {

graalpython/com.oracle.graal.python/src/com/oracle/graal/python/nodes/call/special/CallQuaternaryMethodNode.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@
4343
import com.oracle.graal.python.builtins.objects.function.PBuiltinFunction;
4444
import com.oracle.graal.python.builtins.objects.function.PKeyword;
4545
import com.oracle.graal.python.builtins.objects.method.PBuiltinMethod;
46+
import com.oracle.graal.python.nodes.builtins.FunctionNodes.GetCallTargetNode;
4647
import com.oracle.graal.python.nodes.call.CallNode;
4748
import com.oracle.graal.python.nodes.call.special.MaybeBindDescriptorNode.BoundDescriptor;
4849
import com.oracle.graal.python.nodes.function.builtins.PythonQuaternaryBuiltinNode;
@@ -88,9 +89,10 @@ Object callMethodSingle(VirtualFrame frame, @SuppressWarnings("unused") PBuiltin
8889
return builtinNode.call(frame, arg1, arg2, arg3, arg4);
8990
}
9091

91-
@Specialization(guards = {"builtinNode != null", "getCallTarget(func) == ct", "!takesSelfArg", "frame != null || unusedFrame"}, limit = "getCallSiteInlineCacheMaxDepth()")
92+
@Specialization(guards = {"builtinNode != null", "getCallTarget(func, getCt) == ct", "!takesSelfArg", "frame != null || unusedFrame"}, limit = "getCallSiteInlineCacheMaxDepth()")
9293
Object callMethod(VirtualFrame frame, @SuppressWarnings("unused") PBuiltinMethod func, Object arg1, Object arg2, Object arg3, Object arg4,
93-
@SuppressWarnings("unused") @Cached("getCallTarget(func)") RootCallTarget ct,
94+
@SuppressWarnings("unused") @Cached GetCallTargetNode getCt,
95+
@SuppressWarnings("unused") @Cached("getCallTarget(func, getCt)") RootCallTarget ct,
9496
@SuppressWarnings("unused") @Cached("takesSelfArg(func)") boolean takesSelfArg,
9597
@Cached("getQuaternary(frame, func.getFunction())") PythonQuaternaryBuiltinNode builtinNode,
9698
@SuppressWarnings("unused") @Cached("frameIsUnused(builtinNode)") boolean unusedFrame) {

graalpython/com.oracle.graal.python/src/com/oracle/graal/python/nodes/call/special/CallSpecialMethodNode.java

Lines changed: 5 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -47,12 +47,12 @@
4747
import com.oracle.graal.python.builtins.PythonBuiltinClassType;
4848
import com.oracle.graal.python.builtins.objects.function.BuiltinMethodDescriptor;
4949
import com.oracle.graal.python.builtins.objects.function.PBuiltinFunction;
50-
import com.oracle.graal.python.builtins.objects.function.PFunction;
5150
import com.oracle.graal.python.builtins.objects.method.PBuiltinMethod;
5251
import com.oracle.graal.python.builtins.objects.method.PMethod;
5352
import com.oracle.graal.python.nodes.PGuards;
5453
import com.oracle.graal.python.nodes.PRaiseNode;
5554
import com.oracle.graal.python.nodes.PRootNode;
55+
import com.oracle.graal.python.nodes.builtins.FunctionNodes.GetCallTargetNode;
5656
import com.oracle.graal.python.nodes.function.BuiltinFunctionRootNode;
5757
import com.oracle.graal.python.nodes.function.PythonBuiltinBaseNode;
5858
import com.oracle.graal.python.nodes.function.builtins.PythonBinaryBuiltinNode;
@@ -202,21 +202,12 @@ protected static int getMinArgs(Object func) {
202202
return 0;
203203
}
204204

205-
protected static RootCallTarget getCallTarget(PMethod meth) {
206-
return getCallTargetOfFunction(meth.getFunction());
205+
protected static RootCallTarget getCallTarget(PMethod meth, GetCallTargetNode getCtNode) {
206+
return getCtNode.execute(meth.getFunction());
207207
}
208208

209-
protected static RootCallTarget getCallTarget(PBuiltinMethod meth) {
210-
return getCallTargetOfFunction(meth.getFunction());
211-
}
212-
213-
private static RootCallTarget getCallTargetOfFunction(Object func) {
214-
if (func instanceof PFunction) {
215-
return ((PFunction) func).getCallTargetUncached();
216-
} else if (func instanceof PBuiltinFunction) {
217-
return ((PBuiltinFunction) func).getCallTarget();
218-
}
219-
return null;
209+
protected static RootCallTarget getCallTarget(PBuiltinMethod meth, GetCallTargetNode getCtNode) {
210+
return getCtNode.execute(meth.getFunction());
220211
}
221212

222213
protected static boolean expectBooleanResult(Object value) throws UnexpectedResultException {

0 commit comments

Comments
 (0)