diff options
author | Mark Shannon <mark@hotpy.org> | 2021-06-04 00:03:54 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-06-04 00:03:54 (GMT) |
commit | b2bf2bc1ece673d387341e06c8d3c2bc6e259747 (patch) | |
tree | 29217a2927ed27e71e6324876f279946219a25a9 /Lib/dis.py | |
parent | 35002aa8f62dda1f79035e9904abdf476683e9be (diff) | |
download | cpython-b2bf2bc1ece673d387341e06c8d3c2bc6e259747.zip cpython-b2bf2bc1ece673d387341e06c8d3c2bc6e259747.tar.gz cpython-b2bf2bc1ece673d387341e06c8d3c2bc6e259747.tar.bz2 |
bpo-43693: Compute deref offsets in compiler (gh-25152)
Merges locals and cells into a single array.
Saves a pointer in the interpreter and means that we don't need the LOAD_CLOSURE opcode any more
https://bugs.python.org/issue43693
Diffstat (limited to 'Lib/dis.py')
-rw-r--r-- | Lib/dis.py | 5 |
1 files changed, 1 insertions, 4 deletions
@@ -378,14 +378,11 @@ def _get_instructions_bytes(code, varname_from_oparg=None, elif op in hasjrel: argval = offset + 2 + arg*2 argrepr = "to " + repr(argval) - elif op in haslocal: + elif op in haslocal or op in hasfree: argval, argrepr = _get_name_info(arg, varname_from_oparg) elif op in hascompare: argval = cmp_op[arg] argrepr = argval - elif op in hasfree: - argval, argrepr = _get_name_info(arg, varname_from_oparg, - cell=True) elif op == FORMAT_VALUE: argval, argrepr = FORMAT_VALUE_CONVERTERS[arg & 0x3] argval = (argval, bool(arg & 0x4)) |