diff options
author | Mark Shannon <mark@hotpy.org> | 2021-12-14 18:22:44 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-12-14 18:22:44 (GMT) |
commit | 9f8f45144b6f0ad481e80570538cce89b414f7f9 (patch) | |
tree | bde67ec27794633c1e58d7349be4bf16687a1949 /Objects | |
parent | d60457a6673cf0263213c2f2be02c633ec2e2038 (diff) | |
download | cpython-9f8f45144b6f0ad481e80570538cce89b414f7f9.zip cpython-9f8f45144b6f0ad481e80570538cce89b414f7f9.tar.gz cpython-9f8f45144b6f0ad481e80570538cce89b414f7f9.tar.bz2 |
bpo-44525: Split calls into PRECALL and CALL (GH-30011)
* Add 3 new opcodes for calls: PRECALL_METHOD, CALL_NO_KW, CALL_KW.
* Update specialization to handle new CALL opcodes.
* Specialize call to method descriptors.
* Remove old CALL opcodes: CALL_FUNCTION, CALL_METHOD, CALL_METHOD_KW, CALL_FUNCTION_KW.
Diffstat (limited to 'Objects')
-rw-r--r-- | Objects/exception_handling_notes.txt | 6 | ||||
-rw-r--r-- | Objects/lnotab_notes.txt | 4 |
2 files changed, 5 insertions, 5 deletions
diff --git a/Objects/exception_handling_notes.txt b/Objects/exception_handling_notes.txt index e738c27..a136358 100644 --- a/Objects/exception_handling_notes.txt +++ b/Objects/exception_handling_notes.txt @@ -23,7 +23,7 @@ compiles as follows in 3.10: 3 2 LOAD_GLOBAL 0 (g) 4 LOAD_CONST 1 (0) - 6 CALL_FUNCTION 1 + 6 CALL_NO_KW 1 8 POP_TOP 10 POP_BLOCK 12 LOAD_CONST 0 (None) @@ -47,7 +47,7 @@ a table to determine where to jump to when an exception is raised. 3 2 LOAD_GLOBAL 0 (g) 4 LOAD_CONST 1 (0) - 6 CALL_FUNCTION 1 + 6 CALL_NO_KW 1 8 POP_TOP 10 LOAD_CONST 0 (None) 12 RETURN_VALUE @@ -68,7 +68,7 @@ ExceptionTable: (Note this code is from an early 3.11 alpha, the NOP may well have be removed before release). If an instruction raises an exception then its offset is used to find the target to jump to. -For example, the CALL_FUNCTION at offset 6, falls into the range 2 to 8. +For example, the CALL_NO_KW at offset 6, falls into the range 2 to 8. So, if g() raises an exception, then control jumps to offset 14. diff --git a/Objects/lnotab_notes.txt b/Objects/lnotab_notes.txt index e52e437..362b87a 100644 --- a/Objects/lnotab_notes.txt +++ b/Objects/lnotab_notes.txt @@ -188,7 +188,7 @@ which compiles to this: 3 6 LOAD_GLOBAL 0 (print) 8 LOAD_CONST 1 (1) - 10 CALL_FUNCTION 1 + 10 CALL_NO_KW 1 12 POP_TOP 4 14 BREAK_LOOP @@ -197,7 +197,7 @@ which compiles to this: 6 20 LOAD_GLOBAL 0 (print) 22 LOAD_CONST 2 (2) - 24 CALL_FUNCTION 1 + 24 CALL_NO_KW 1 26 POP_TOP >> 28 LOAD_CONST 0 (None) 30 RETURN_VALUE |