|
79 | 79 | import com.oracle.graal.python.nodes.object.IsBuiltinClassProfile;
|
80 | 80 | import com.oracle.graal.python.runtime.PythonContext;
|
81 | 81 | import com.oracle.graal.python.runtime.exception.PException;
|
| 82 | +import com.oracle.graal.python.runtime.object.PythonObjectFactory; |
82 | 83 | import com.oracle.graal.python.runtime.sequence.storage.SequenceStorage;
|
83 | 84 | import com.oracle.truffle.api.CompilerAsserts;
|
84 | 85 | import com.oracle.truffle.api.CompilerDirectives;
|
@@ -961,12 +962,13 @@ static ParserState doPredicate(ParserState state, Object kwds, @SuppressWarnings
|
961 | 962 | @Specialization(guards = "c == FORMAT_PAR_OPEN")
|
962 | 963 | static ParserState doPredicate(ParserState state, Object kwds, @SuppressWarnings("unused") char c, @SuppressWarnings("unused") char[] format, @SuppressWarnings("unused") int format_idx,
|
963 | 964 | Object kwdnames, @SuppressWarnings("unused") Object varargs,
|
| 965 | + @Cached PythonObjectFactory factory, |
964 | 966 | @Shared("getArgNode") @Cached GetArgNode getArgNode,
|
965 | 967 | @Shared("raiseNode") @Cached PRaiseNativeNode raiseNode) throws InteropException, ParseArgumentsException {
|
966 | 968 |
|
967 | 969 | Object arg = getArgNode.execute(state, kwds, kwdnames, state.restKeywordsOnly);
|
968 | 970 | if (skipOptionalArg(arg, state.restOptional)) {
|
969 |
| - return state.incrementOutIndex(); |
| 971 | + return state.open(new PositionalArgStack(factory.createEmptyTuple(), state.v)); |
970 | 972 | } else {
|
971 | 973 | // n.b.: there is a small gap in this check: In theory, there could be
|
972 | 974 | // native subclass of tuple. But since we do not support this anyway, the
|
|
0 commit comments