diff options
author | NAKAMURA Takumi <geek4civic@gmail.com> | 2025-01-09 18:49:54 +0900 |
---|---|---|
committer | NAKAMURA Takumi <geek4civic@gmail.com> | 2025-01-09 18:49:54 +0900 |
commit | e2810c9a248f4c7fbfae84bb32b6f7e01027458b (patch) | |
tree | ae0b02a8491b969a1cee94ea16ffe42c559143c5 /lldb/examples/python/formatter_bytecode.py | |
parent | fa04eb4af95c1ca7377279728cb004bcd2324d01 (diff) | |
parent | bdcf47e4bcb92889665825654bb80a8bbe30379e (diff) | |
download | llvm-users/chapuni/cov/single/switch.zip llvm-users/chapuni/cov/single/switch.tar.gz llvm-users/chapuni/cov/single/switch.tar.bz2 |
Merge branch 'users/chapuni/cov/single/base' into users/chapuni/cov/single/switchusers/chapuni/cov/single/switch
Diffstat (limited to 'lldb/examples/python/formatter_bytecode.py')
-rw-r--r-- | lldb/examples/python/formatter_bytecode.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lldb/examples/python/formatter_bytecode.py b/lldb/examples/python/formatter_bytecode.py index ccd0c68..36a14be 100644 --- a/lldb/examples/python/formatter_bytecode.py +++ b/lldb/examples/python/formatter_bytecode.py @@ -35,6 +35,7 @@ define_opcode(6, "rot", "rot") define_opcode(0x10, "{", "begin") define_opcode(0x11, "if", "if") define_opcode(0x12, "ifelse", "ifelse") +define_opcode(0x13, "return", "return") define_opcode(0x20, None, "lit_uint") define_opcode(0x21, None, "lit_int") @@ -342,6 +343,9 @@ def interpret(bytecode: bytearray, control: list, data: list, tracing: bool = Fa else: frame.append(control.pop()) control.pop() + elif b == op_return: + control.clear() + return data[-1] # Literals. elif b == op_lit_uint: |