Uh oh!
There was an error while loading. Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork 34k
bpo-43693: Add the MAKE_CELL opcode and interleave fast locals offsets.#26396
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Uh oh!
There was an error while loading. Please reload this page.
Changes from all commits
110a8914d1056be18489b21acbc2167cdc1409b92ada503d01a8400e09f718fcd2508f362088d9cdc8ba5a4d98405accc0File filter
Filter by extension
Conversations
Uh oh!
There was an error while loading. Please reload this page.
Jump to
Uh oh!
There was an error while loading. Please reload this page.
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -2,9 +2,16 @@ | ||
| # error "this header file must not be included directly" | ||
| #endif | ||
| /* Each instruction in a code object is a fixed-width value, | ||
ericsnowcurrently marked this conversation as resolved. Outdated Show resolvedHide resolvedUh oh!There was an error while loading. Please reload this page. | ||
| * currently 2 bytes: 1-byte opcode + 1-byte oparg. The EXTENDED_ARG | ||
| * opcode allows for larger values but the current limit is 3 uses | ||
| * of EXTENDED_ARG (see Python/wordcode_helpers.h), for a maximum | ||
| * 32-bit value. This aligns with the note in Python/compile.c | ||
| * (compiler_addop_i_line) indicating that the max oparg value is | ||
| * 2**32 - 1, rather than INT_MAX. | ||
ericsnowcurrently marked this conversation as resolved. Outdated Show resolvedHide resolvedUh oh!There was an error while loading. Please reload this page. | ||
| */ | ||
| typedef uint16_t _Py_CODEUNIT; | ||
| // Each oparg must fit in the second half of _Py_CODEUNIT, hence 8 bits. | ||
| #define _Py_MAX_OPARG 255 | ||
| #ifdef WORDS_BIGENDIAN | ||
| # define _Py_OPCODE(word) ((word) >> 8) | ||
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Uh oh!
There was an error while loading. Please reload this page.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -181,14 +181,16 @@ def jabs_op(name, op): | ||
| def_op('MAKE_FUNCTION', 132) # Flags | ||
| def_op('BUILD_SLICE', 133) # Number of items | ||
| def_op('LOAD_CLOSURE', 135) | ||
| ||
| def_op('MAKE_CELL', 135) | ||
| hasfree.append(135) | ||
| def_op('LOAD_DEREF', 136) | ||
| def_op('LOAD_CLOSURE', 136) | ||
| hasfree.append(136) | ||
| def_op('STORE_DEREF', 137) | ||
| def_op('LOAD_DEREF', 137) | ||
| hasfree.append(137) | ||
| def_op('DELETE_DEREF', 138) | ||
| def_op('STORE_DEREF', 138) | ||
| hasfree.append(138) | ||
| def_op('DELETE_DEREF', 139) | ||
| hasfree.append(139) | ||
| def_op('CALL_FUNCTION_KW', 141) # #args + #kwargs | ||
| def_op('CALL_FUNCTION_EX', 142) # Flags | ||
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.