summaryrefslogtreecommitdiffstats
path: root/Python/executor_cases.c.h
diff options
context:
space:
mode:
Diffstat (limited to 'Python/executor_cases.c.h')
-rw-r--r--Python/executor_cases.c.h15
1 files changed, 13 insertions, 2 deletions
diff --git a/Python/executor_cases.c.h b/Python/executor_cases.c.h
index 347a1e6..a3d7af2 100644
--- a/Python/executor_cases.c.h
+++ b/Python/executor_cases.c.h
@@ -1162,9 +1162,20 @@
break;
}
- case _LOAD_ASSERTION_ERROR: {
+ case _LOAD_COMMON_CONSTANT: {
PyObject *value;
- value = Py_NewRef(PyExc_AssertionError);
+ oparg = CURRENT_OPARG();
+ // Keep in sync with _common_constants in opcode.py
+ switch(oparg) {
+ case CONSTANT_ASSERTIONERROR:
+ value = PyExc_AssertionError;
+ break;
+ case CONSTANT_NOTIMPLEMENTEDERROR:
+ value = PyExc_NotImplementedError;
+ break;
+ default:
+ Py_FatalError("bad LOAD_COMMON_CONSTANT oparg");
+ }
stack_pointer[0] = value;
stack_pointer += 1;
break;