| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -32,8 +32,8 @@ | |||
| 32 | 32 | (repr, 'repr'), | |
| 33 | 33 | (ascii, 'ascii'), | |
| 34 | 34 | ) | |
| 35 | - MAKE_FUNCTION = opmap['MAKE_FUNCTION'] | ||
| 36 | - MAKE_FUNCTION_FLAGS = ('defaults', 'kwdefaults', 'annotations', 'closure') | ||
| 35 | + SET_FUNCTION_ATTRIBUTE = opmap['SET_FUNCTION_ATTRIBUTE'] | ||
| 36 | + FUNCTION_ATTR_FLAGS = ('defaults', 'kwdefaults', 'annotations', 'closure') | ||
| 37 | 37 | ||
| 38 | 38 | LOAD_CONST = opmap['LOAD_CONST'] | |
| 39 | 39 | RETURN_CONST = opmap['RETURN_CONST'] | |
@@ -586,8 +586,8 @@ def _get_instructions_bytes(code, varname_from_oparg=None, | |||
| 586 | 586 | if argrepr: | |
| 587 | 587 | argrepr += ', ' | |
| 588 | 588 | argrepr += 'with format' | |
| 589 | - elif deop == MAKE_FUNCTION: | ||
| 590 | - argrepr = ', '.join(s for i, s in enumerate(MAKE_FUNCTION_FLAGS) | ||
| 589 | + elif deop == SET_FUNCTION_ATTRIBUTE: | ||
| 590 | + argrepr = ', '.join(s for i, s in enumerate(FUNCTION_ATTR_FLAGS) | ||
| 591 | 591 | if arg & (1<<i)) | |
| 592 | 592 | elif deop == BINARY_OP: | |
| 593 | 593 | _, argrepr = _nb_ops[arg] | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -448,6 +448,8 @@ def _write_atomic(path, data, mode=0o666): | |||
| 448 | 448 | # Python 3.13a1 3550 (Plugin optimizer support) | |
| 449 | 449 | # Python 3.13a1 3551 (Compact superinstructions) | |
| 450 | 450 | ||
| 451 | + # Python 3.13a1 3554 (Add SET_FUNCTION_ATTRIBUTE) | ||
| 452 | + | ||
| 451 | 453 | # Python 3.14 will start with 3600 | |
| 452 | 454 | ||
| 453 | 455 | # Please don't copy-paste the same pre-release tag for new entries above!!! | |
@@ -463,7 +465,7 @@ def _write_atomic(path, data, mode=0o666): | |||
| 463 | 465 | # Whenever MAGIC_NUMBER is changed, the ranges in the magic_values array | |
| 464 | 466 | # in PC/launcher.c must also be updated. | |
| 465 | 467 | ||
| 466 | - MAGIC_NUMBER = (3551).to_bytes(2, 'little') + b'\r\n' | ||
| 468 | + MAGIC_NUMBER = (3554).to_bytes(2, 'little') + b'\r\n' | ||
| 467 | 469 | ||
| 468 | 470 | _RAW_MAGIC_NUMBER = int.from_bytes(MAGIC_NUMBER, 'little') # For import.c | |
| 469 | 471 | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -96,6 +96,7 @@ def pseudo_op(name, op, real_ops): | |||
| 96 | 96 | # This helps us catch cases where we attempt to execute a cache. | |
| 97 | 97 | def_op('RESERVED', 17) | |
| 98 | 98 | ||
| 99 | + def_op('MAKE_FUNCTION', 24) | ||
| 99 | 100 | def_op('BINARY_SUBSCR', 25) | |
| 100 | 101 | def_op('BINARY_SLICE', 26) | |
| 101 | 102 | def_op('STORE_SLICE', 27) | |
@@ -183,7 +184,6 @@ def pseudo_op(name, op, real_ops): | |||
| 183 | 184 | jrel_op('POP_JUMP_IF_NONE', 129) | |
| 184 | 185 | def_op('RAISE_VARARGS', 130) # Number of raise arguments (1, 2, or 3) | |
| 185 | 186 | def_op('GET_AWAITABLE', 131) | |
| 186 | - def_op('MAKE_FUNCTION', 132) # Flags | ||
| 187 | 187 | def_op('BUILD_SLICE', 133) # Number of items | |
| 188 | 188 | jrel_op('JUMP_BACKWARD_NO_INTERRUPT', 134) # Number of words to skip (backwards) | |
| 189 | 189 | def_op('MAKE_CELL', 135) | |
@@ -234,6 +234,7 @@ def pseudo_op(name, op, real_ops): | |||
| 234 | 234 | name_op('LOAD_FROM_DICT_OR_GLOBALS', 175) | |
| 235 | 235 | def_op('LOAD_FROM_DICT_OR_DEREF', 176) | |
| 236 | 236 | hasfree.append(176) | |
| 237 | + def_op('SET_FUNCTION_ATTRIBUTE', 177) # Attribute | ||
| 237 | 238 | ||
| 238 | 239 | # Optimizer hook | |
| 239 | 240 | def_op('ENTER_EXECUTOR', 230) | |
| Back | FazBrowse Home | New Git URL |
0 commit comments