mirror of
https://github.com/python/cpython.git
synced 2026-01-06 15:32:22 +00:00
gh-119180: Add LOAD_COMMON_CONSTANT opcode (#119321)
The PEP 649 implementation will require a way to load NotImplementedError from the bytecode. @markshannon suggested implementing this by converting LOAD_ASSERTION_ERROR into a more general mechanism for loading constants. This PR adds this new opcode. I will work on the rest of the implementation of the PEP separately. Co-authored-by: Irit Katriel <1055913+iritkatriel@users.noreply.github.com>
This commit is contained in:
parent
506b1a3ff6
commit
98e855fcc1
22 changed files with 337 additions and 288 deletions
2
Python/opcode_targets.h
generated
2
Python/opcode_targets.h
generated
|
|
@ -22,7 +22,6 @@ static void *opcode_targets[256] = {
|
|||
&&TARGET_GET_LEN,
|
||||
&&TARGET_GET_YIELD_FROM_ITER,
|
||||
&&TARGET_INTERPRETER_EXIT,
|
||||
&&TARGET_LOAD_ASSERTION_ERROR,
|
||||
&&TARGET_LOAD_BUILD_CLASS,
|
||||
&&TARGET_LOAD_LOCALS,
|
||||
&&TARGET_MAKE_FUNCTION,
|
||||
|
|
@ -82,6 +81,7 @@ static void *opcode_targets[256] = {
|
|||
&&TARGET_LIST_APPEND,
|
||||
&&TARGET_LIST_EXTEND,
|
||||
&&TARGET_LOAD_ATTR,
|
||||
&&TARGET_LOAD_COMMON_CONSTANT,
|
||||
&&TARGET_LOAD_CONST,
|
||||
&&TARGET_LOAD_DEREF,
|
||||
&&TARGET_LOAD_FAST,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue