Thanks to visit codestin.com
Credit goes to github.com

Skip to content
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
Inline instead of specializing
  • Loading branch information
Fidget-Spinner committed Oct 7, 2022
commit 84d0f8b737cca775a08bfcff2455ab8debae59fa
67 changes: 33 additions & 34 deletions Include/internal/pycore_opcode.h

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

86 changes: 41 additions & 45 deletions Include/opcode.h

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

3 changes: 1 addition & 2 deletions Lib/importlib/_bootstrap_external.py
Original file line number Diff line number Diff line change
Expand Up @@ -413,7 +413,6 @@ def _write_atomic(path, data, mode=0o666):
# Python 3.12a1 3507 (Set lineno of module's RESUME to 0)
# Python 3.12a1 3508 (Add CLEANUP_THROW)
# Python 3.12a1 3509 (Conditional jumps only jump forward)
# Python 3.12a1 3510 (Specialization/Cache for CALL_FUNCTION_EX)


# Python 3.13 will start with 3550
Expand All @@ -427,7 +426,7 @@ def _write_atomic(path, data, mode=0o666):
# Whenever MAGIC_NUMBER is changed, the ranges in the magic_values array
# in PC/launcher.c must also be updated.

MAGIC_NUMBER = (3510).to_bytes(2, 'little') + b'\r\n'
MAGIC_NUMBER = (3509).to_bytes(2, 'little') + b'\r\n'

_RAW_MAGIC_NUMBER = int.from_bytes(MAGIC_NUMBER, 'little') # For import.c

Expand Down
11 changes: 0 additions & 11 deletions Lib/opcode.py
Original file line number Diff line number Diff line change
Expand Up @@ -311,12 +311,6 @@ def pseudo_op(name, op, real_ops):
"CALL_NO_KW_TUPLE_1",
"CALL_NO_KW_TYPE_1",
],
"CALL_FUNCTION_EX": [
"CALL_FUNCTION_EX_ADAPTIVE",
"CALL_FUNCTION_EX_PY_KWARGS",
"CALL_FUNCTION_EX_PY_NO_KWARGS",
"CALL_FUNCTION_EX_BUILTIN_PYCFUNCTIONWITHKEYWORDS",
],
"COMPARE_OP": [
"COMPARE_OP_ADAPTIVE",
"COMPARE_OP_FLOAT_JUMP",
Expand Down Expand Up @@ -440,11 +434,6 @@ def pseudo_op(name, op, real_ops):
"func_version": 2,
"min_args": 1,
},
"CALL_FUNCTION_EX": {
"counter": 1,
"func_version": 2,
"min_args": 1,
},
"STORE_SUBSCR": {
"counter": 1,
},
Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
Specialize complex calls.
Complex function calls are now significantly faster and consume no C stack
space.
Loading