diff options
| author | Damien George <damien@micropython.org> | 2022-05-30 11:08:54 +1000 |
|---|---|---|
| committer | Damien George <damien@micropython.org> | 2022-06-07 13:32:38 +1000 |
| commit | f506bf342af5994a2b8aa0f005e2a8fbf06b60b5 (patch) | |
| tree | 3ded60de4e4acdafc5c1e92b512c72906cc10bcd /tools/mpy-tool.py | |
| parent | b37b57821476d9ea80cdcc89d325dcabded3ffb7 (diff) | |
py/bc: Remove unused mp_opcode_format function.
This was made redundant by f2040bfc7ee033e48acef9f289790f3b4e6b74e5, which
also did not update this function for the change to qstr-opcode encoding,
so it does not work correctly anyway.
Signed-off-by: Damien George <damien@micropython.org>
Diffstat (limited to 'tools/mpy-tool.py')
| -rwxr-xr-x | tools/mpy-tool.py | 24 |
1 files changed, 0 insertions, 24 deletions
diff --git a/tools/mpy-tool.py b/tools/mpy-tool.py index 20ccc87d4..fb18eb8cb 100755 --- a/tools/mpy-tool.py +++ b/tools/mpy-tool.py @@ -326,30 +326,6 @@ def mp_small_int_fits(i): return -0x2000 <= i <= 0x1FFF -# this function mirrors that in py/bc.c -def mp_opcode_format(bytecode, ip, count_var_uint): - opcode = bytecode[ip] - ip_start = ip - f = (0x000003A4 >> (2 * ((opcode) >> 4))) & 3 - if f == MP_BC_FORMAT_QSTR: - ip += 3 - else: - extra_byte = (opcode & MP_BC_MASK_EXTRA_BYTE) == 0 - ip += 1 - if f == MP_BC_FORMAT_VAR_UINT: - if count_var_uint: - while bytecode[ip] & 0x80 != 0: - ip += 1 - ip += 1 - elif f == MP_BC_FORMAT_OFFSET: - if bytecode[ip] & 0x80 == 0: - ip += 1 - else: - ip += 2 - ip += extra_byte - return f, ip - ip_start - - def mp_opcode_decode(bytecode, ip): opcode = bytecode[ip] ip_start = ip |
