Skip to content

Commit e9b38d2

Browse files
committed
[hotfix] TruffleObjectBuiltins: CallNode create / execute
PullRequest: graalpython/264
2 parents 1e5fb73 + 68078bf commit e9b38d2

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

graalpython/com.oracle.graal.python/src/com/oracle/graal/python/builtins/objects/foreign/TruffleObjectBuiltins.java

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -820,6 +820,12 @@ protected Object doGeneric(Object callee, @SuppressWarnings("unused") Object arg
820820
@Builtin(name = __CALL__, minNumOfPositionalArgs = 1, takesVarArgs = true, takesVarKeywordArgs = true)
821821
@GenerateNodeFactory
822822
public abstract static class CallNode extends UnboxNode {
823+
public final Object executeWithArgs(TruffleObject callee, Object[] arguments) {
824+
return this.execute(callee, arguments, PKeyword.EMPTY_KEYWORDS);
825+
}
826+
827+
public abstract Object execute(TruffleObject callee, Object[] arguments, PKeyword[] keywords);
828+
823829
/**
824830
* A foreign function call specializes on the length of the passed arguments. Any
825831
* optimization based on the callee has to happen on the other side.
@@ -852,6 +858,10 @@ protected Object doInteropCall(TruffleObject callee, Object[] arguments, @Suppre
852858
protected Object doGeneric(Object callee, @SuppressWarnings("unused") Object arguments, @SuppressWarnings("unused") Object keywords) {
853859
throw raise(PythonErrorType.TypeError, "invalid invocation of foreign callable %s()", callee);
854860
}
861+
862+
public static CallNode create() {
863+
return TruffleObjectBuiltinsFactory.CallNodeFactory.create(null);
864+
}
855865
}
856866

857867
@Builtin(name = __GETITEM__, fixedNumOfPositionalArgs = 2)

0 commit comments

Comments
 (0)