8000 GH-96793: Implement PEP 479 in bytecode. by markshannon · Pull Request #99006 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

GH-96793: Implement PEP 479 in bytecode. #99006

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 8 commits into from
Nov 3, 2022
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Remove LOAD_ERROR instruction.
  • Loading branch information
markshannon committed Nov 2, 2022
commit f86c5e464fed4e7732d9798071639d727cdf6813
14 changes: 7 additions & 7 deletions Include/internal/pycore_opcode.h

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

47 changes: 23 additions & 24 deletions Include/opcode.h

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Lib/opcode.py
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ def pseudo_op(name, op, real_ops):
def_op('DELETE_DEREF', 139)
hasfree.append(139)
jrel_op('JUMP_BACKWARD', 140) # Number of words to skip (backwards)
def_op('LOAD_ERROR', 141)

def_op('CALL_FUNCTION_EX', 142) # Flags

def_op('EXTENDED_ARG', 144)
Expand Down
23 changes: 0 additions & 23 deletions Python/ceval.c
Original file line number Diff line number Diff line change
Expand Up @@ -2175,29 +2175,6 @@ _PyEval_EvalFrameDefault(PyThreadState *tstate, _PyInterpreterFrame *frame, int
goto exception_unwind;
}

TARGET(LOAD_ERROR) {
PyObject *value;
switch(oparg) {
case 0:
value = PyExc_AssertionError;
break;
case 1:
value = PyExc_StopIteration;
break;
case 2:
value = PyExc_RuntimeError;
break;
case 3:
value = PyExc_StopAsyncIteration;
break;
default:
Py_UNREACHABLE();
}
Py_INCREF(value);
PUSH(value);
DISPATCH();
}

CACC TARGET(STOPITERATION_ERROR) {
assert(frame->owner == FRAME_OWNED_BY_GENERATOR);
PyObject *exc = TOP();
Expand Down
1 change: 0 additions & 1 deletion Python/compile.c
Original file line number Diff line number Diff line change
Expand Up @@ -1257,7 +1257,6 @@ stack_effect(int opcode, int oparg, int jump)
return (oparg & FVS_MASK) == FVS_HAVE_SPEC ? -1 : 0;
case LOAD_METHOD:
return 1;
case LOAD_ERROR:
case LOAD_ASSERTION_ERROR:
return 1;
case LIST_TO_TUPLE:
Expand Down
12 changes: 6 additions & 6 deletions Python/opcode_targets.h

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0