Skip to content

Commit ee46560

Browse files
committed
clone all builtin call targets
1 parent 9cd1f39 commit ee46560

File tree

1 file changed

+6
-0
lines changed
  • graalpython/com.oracle.graal.python/src/com/oracle/graal/python/nodes/call

1 file changed

+6
-0
lines changed

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

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -148,6 +148,9 @@ abstract class CallTargetInvokeNode extends AbstractInvokeNode {
148148

149149
protected CallTargetInvokeNode(CallTarget callTarget, boolean isBuiltin, boolean isGenerator) {
150150
this.callNode = Truffle.getRuntime().createDirectCallNode(callTarget);
151+
if (isBuiltin) {
152+
callNode.cloneCallTarget();
153+
}
151154
if (isGenerator) {
152155
this.callNode.forceInlining();
153156
}
@@ -203,6 +206,9 @@ public abstract class InvokeNode extends AbstractInvokeNode {
203206

204207
protected InvokeNode(CallTarget callTarget, Arity calleeArity, PythonObject globals, PCell[] closure, boolean isBuiltin, boolean isGenerator) {
205208
this.callNode = Truffle.getRuntime().createDirectCallNode(callTarget);
209+
if (isBuiltin) {
210+
callNode.cloneCallTarget();
211+
}
206212
if (isGenerator) {
207213
this.callNode.forceInlining();
208214
}

0 commit comments

Comments
 (0)