FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

GH-125837: Split `LOAD_CONST` into three. by markshannon · Pull Request #125972 · python/cpython · GitHub

Repository navigation

Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
2a61cfc
Replace RETURN_VLAUE/RETURN_CONST with RETURN_VALUE_FUNC/RETURN_VALUE…
markshannon Oct 22, 2024
42a526c
Add LOAD_CONST_IMMORTAL
markshannon Oct 23, 2024
2a3b1e2
Fix up all the tests apart from test_dis
markshannon Oct 23, 2024
031f320
Update optimizer
markshannon Oct 23, 2024
cb5252b
Fix up test_dis
markshannon Oct 23, 2024
892edbc
Fix up a couple of comments
markshannon Oct 23, 2024
5ce99ca
Apply suggestions from code review
markshannon Oct 24, 2024
325c5fe
Clarify comment
markshannon Oct 24, 2024
6149153
Remove unused function
markshannon Oct 24, 2024
59a554a
Update test
markshannon Oct 24, 2024
bcb4e65
Update dis docs
markshannon Oct 24, 2024
f3383e5
Remove link to remove instruction
markshannon Oct 24, 2024
68e97ba
Restore RETURN_VALUE
markshannon Oct 25, 2024
0b8a5ad
Add LOAD_INT instruction
markshannon Oct 24, 2024
1bfdd70
Fix up dis and some tests
markshannon Oct 24, 2024
f934559
Fix up test dis
markshannon Oct 25, 2024
f135b69
Address review comments
markshannon Oct 25, 2024
8f2a781
Fix __annotate__ docstring
markshannon Oct 25, 2024
97c6cdc
Teach optimizer about LOAD_INT
markshannon Oct 25, 2024
eefcbdf
Remove remnants of earlier PR
markshannon Oct 25, 2024
58dab8e
Remove last remnant of earlier PR
markshannon Oct 25, 2024
81e4dd6
Remove the definitely last remnant of earlier PR
markshannon Oct 25, 2024
050fc1e
Document LOAD_INT and add news
markshannon Oct 25, 2024
46055c1
Revert unnecessary name changes
markshannon Oct 25, 2024
79305d2
Make functions static again to avoid warning
markshannon Oct 25, 2024
7e4b2a8
implement review suggestion
markshannon Oct 25, 2024
57e891e
Address review comments
markshannon Oct 28, 2024
207e35e
Fix typo
markshannon Oct 28, 2024
7c88f69
Remove extra argument
markshannon Oct 28, 2024
9d4e575
Rename LOAD_INT to LOAD_SMALL_INT
markshannon Oct 28, 2024
ae11453
Regenerate test file
markshannon Oct 28, 2024
3a50437
Fix test_dis
markshannon Oct 28, 2024
47927cf
Don't mark LOAD_SMALL_INT as having a constant, as it doesn't load fr…
markshannon Oct 28, 2024
3caac1a
Add back int to test
markshannon Oct 29, 2024
File filter

Filter by extension

Filter by extension .c  (1) .h  (1) All 2 file types selected
Viewed files
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Unified
Split
Hide whitespace
Diff view
Unified
Split
Hide whitespace
Prev Previous commit
Next Next commit
Apply suggestions from code review
Co-authored-by: Tomas R. <tomas.roun8@gmail.com>
  • Loading branch information
markshannon and tomasr8 authored Oct 24, 2024
commit 5ce99ca91ddad7fd12a379a1c2ccafd13063068d
2 changes: 1 addition & 1 deletion Include/internal/pycore_magic_number.h
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,7 @@ Known values:
Python 3.14a1 3606 (Specialize CALL_KW)
Python 3.14a1 3607 (Add pseudo instructions JUMP_IF_TRUE/FALSE)
Python 3.14a1 3608 (Add support for slices)
Python 3.14a1 3609 (Break up RETURN_VALUE)
Python 3.14a2 3609 (Break up RETURN_VALUE)

Python 3.15 will start with 3650

Expand Down
2 changes: 1 addition & 1 deletion Python/specialize.c
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -468,7 +468,7 @@ _PyCode_Quicken(PyCodeObject *code)
}
else if (opcode == LOAD_CONST) {
/* We can't do this in the bytecode compiler as
* marhsalling can intern strings and make them immortal. */
* marshalling can intern strings and make them immortal. */
oparg = (oparg << 8) | instructions[i].op.arg;
Comment thread
iritkatriel marked this conversation as resolved.
Outdated
PyObject *obj = PyTuple_GET_ITEM(code->co_consts, oparg);
if (_Py_IsImmortal(obj)) {
Expand Down

Back | FazBrowse Home | New Git URL