From 8faeac737857fbd568ff738a9dea40e2359e284e Mon Sep 17 00:00:00 2001 From: Daniel McGregor Date: Fri, 21 Jun 2024 18:37:48 +0800 Subject: [PATCH] - more tuple coverage - fix failing test for empty box keys - rerun tests - simplify arc4 assignment by forwarding on lvalue target assignments. Rename new parameter to better indicate it's purpose - update arc4 example to remove stale comments - reduce arc4 .copy() calls when being passed to intrinsic functions --- examples/sizes.txt | 4 +- src/puya/awst_build/context.py | 30 +- src/puya/awst_build/validation/arc4_copy.py | 26 +- src/puya/ir/builder/arc4.py | 25 +- src/puya/ir/builder/assignment.py | 31 +- src/puya/mir/builder.py | 11 +- test_cases/arc4_types/mutable_params.py | 10 +- .../Arc4MutableParamsContract.approval.mir | 405 +++++----- .../Arc4MutableParamsContract.approval.teal | 75 +- .../out/Arc4MutableParamsContract.clear.mir | 4 +- .../out/Arc4MutableParamsContract.clear.teal | 2 +- .../Arc4MutableParamsContract.destructured.ir | 26 +- .../out/Arc4MutableParamsContract.ssa.ir | 56 +- ...rc4MutableParamsContract.ssa.opt_pass_1.ir | 26 +- ...c4MutableParamsContract.ssa.opt_pass_10.ir | 25 +- ...c4MutableParamsContract.ssa.opt_pass_11.ir | 25 +- ...c4MutableParamsContract.ssa.opt_pass_12.ir | 25 +- ...c4MutableParamsContract.ssa.opt_pass_13.ir | 25 +- ...rc4MutableParamsContract.ssa.opt_pass_2.ir | 25 +- ...rc4MutableParamsContract.ssa.opt_pass_3.ir | 25 +- ...rc4MutableParamsContract.ssa.opt_pass_4.ir | 25 +- ...rc4MutableParamsContract.ssa.opt_pass_5.ir | 25 +- ...rc4MutableParamsContract.ssa.opt_pass_6.ir | 25 +- ...rc4MutableParamsContract.ssa.opt_pass_7.ir | 25 +- ...rc4MutableParamsContract.ssa.opt_pass_8.ir | 25 +- ...rc4MutableParamsContract.ssa.opt_pass_9.ir | 25 +- .../arc4_types/out/mutable_params.O0.log | 730 ++++++++++-------- .../arc4_types/out/mutable_params.O1.log | 398 +++++----- .../arc4_types/out/mutable_params.O2.log | 395 +++++----- test_cases/arc4_types/out/mutable_params.awst | 1 + .../Arc4MutableParamsContract.approval.teal | 40 + .../Arc4MutableParamsContract.destructured.ir | 23 +- .../Arc4MutableParamsContract.approval.teal | 95 ++- .../Arc4MutableParamsContract.clear.teal | 2 +- .../Arc4MutableParamsContract.destructured.ir | 42 +- test_cases/arc4_types/puya.log | 344 ++++++++- .../out/TupleSupport.approval.mir | 237 +++--- .../out/TupleSupport.approval.teal | 70 +- .../tuple_support/out/TupleSupport.clear.mir | 4 +- .../tuple_support/out/TupleSupport.clear.teal | 2 +- .../out/TupleSupport.destructured.ir | 31 +- .../tuple_support/out/TupleSupport.ssa.ir | 55 +- .../out/TupleSupport.ssa.opt_pass_1.ir | 43 +- .../out/TupleSupport.ssa.opt_pass_2.ir | 31 +- .../out/TupleSupport.ssa.opt_pass_3.ir | 31 +- .../out/TupleSupport.ssa.opt_pass_4.ir | 31 +- .../tuple_support/out/tuple_support.awst | 13 + .../out_O2/TupleSupport.approval.teal | 7 + .../out_O2/TupleSupport.destructured.ir | 31 +- .../TupleSupport.approval.teal | 138 +++- .../out_unoptimized/TupleSupport.clear.teal | 2 +- .../TupleSupport.destructured.ir | 53 +- test_cases/tuple_support/puya.log | 280 ++++--- test_cases/tuple_support/tuple_support.py | 14 + tests/test_execution.py | 14 - tests/test_expected_output/arc4.test | 6 + tests/test_expected_output/box.test | 8 + .../test_expected_output/expected_errors.test | 7 + 58 files changed, 2797 insertions(+), 1412 deletions(-) diff --git a/examples/sizes.txt b/examples/sizes.txt index 839b4604ed..176a083a4f 100644 --- a/examples/sizes.txt +++ b/examples/sizes.txt @@ -12,7 +12,7 @@ arc4_types/Arc4BoolType 412 76 336 76 0 arc4_types/Arc4DynamicBytes 389 190 199 190 0 arc4_types/Arc4DynamicStringArray 285 112 173 112 0 - arc4_types/Arc4MutableParams 418 233 185 230 3 + arc4_types/Arc4MutableParams 511 303 208 295 8 arc4_types/Arc4Mutation 3260 1464 1796 1464 0 arc4_types/Arc4NumericTypes 752 201 551 201 0 arc4_types/Arc4RefTypes 94 47 47 47 0 @@ -93,7 +93,7 @@ too_many_permutations 112 106 6 106 0 transaction/Transaction 996 932 64 932 0 tuple_support/TupleComparisons 136 75 61 75 0 - tuple_support/TupleSupport 401 292 109 292 0 + tuple_support/TupleSupport 434 299 135 299 0 typed_abi_call/Greeter 2861 2446 415 2446 0 typed_abi_call/Logger 896 762 134 762 0 unary/Unary 136 96 40 96 0 diff --git a/src/puya/awst_build/context.py b/src/puya/awst_build/context.py index 5b45bfceae..670b72e7d2 100644 --- a/src/puya/awst_build/context.py +++ b/src/puya/awst_build/context.py @@ -190,6 +190,7 @@ def type_to_pytype( *, source_location: SourceLocation | mypy.nodes.Context, in_type_args: bool = False, + in_func_sig: bool = False, ) -> pytypes.PyType: loc = self._maybe_convert_location(source_location) proper_type_or_alias: mypy.types.ProperType | mypy.types.TypeAliasType @@ -198,7 +199,10 @@ def type_to_pytype( else: proper_type_or_alias = mypy.types.get_proper_type(mypy_type) recurse = functools.partial( - self.type_to_pytype, source_location=loc, in_type_args=in_type_args + self.type_to_pytype, + source_location=loc, + in_type_args=in_type_args, + in_func_sig=in_func_sig, ) match proper_type_or_alias: case mypy.types.TypeAliasType(alias=alias, args=args): @@ -218,9 +222,9 @@ def type_to_pytype( raise InternalError( f"mypy tuple type as instance had unrecognised args: {args}", loc ) from None - return pytypes.VariadicTupleType( - items=recurse(arg) - ) # TODO(frist): only in function args + if not in_func_sig: + raise CodeError("variadic tuples are not supported", loc) + return pytypes.VariadicTupleType(items=recurse(arg)) case mypy.types.Instance(args=args) as inst: fullname = inst.type.fullname result = self._pytypes.get(fullname) @@ -291,7 +295,12 @@ def type_to_pytype( func_like.arg_types, func_like.arg_names, func_like.arg_kinds, strict=True ): try: - pt = recurse(at) + pt = self.type_to_pytype( + at, + source_location=loc, + in_type_args=in_type_args, + in_func_sig=True, + ) except TypeUnionError as union: pts = union.types else: @@ -301,7 +310,16 @@ def type_to_pytype( logger.debug( "None contained in bound args for function reference", location=loc ) - bound_args = [recurse(ba) for ba in func_like.bound_args if ba is not None] + bound_args = [ + self.type_to_pytype( + ba, + source_location=loc, + in_type_args=in_type_args, + in_func_sig=True, + ) + for ba in func_like.bound_args + if ba is not None + ] if func_like.definition is not None: name = func_like.definition.fullname else: diff --git a/src/puya/awst_build/validation/arc4_copy.py b/src/puya/awst_build/validation/arc4_copy.py index d881902c44..0fe46edb37 100644 --- a/src/puya/awst_build/validation/arc4_copy.py +++ b/src/puya/awst_build/validation/arc4_copy.py @@ -1,5 +1,7 @@ from collections.abc import Iterator +import attrs + from puya import log from puya.awst import ( nodes as awst_nodes, @@ -21,9 +23,15 @@ def __init__(self) -> None: super().__init__() self._for_items: awst_nodes.Lvalue | None = None + # for nodes that can't modify the input don't need to check for copies unless an assignment + # expression is being used def visit_submit_inner_transaction(self, call: awst_nodes.SubmitInnerTransaction) -> None: - # values passed to an inner transaction do not need to be copied - pass + if _HasAssignmentVisitor.check(call): + super().visit_submit_inner_transaction(call) + + def visit_intrinsic_call(self, call: awst_nodes.IntrinsicCall) -> None: + if _HasAssignmentVisitor.check(call): + super().visit_intrinsic_call(call) def visit_assignment_statement(self, statement: awst_nodes.AssignmentStatement) -> None: _check_assignment(statement.target, statement.value) @@ -138,3 +146,17 @@ def _is_arc4_mutable(wtype: wtypes.WType) -> bool: case wtypes.WTuple(types=types): return any(_is_arc4_mutable(t) for t in types) return False + + +@attrs.define +class _HasAssignmentVisitor(AWSTTraverser): + has_assignment: bool = False + + @classmethod + def check(cls, expr: awst_nodes.Expression) -> bool: + visitor = _HasAssignmentVisitor() + expr.accept(visitor) + return visitor.has_assignment + + def visit_assignment_expression(self, _: awst_nodes.AssignmentExpression) -> None: + self.has_assignment = True diff --git a/src/puya/ir/builder/arc4.py b/src/puya/ir/builder/arc4.py index 46cc54d53e..d5e5d22bc3 100644 --- a/src/puya/ir/builder/arc4.py +++ b/src/puya/ir/builder/arc4.py @@ -276,7 +276,7 @@ def handle_arc4_assign( value: ValueProvider, source_location: SourceLocation, *, - is_recursive_assign: bool = False, + is_mutation: bool = False, ) -> Value: result: Value match target: @@ -298,7 +298,7 @@ def handle_arc4_assign( source_location=source_location, ), source_location=source_location, - is_recursive_assign=True, + is_mutation=True, ) case awst_nodes.FieldExpression( base=awst_nodes.Expression(wtype=wtypes.ARC4Struct() as struct_wtype) as base_expr, @@ -316,7 +316,7 @@ def handle_arc4_assign( source_location=source_location, ), source_location=source_location, - is_recursive_assign=True, + is_mutation=True, ) case awst_nodes.TupleItemExpression( base=awst_nodes.Expression(wtype=wtypes.ARC4Tuple() as tuple_wtype) as base_expr, @@ -334,8 +334,11 @@ def handle_arc4_assign( source_location=source_location, ), source_location=source_location, - is_recursive_assign=True, + is_mutation=True, ) + # this function is sometimes invoked outside an assignment expr/stmt, which + # is how a non l-value expression can be possible + # TODO: refactor this so that this special case is handled where it originates case awst_nodes.TupleItemExpression( base=awst_nodes.VarExpression(wtype=wtypes.WTuple(types=items_types)) as base_expr, index=index_value, @@ -347,25 +350,15 @@ def handle_arc4_assign( source_location=source_location, ) return result - case ( - awst_nodes.VarExpression() - | awst_nodes.FieldExpression() - | awst_nodes.IndexExpression() - | awst_nodes.TupleExpression() - | awst_nodes.AppStateExpression() - | awst_nodes.AppAccountStateExpression() - | awst_nodes.BoxValueExpression() - ) as target: + case _: (result,) = handle_assignment( context, target, value=value, assignment_location=source_location, - is_recursive_assign=is_recursive_assign, + is_mutation=is_mutation, ) return result - case _: - raise CodeError(f"Invalid assignment target {target}", source_location) def concat_values( diff --git a/src/puya/ir/builder/assignment.py b/src/puya/ir/builder/assignment.py index d40805c34d..35b38f667b 100644 --- a/src/puya/ir/builder/assignment.py +++ b/src/puya/ir/builder/assignment.py @@ -36,19 +36,40 @@ def handle_assignment_expr( def handle_assignment( + context: IRFunctionBuildContext, + target: awst_nodes.Expression, + value: ValueProvider, + assignment_location: SourceLocation, + *, + is_mutation: bool = False, +) -> Sequence[Value]: + # separating out the target LValue check allows the _handle_assignment to statically assert + # all LValue types are covered + if not isinstance(target, awst_nodes.Lvalue): # type: ignore[arg-type] + raise CodeError("expression is not valid as an assignment target", target.source_location) + return _handle_assignment( + context, + typing.cast(awst_nodes.Lvalue, target), + value, + assignment_location, + is_mutation=is_mutation, + ) + + +def _handle_assignment( context: IRFunctionBuildContext, target: awst_nodes.Lvalue, value: ValueProvider, assignment_location: SourceLocation, *, - is_recursive_assign: bool = False, # TODO: why is this needed + is_mutation: bool, ) -> Sequence[Value]: match target: case awst_nodes.VarExpression(name=var_name, source_location=var_loc): - if ( - var_name in (p.name for p in context.subroutine.parameters if p.implicit_return) - and not is_recursive_assign - ): + is_implicit_return = var_name in ( + p.name for p in context.subroutine.parameters if p.implicit_return + ) + if is_implicit_return and not is_mutation: raise CodeError( f"Cannot reassign mutable parameter {var_name!r}" " which is being passed by reference", diff --git a/src/puya/mir/builder.py b/src/puya/mir/builder.py index fef165bc3b..e67c0bc201 100644 --- a/src/puya/mir/builder.py +++ b/src/puya/mir/builder.py @@ -3,7 +3,7 @@ import attrs from puya import log -from puya.errors import InternalError +from puya.errors import CodeError, InternalError from puya.ir import models as ir from puya.ir.types_ import AVMBytesEncoding from puya.ir.visitor import IRVisitor @@ -132,6 +132,15 @@ def visit_method_constant(self, const: ir.MethodConstant) -> None: def visit_intrinsic_op(self, intrinsic: ir.Intrinsic) -> None: discard_results = intrinsic is self.active_op + + if intrinsic.op.code.startswith("box_"): + try: + box_key = intrinsic.args[0] + except ValueError: + raise InternalError("box key arg not found", intrinsic.source_location) from None + if isinstance(box_key, ir.BytesConstant) and not box_key.value: + raise CodeError("AVM does not support empty box keys", intrinsic.source_location) + for arg in intrinsic.args: arg.accept(self) produces = len(intrinsic.op_signature.returns) diff --git a/test_cases/arc4_types/mutable_params.py b/test_cases/arc4_types/mutable_params.py index 99ec7edae5..c151e6043c 100644 --- a/test_cases/arc4_types/mutable_params.py +++ b/test_cases/arc4_types/mutable_params.py @@ -79,11 +79,8 @@ def mutating_copies(self) -> None: self.other_routine_2(my_array_copy_2) assert my_array_copy_2[0] == UInt8(10), "my_array_copy_2 should have mutated value" - # This is commented out because mutable params do not work with tuples - # self.other_routine_3((my_array, my_array_copy_2, my_array_copy_2)) - # - # assert my_array[0] == my_array_copy_2[0] == my_array_copy[0] == UInt8(99), \ - # "All arrays should be mutated" + # tuples of mutable types only work with a .copy() + self.other_routine_3((my_array.copy(), my_array_copy_2.copy(), my_array_copy_2.copy())) # Nested array items should still require a copy nested = StructWithArray(test_array=my_array.copy()) @@ -103,11 +100,10 @@ def other_routine_2(self, array: TestArray) -> TestArray: @subroutine def other_routine_3(self, arrays: tuple[TestArray, TestArray, TestArray]) -> None: - # This doesn't mutate the params + # this modifies the local copy for array in arrays: array[0] = UInt8(99) - # This also doesn't work arrays[0][0] = UInt8(99) arrays[1][0] = UInt8(99) arrays[2][0] = UInt8(99) diff --git a/test_cases/arc4_types/out/Arc4MutableParamsContract.approval.mir b/test_cases/arc4_types/out/Arc4MutableParamsContract.approval.mir index 19a25bc54a..c839b6e328 100644 --- a/test_cases/arc4_types/out/Arc4MutableParamsContract.approval.mir +++ b/test_cases/arc4_types/out/Arc4MutableParamsContract.approval.mir @@ -1,198 +1,255 @@ -// Op // Op Description Stack (out) X stack Source code Source line +// Op // Op Description Stack (out) Live (out) X stack Source code Source line #pragma version 10 // test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.approval_program() -> uint64: main_block@0: - callsub mutating_copies // self.mutating_copies() arc4_types/mutable_params.py:29 - int 1 // 1 True arc4_types/mutable_params.py:31 - return // return True arc4_types/mutable_params.py:31 + callsub mutating_copies // self.mutating_copies() arc4_types/mutable_params.py:29 + int 1 // 1 True arc4_types/mutable_params.py:31 + return // return True arc4_types/mutable_params.py:31 // test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.mutating_copies() -> void: mutating_copies: - proto 0 0 // @subroutine\ndef mutating_copies(self) -> None: arc4_types/mutable_params.py:33-34 + proto 0 0 // @subroutine\ndef mutating_copies(self) -> None: arc4_types/mutable_params.py:33-34 mutating_copies_block@0: - byte 0x01020304 // 0x01020304 StaticArray(UInt8(1), UInt8(2), UInt8(3), UInt8(4)) arc4_types/mutable_params.py:35 - byte 0x05 // 0x01020304,0x05 UInt8(5) arc4_types/mutable_params.py:46 - replace2 2 // {replace2} my_array[2] = UInt8(5) arc4_types/mutable_params.py:46 - // virtual: store my_array#1 to l-stack (no copy) my_array#1 my_array[2] = UInt8(5) arc4_types/mutable_params.py:46 - dup // load my_array#1 from l-stack (copy) my_array#1,my_array#1 my_array[2] arc4_types/mutable_params.py:49 - extract 2 1 // on error: Index access is out of bounds // my_array#1,{extract} my_array[2] arc4_types/mutable_params.py:49 - // virtual: store reinterpret_biguint%2#0 to l-stack (no copy) my_array#1,reinterpret_biguint%2#0 my_array[2] arc4_types/mutable_params.py:49 - // virtual: load reinterpret_biguint%2#0 from l-stack (no copy) my_array#1,reinterpret_biguint%2#0 my_array[2] == UInt8(5), "my_array should be mutated" arc4_types/mutable_params.py:49 - byte 0x05 // my_array#1,reinterpret_biguint%2#0,0x05 UInt8(5) arc4_types/mutable_params.py:49 - b== // my_array#1,{b==} my_array[2] == UInt8(5), "my_array should be mutated" arc4_types/mutable_params.py:49 - // virtual: store tmp%1#0 to l-stack (no copy) my_array#1,tmp%1#0 my_array[2] == UInt8(5), "my_array should be mutated" arc4_types/mutable_params.py:49 - // virtual: load tmp%1#0 from l-stack (no copy) my_array#1,tmp%1#0 assert my_array[2] == UInt8(5), "my_array should be mutated" arc4_types/mutable_params.py:49 - assert // my_array should be mutated // my_array#1 assert my_array[2] == UInt8(5), "my_array should be mutated" arc4_types/mutable_params.py:49 - // virtual: load my_array#1 from l-stack (no copy) my_array#1 to subroutine without a copy\nt, f = self.other_routine(my_array, my_struct) arc4_types/mutable_params.py:51-52 - byte 0x80320006000d00054861707079000444617973 // my_array#1,0x80320006000d00054861707079000444617973 TestStruct(\nb_val=Bool(True),\nu_val=UInt8(50),\ns_val_1=String("Happy"),\ns_val_2=String("Days"... arc4_types/mutable_params.py:36-41 - callsub other_routine // {other_routine}.0,{other_routine}.1,{other_routine}.2,{other_routine}.3 to subroutine without a copy\nt, f = self.other_routine(my_array, my_struct) arc4_types/mutable_params.py:51-52 - cover 3 // store my_struct#1 to l-stack (no copy) my_struct#1,{other_routine}.0,{other_routine}.1,{other_routine}.2 to subroutine without a copy\nt, f = self.other_routine(my_array, my_struct) arc4_types/mutable_params.py:51-52 - cover 2 // store my_array#1 to l-stack (no copy) my_struct#1,my_array#1,{other_routine}.0,{other_routine}.1 to subroutine without a copy\nt, f = self.other_routine(my_array, my_struct) arc4_types/mutable_params.py:51-52 - cover 1 // store f#0 to l-stack (no copy) my_struct#1,my_array#1,f#0,{other_routine}.0 to subroutine without a copy\nt, f = self.other_routine(my_array, my_struct) arc4_types/mutable_params.py:51-52 - // virtual: store t#0 to l-stack (no copy) my_struct#1,my_array#1,f#0,t#0 to subroutine without a copy\nt, f = self.other_routine(my_array, my_struct) arc4_types/mutable_params.py:51-52 - // virtual: load t#0 from l-stack (no copy) my_struct#1,my_array#1,f#0,t#0 assert t arc4_types/mutable_params.py:53 - assert // my_struct#1,my_array#1,f#0 assert t arc4_types/mutable_params.py:53 - // virtual: load f#0 from l-stack (no copy) my_struct#1,my_array#1,f#0 not f arc4_types/mutable_params.py:54 - ! // my_struct#1,my_array#1,{!} not f arc4_types/mutable_params.py:54 - // virtual: store tmp%2#0 to l-stack (no copy) my_struct#1,my_array#1,tmp%2#0 not f arc4_types/mutable_params.py:54 - // virtual: load tmp%2#0 from l-stack (no copy) my_struct#1,my_array#1,tmp%2#0 assert not f arc4_types/mutable_params.py:54 - assert // my_struct#1,my_array#1 assert not f arc4_types/mutable_params.py:54 - dup // load my_array#1 from l-stack (copy) my_struct#1,my_array#1,my_array#1 my_array[1] arc4_types/mutable_params.py:56 - extract 1 1 // on error: Index access is out of bounds // my_struct#1,my_array#1,{extract} my_array[1] arc4_types/mutable_params.py:56 - // virtual: store reinterpret_biguint%4#0 to l-stack (no copy) my_struct#1,my_array#1,reinterpret_biguint%4#0 my_array[1] arc4_types/mutable_params.py:56 - // virtual: load reinterpret_biguint%4#0 from l-stack (no copy) my_struct#1,my_array#1,reinterpret_biguint%4#0 my_array[1] == UInt8(5), "my_array has been mutated by the subroutine" arc4_types/mutable_params.py:56 - byte 0x05 // my_struct#1,my_array#1,reinterpret_biguint%4#0,0x05 UInt8(5) arc4_types/mutable_params.py:56 - b== // my_struct#1,my_array#1,{b==} my_array[1] == UInt8(5), "my_array has been mutated by the subroutine" arc4_types/mutable_params.py:56 - // virtual: store tmp%3#0 to l-stack (no copy) my_struct#1,my_array#1,tmp%3#0 my_array[1] == UInt8(5), "my_array has been mutated by the subroutine" arc4_types/mutable_params.py:56 - // virtual: load tmp%3#0 from l-stack (no copy) my_struct#1,my_array#1,tmp%3#0 assert my_array[1] == UInt8(5), "my_array has been mutated by the subroutine" arc4_types/mutable_params.py:56 - assert // my_array has been mutated by the subroutine // my_struct#1,my_array#1 assert my_array[1] == UInt8(5), "my_array has been mutated by the subroutine" arc4_types/mutable_params.py:56 - dig 1 // load my_struct#1 from l-stack (copy) my_struct#1,my_array#1,my_struct#1 my_struct.s_val_1 arc4_types/mutable_params.py:58 - int 2 // my_struct#1,my_array#1,my_struct#1,2 my_struct.s_val_1 arc4_types/mutable_params.py:58 - extract_uint16 // my_struct#1,my_array#1,{extract_uint16} my_struct.s_val_1 arc4_types/mutable_params.py:58 - cover 1 // store item_start_offset%0#0 to l-stack (no copy) my_struct#1,item_start_offset%0#0,my_array#1 my_struct.s_val_1 arc4_types/mutable_params.py:58 - dig 2 // load my_struct#1 from l-stack (copy) my_struct#1,item_start_offset%0#0,my_array#1,my_struct#1 my_struct.s_val_1 arc4_types/mutable_params.py:58 - int 4 // my_struct#1,item_start_offset%0#0,my_array#1,my_struct#1,4 my_struct.s_val_1 arc4_types/mutable_params.py:58 - extract_uint16 // my_struct#1,item_start_offset%0#0,my_array#1,{extract_uint16} my_struct.s_val_1 arc4_types/mutable_params.py:58 - // virtual: store item_end_offset%0#0 to l-stack (no copy) my_struct#1,item_start_offset%0#0,my_array#1,item_end_offset%0#0 my_struct.s_val_1 arc4_types/mutable_params.py:58 - uncover 3 // load my_struct#1 from l-stack (no copy) item_start_offset%0#0,my_array#1,item_end_offset%0#0,my_struct#1 my_struct.s_val_1 arc4_types/mutable_params.py:58 - uncover 3 // load item_start_offset%0#0 from l-stack (no copy) my_array#1,item_end_offset%0#0,my_struct#1,item_start_offset%0#0 my_struct.s_val_1 arc4_types/mutable_params.py:58 - uncover 2 // load item_end_offset%0#0 from l-stack (no copy) my_array#1,my_struct#1,item_start_offset%0#0,item_end_offset%0#0 my_struct.s_val_1 arc4_types/mutable_params.py:58 - substring3 // my_array#1,{substring3} my_struct.s_val_1 arc4_types/mutable_params.py:58 - // virtual: store tmp%4#0 to l-stack (no copy) my_array#1,tmp%4#0 my_struct.s_val_1 arc4_types/mutable_params.py:58 - // virtual: load tmp%4#0 from l-stack (no copy) my_array#1,tmp%4#0 my_struct.s_val_1 == String(\n"AARRGH!"\n) arc4_types/mutable_params.py:58-60 - byte 0x000741415252474821 // my_array#1,tmp%4#0,0x000741415252474821 String(\n"AARRGH!"\n) arc4_types/mutable_params.py:58-60 - == // my_array#1,{==} my_struct.s_val_1 == String(\n"AARRGH!"\n) arc4_types/mutable_params.py:58-60 - // virtual: store tmp%5#0 to l-stack (no copy) my_array#1,tmp%5#0 my_struct.s_val_1 == String(\n"AARRGH!"\n) arc4_types/mutable_params.py:58-60 - // virtual: load tmp%5#0 from l-stack (no copy) my_array#1,tmp%5#0 assert my_struct.s_val_1 == String(\n"AARRGH!"\n), "my_struct has been mutated by the subroutine" arc4_types/mutable_params.py:58-60 - assert // my_struct has been mutated by the subroutine // my_array#1 assert my_struct.s_val_1 == String(\n"AARRGH!"\n), "my_struct has been mutated by the subroutine" arc4_types/mutable_params.py:58-60 - byte 0x01020304 // my_array#1,0x01020304 StaticArray(UInt8(1), UInt8(2), UInt8(3), UInt8(4)) arc4_types/mutable_params.py:35 - byte 0x80320006000d00054861707079000444617973 // my_array#1,0x01020304,0x80320006000d00054861707079000444617973 TestStruct(\nb_val=Bool(True),\nu_val=UInt8(50),\ns_val_1=String("Happy"),\ns_val_2=String("Days"... arc4_types/mutable_params.py:36-41 - callsub other_routine // my_array#1,{other_routine}.0,{other_routine}.1,{other_routine}.2,{other_routine}.3 # Pass to subroutine with copy\nself.other_routine(my_array_copy.copy(), my_struct_copy.copy()) arc4_types/mutable_params.py:62-63 - pop // my_array#1,{other_routine}.0,{other_routine}.1,{other_routine}.2 # Pass to subroutine with copy\nself.other_routine(my_array_copy.copy(), my_struct_copy.copy()) arc4_types/mutable_params.py:62-63 - pop // my_array#1,{other_routine}.0,{other_routine}.1 # Pass to subroutine with copy\nself.other_routine(my_array_copy.copy(), my_struct_copy.copy()) arc4_types/mutable_params.py:62-63 - pop // my_array#1,{other_routine}.0 # Pass to subroutine with copy\nself.other_routine(my_array_copy.copy(), my_struct_copy.copy()) arc4_types/mutable_params.py:62-63 - pop // my_array#1 # Pass to subroutine with copy\nself.other_routine(my_array_copy.copy(), my_struct_copy.copy()) arc4_types/mutable_params.py:62-63 - byte 0x01020304 // my_array#1,0x01020304 StaticArray(UInt8(1), UInt8(2), UInt8(3), UInt8(4)) arc4_types/mutable_params.py:35 - callsub other_routine_2 // my_array#1,{other_routine_2}.0,{other_routine_2}.1 self.other_routine_2(my_array_copy_2) arc4_types/mutable_params.py:75 - pop // my_array#1,{other_routine_2}.0 self.other_routine_2(my_array_copy_2) arc4_types/mutable_params.py:75 - // virtual: store my_array_copy_2#2 to l-stack (no copy) my_array#1,my_array_copy_2#2 self.other_routine_2(my_array_copy_2) arc4_types/mutable_params.py:75 - dup // load my_array_copy_2#2 from l-stack (copy) my_array#1,my_array_copy_2#2,my_array_copy_2#2 my_array_copy_2[0] arc4_types/mutable_params.py:77 - extract 0 1 // on error: Index access is out of bounds // my_array#1,my_array_copy_2#2,{extract} my_array_copy_2[0] arc4_types/mutable_params.py:77 - // virtual: store reinterpret_biguint%8#0 to l-stack (no copy) my_array#1,my_array_copy_2#2,reinterpret_biguint%8#0 my_array_copy_2[0] arc4_types/mutable_params.py:77 - // virtual: load reinterpret_biguint%8#0 from l-stack (no copy) my_array#1,my_array_copy_2#2,reinterpret_biguint%8#0 my_array_copy_2[0] == UInt8(1), "my_array_copy_2 should have original value" arc4_types/mutable_params.py:77 - byte 0x01 // my_array#1,my_array_copy_2#2,reinterpret_biguint%8#0,0x01 UInt8(1) arc4_types/mutable_params.py:77 - b== // my_array#1,my_array_copy_2#2,{b==} my_array_copy_2[0] == UInt8(1), "my_array_copy_2 should have original value" arc4_types/mutable_params.py:77 - // virtual: store tmp%9#0 to l-stack (no copy) my_array#1,my_array_copy_2#2,tmp%9#0 my_array_copy_2[0] == UInt8(1), "my_array_copy_2 should have original value" arc4_types/mutable_params.py:77 - // virtual: load tmp%9#0 from l-stack (no copy) my_array#1,my_array_copy_2#2,tmp%9#0 assert my_array_copy_2[0] == UInt8(1), "my_array_copy_2 should have original value" arc4_types/mutable_params.py:77 - assert // my_array_copy_2 should have original value // my_array#1,my_array_copy_2#2 assert my_array_copy_2[0] == UInt8(1), "my_array_copy_2 should have original value" arc4_types/mutable_params.py:77 - // virtual: load my_array_copy_2#2 from l-stack (no copy) my_array#1,my_array_copy_2#2 self.other_routine_2(my_array_copy_2) arc4_types/mutable_params.py:79 - callsub other_routine_2 // my_array#1,{other_routine_2}.0,{other_routine_2}.1 self.other_routine_2(my_array_copy_2) arc4_types/mutable_params.py:79 - cover 1 // store my_array_copy_2#2 to l-stack (no copy) my_array#1,my_array_copy_2#2,{other_routine_2}.0 self.other_routine_2(my_array_copy_2) arc4_types/mutable_params.py:79 - pop // my_array#1,my_array_copy_2#2 self.other_routine_2(my_array_copy_2) arc4_types/mutable_params.py:79 - // virtual: load my_array_copy_2#2 from l-stack (no copy) my_array#1,my_array_copy_2#2 my_array_copy_2[0] arc4_types/mutable_params.py:80 - extract 0 1 // on error: Index access is out of bounds // my_array#1,{extract} my_array_copy_2[0] arc4_types/mutable_params.py:80 - // virtual: store reinterpret_biguint%10#0 to l-stack (no copy) my_array#1,reinterpret_biguint%10#0 my_array_copy_2[0] arc4_types/mutable_params.py:80 - // virtual: load reinterpret_biguint%10#0 from l-stack (no copy) my_array#1,reinterpret_biguint%10#0 my_array_copy_2[0] == UInt8(10), "my_array_copy_2 should have mutated value" arc4_types/mutable_params.py:80 - byte 0x0a // my_array#1,reinterpret_biguint%10#0,0x0a UInt8(10) arc4_types/mutable_params.py:80 - b== // my_array#1,{b==} my_array_copy_2[0] == UInt8(10), "my_array_copy_2 should have mutated value" arc4_types/mutable_params.py:80 - // virtual: store tmp%10#0 to l-stack (no copy) my_array#1,tmp%10#0 my_array_copy_2[0] == UInt8(10), "my_array_copy_2 should have mutated value" arc4_types/mutable_params.py:80 - // virtual: load tmp%10#0 from l-stack (no copy) my_array#1,tmp%10#0 assert my_array_copy_2[0] == UInt8(10), "my_array_copy_2 should have mutated value" arc4_types/mutable_params.py:80 - assert // my_array_copy_2 should have mutated value // my_array#1 assert my_array_copy_2[0] == UInt8(10), "my_array_copy_2 should have mutated value" arc4_types/mutable_params.py:80 - // virtual: load my_array#1 from l-stack (no copy) my_array#1 nested.test_array arc4_types/mutable_params.py:90 - extract 0 4 // on error: Index access is out of bounds // {extract} nested.test_array arc4_types/mutable_params.py:90 - // virtual: store tmp%11#0 to l-stack (no copy) tmp%11#0 nested.test_array arc4_types/mutable_params.py:90 - // virtual: load tmp%11#0 from l-stack (no copy) tmp%11#0 self.other_routine_2(nested.test_array.copy()) arc4_types/mutable_params.py:90 - callsub other_routine_2 // {other_routine_2}.0,{other_routine_2}.1 self.other_routine_2(nested.test_array.copy()) arc4_types/mutable_params.py:90 - pop // {other_routine_2}.0 self.other_routine_2(nested.test_array.copy()) arc4_types/mutable_params.py:90 - pop // self.other_routine_2(nested.test_array.copy()) arc4_types/mutable_params.py:90 - retsub // + byte 0x01020304 // 0x01020304 StaticArray(UInt8(1), UInt8(2), UInt8(3), UInt8(4)) arc4_types/mutable_params.py:35 + byte 0x05 // 0x01020304,0x05 UInt8(5) arc4_types/mutable_params.py:46 + replace2 2 // {replace2} my_array[2] = UInt8(5) arc4_types/mutable_params.py:46 + // virtual: store my_array#1 to l-stack (no copy) my_array#1 my_array[2] = UInt8(5) arc4_types/mutable_params.py:46 + dup // load my_array#1 from l-stack (copy) my_array#1,my_array#1 my_array[2] arc4_types/mutable_params.py:49 + extract 2 1 // on error: Index access is out of bounds // my_array#1,{extract} my_array[2] arc4_types/mutable_params.py:49 + // virtual: store reinterpret_biguint%2#0 to l-stack (no copy) my_array#1,reinterpret_biguint%2#0 my_array[2] arc4_types/mutable_params.py:49 + // virtual: load reinterpret_biguint%2#0 from l-stack (no copy) my_array#1,reinterpret_biguint%2#0 my_array[2] == UInt8(5), "my_array should be mutated" arc4_types/mutable_params.py:49 + byte 0x05 // my_array#1,reinterpret_biguint%2#0,0x05 UInt8(5) arc4_types/mutable_params.py:49 + b== // my_array#1,{b==} my_array[2] == UInt8(5), "my_array should be mutated" arc4_types/mutable_params.py:49 + // virtual: store tmp%1#0 to l-stack (no copy) my_array#1,tmp%1#0 my_array[2] == UInt8(5), "my_array should be mutated" arc4_types/mutable_params.py:49 + // virtual: load tmp%1#0 from l-stack (no copy) my_array#1,tmp%1#0 assert my_array[2] == UInt8(5), "my_array should be mutated" arc4_types/mutable_params.py:49 + assert // my_array should be mutated // my_array#1 assert my_array[2] == UInt8(5), "my_array should be mutated" arc4_types/mutable_params.py:49 + // virtual: load my_array#1 from l-stack (no copy) my_array#1 to subroutine without a copy\nt, f = self.other_routine(my_array, my_struct) arc4_types/mutable_params.py:51-52 + byte 0x80320006000d00054861707079000444617973 // my_array#1,0x80320006000d00054861707079000444617973 TestStruct(\nb_val=Bool(True),\nu_val=UInt8(50),\ns_val_1=String("Happy"),\ns_val_2=String("Days"... arc4_types/mutable_params.py:36-41 + callsub other_routine // {other_routine}.0,{other_routine}.1,{other_routine}.2,{other_routine}.3 to subroutine without a copy\nt, f = self.other_routine(my_array, my_struct) arc4_types/mutable_params.py:51-52 + cover 3 // store my_struct#1 to l-stack (no copy) my_struct#1,{other_routine}.0,{other_routine}.1,{other_routine}.2 to subroutine without a copy\nt, f = self.other_routine(my_array, my_struct) arc4_types/mutable_params.py:51-52 + cover 2 // store my_array#1 to l-stack (no copy) my_struct#1,my_array#1,{other_routine}.0,{other_routine}.1 to subroutine without a copy\nt, f = self.other_routine(my_array, my_struct) arc4_types/mutable_params.py:51-52 + cover 1 // store f#0 to l-stack (no copy) my_struct#1,my_array#1,f#0,{other_routine}.0 to subroutine without a copy\nt, f = self.other_routine(my_array, my_struct) arc4_types/mutable_params.py:51-52 + // virtual: store t#0 to l-stack (no copy) my_struct#1,my_array#1,f#0,t#0 to subroutine without a copy\nt, f = self.other_routine(my_array, my_struct) arc4_types/mutable_params.py:51-52 + // virtual: load t#0 from l-stack (no copy) my_struct#1,my_array#1,f#0,t#0 assert t arc4_types/mutable_params.py:53 + assert // my_struct#1,my_array#1,f#0 assert t arc4_types/mutable_params.py:53 + // virtual: load f#0 from l-stack (no copy) my_struct#1,my_array#1,f#0 not f arc4_types/mutable_params.py:54 + ! // my_struct#1,my_array#1,{!} not f arc4_types/mutable_params.py:54 + // virtual: store tmp%2#0 to l-stack (no copy) my_struct#1,my_array#1,tmp%2#0 not f arc4_types/mutable_params.py:54 + // virtual: load tmp%2#0 from l-stack (no copy) my_struct#1,my_array#1,tmp%2#0 assert not f arc4_types/mutable_params.py:54 + assert // my_struct#1,my_array#1 assert not f arc4_types/mutable_params.py:54 + dup // load my_array#1 from l-stack (copy) my_struct#1,my_array#1,my_array#1 my_array[1] arc4_types/mutable_params.py:56 + extract 1 1 // on error: Index access is out of bounds // my_struct#1,my_array#1,{extract} my_array[1] arc4_types/mutable_params.py:56 + // virtual: store reinterpret_biguint%4#0 to l-stack (no copy) my_struct#1,my_array#1,reinterpret_biguint%4#0 my_array[1] arc4_types/mutable_params.py:56 + // virtual: load reinterpret_biguint%4#0 from l-stack (no copy) my_struct#1,my_array#1,reinterpret_biguint%4#0 my_array[1] == UInt8(5), "my_array has been mutated by the subroutine" arc4_types/mutable_params.py:56 + byte 0x05 // my_struct#1,my_array#1,reinterpret_biguint%4#0,0x05 UInt8(5) arc4_types/mutable_params.py:56 + b== // my_struct#1,my_array#1,{b==} my_array[1] == UInt8(5), "my_array has been mutated by the subroutine" arc4_types/mutable_params.py:56 + // virtual: store tmp%3#0 to l-stack (no copy) my_struct#1,my_array#1,tmp%3#0 my_array[1] == UInt8(5), "my_array has been mutated by the subroutine" arc4_types/mutable_params.py:56 + // virtual: load tmp%3#0 from l-stack (no copy) my_struct#1,my_array#1,tmp%3#0 assert my_array[1] == UInt8(5), "my_array has been mutated by the subroutine" arc4_types/mutable_params.py:56 + assert // my_array has been mutated by the subroutine // my_struct#1,my_array#1 assert my_array[1] == UInt8(5), "my_array has been mutated by the subroutine" arc4_types/mutable_params.py:56 + dig 1 // load my_struct#1 from l-stack (copy) my_struct#1,my_array#1,my_struct#1 my_struct.s_val_1 arc4_types/mutable_params.py:58 + int 2 // my_struct#1,my_array#1,my_struct#1,2 my_struct.s_val_1 arc4_types/mutable_params.py:58 + extract_uint16 // my_struct#1,my_array#1,{extract_uint16} my_struct.s_val_1 arc4_types/mutable_params.py:58 + cover 1 // store item_start_offset%0#0 to l-stack (no copy) my_struct#1,item_start_offset%0#0,my_array#1 my_struct.s_val_1 arc4_types/mutable_params.py:58 + dig 2 // load my_struct#1 from l-stack (copy) my_struct#1,item_start_offset%0#0,my_array#1,my_struct#1 my_struct.s_val_1 arc4_types/mutable_params.py:58 + int 4 // my_struct#1,item_start_offset%0#0,my_array#1,my_struct#1,4 my_struct.s_val_1 arc4_types/mutable_params.py:58 + extract_uint16 // my_struct#1,item_start_offset%0#0,my_array#1,{extract_uint16} my_struct.s_val_1 arc4_types/mutable_params.py:58 + // virtual: store item_end_offset%0#0 to l-stack (no copy) my_struct#1,item_start_offset%0#0,my_array#1,item_end_offset%0#0 my_struct.s_val_1 arc4_types/mutable_params.py:58 + uncover 3 // load my_struct#1 from l-stack (no copy) item_start_offset%0#0,my_array#1,item_end_offset%0#0,my_struct#1 my_struct.s_val_1 arc4_types/mutable_params.py:58 + uncover 3 // load item_start_offset%0#0 from l-stack (no copy) my_array#1,item_end_offset%0#0,my_struct#1,item_start_offset%0#0 my_struct.s_val_1 arc4_types/mutable_params.py:58 + uncover 2 // load item_end_offset%0#0 from l-stack (no copy) my_array#1,my_struct#1,item_start_offset%0#0,item_end_offset%0#0 my_struct.s_val_1 arc4_types/mutable_params.py:58 + substring3 // my_array#1,{substring3} my_struct.s_val_1 arc4_types/mutable_params.py:58 + // virtual: store tmp%4#0 to l-stack (no copy) my_array#1,tmp%4#0 my_struct.s_val_1 arc4_types/mutable_params.py:58 + // virtual: load tmp%4#0 from l-stack (no copy) my_array#1,tmp%4#0 my_struct.s_val_1 == String(\n"AARRGH!"\n) arc4_types/mutable_params.py:58-60 + byte 0x000741415252474821 // my_array#1,tmp%4#0,0x000741415252474821 String(\n"AARRGH!"\n) arc4_types/mutable_params.py:58-60 + == // my_array#1,{==} my_struct.s_val_1 == String(\n"AARRGH!"\n) arc4_types/mutable_params.py:58-60 + // virtual: store tmp%5#0 to l-stack (no copy) my_array#1,tmp%5#0 my_struct.s_val_1 == String(\n"AARRGH!"\n) arc4_types/mutable_params.py:58-60 + // virtual: load tmp%5#0 from l-stack (no copy) my_array#1,tmp%5#0 assert my_struct.s_val_1 == String(\n"AARRGH!"\n), "my_struct has been mutated by the subroutine" arc4_types/mutable_params.py:58-60 + assert // my_struct has been mutated by the subroutine // my_array#1 assert my_struct.s_val_1 == String(\n"AARRGH!"\n), "my_struct has been mutated by the subroutine" arc4_types/mutable_params.py:58-60 + byte 0x01020304 // my_array#1,0x01020304 StaticArray(UInt8(1), UInt8(2), UInt8(3), UInt8(4)) arc4_types/mutable_params.py:35 + byte 0x80320006000d00054861707079000444617973 // my_array#1,0x01020304,0x80320006000d00054861707079000444617973 TestStruct(\nb_val=Bool(True),\nu_val=UInt8(50),\ns_val_1=String("Happy"),\ns_val_2=String("Days"... arc4_types/mutable_params.py:36-41 + callsub other_routine // my_array#1,{other_routine}.0,{other_routine}.1,{other_routine}.2,{other_routine}.3 # Pass to subroutine with copy\nself.other_routine(my_array_copy.copy(), my_struct_copy.copy()) arc4_types/mutable_params.py:62-63 + pop // my_array#1,{other_routine}.0,{other_routine}.1,{other_routine}.2 # Pass to subroutine with copy\nself.other_routine(my_array_copy.copy(), my_struct_copy.copy()) arc4_types/mutable_params.py:62-63 + pop // my_array#1,{other_routine}.0,{other_routine}.1 # Pass to subroutine with copy\nself.other_routine(my_array_copy.copy(), my_struct_copy.copy()) arc4_types/mutable_params.py:62-63 + pop // my_array#1,{other_routine}.0 # Pass to subroutine with copy\nself.other_routine(my_array_copy.copy(), my_struct_copy.copy()) arc4_types/mutable_params.py:62-63 + pop // my_array#1 # Pass to subroutine with copy\nself.other_routine(my_array_copy.copy(), my_struct_copy.copy()) arc4_types/mutable_params.py:62-63 + byte 0x01020304 // my_array#1,0x01020304 StaticArray(UInt8(1), UInt8(2), UInt8(3), UInt8(4)) arc4_types/mutable_params.py:35 + callsub other_routine_2 // my_array#1,{other_routine_2}.0,{other_routine_2}.1 self.other_routine_2(my_array_copy_2) arc4_types/mutable_params.py:75 + pop // my_array#1,{other_routine_2}.0 self.other_routine_2(my_array_copy_2) arc4_types/mutable_params.py:75 + // virtual: store my_array_copy_2#2 to l-stack (no copy) my_array#1,my_array_copy_2#2 self.other_routine_2(my_array_copy_2) arc4_types/mutable_params.py:75 + dup // load my_array_copy_2#2 from l-stack (copy) my_array#1,my_array_copy_2#2,my_array_copy_2#2 my_array_copy_2[0] arc4_types/mutable_params.py:77 + extract 0 1 // on error: Index access is out of bounds // my_array#1,my_array_copy_2#2,{extract} my_array_copy_2[0] arc4_types/mutable_params.py:77 + // virtual: store reinterpret_biguint%8#0 to l-stack (no copy) my_array#1,my_array_copy_2#2,reinterpret_biguint%8#0 my_array_copy_2[0] arc4_types/mutable_params.py:77 + // virtual: load reinterpret_biguint%8#0 from l-stack (no copy) my_array#1,my_array_copy_2#2,reinterpret_biguint%8#0 my_array_copy_2[0] == UInt8(1), "my_array_copy_2 should have original value" arc4_types/mutable_params.py:77 + byte 0x01 // my_array#1,my_array_copy_2#2,reinterpret_biguint%8#0,0x01 UInt8(1) arc4_types/mutable_params.py:77 + b== // my_array#1,my_array_copy_2#2,{b==} my_array_copy_2[0] == UInt8(1), "my_array_copy_2 should have original value" arc4_types/mutable_params.py:77 + // virtual: store tmp%9#0 to l-stack (no copy) my_array#1,my_array_copy_2#2,tmp%9#0 my_array_copy_2[0] == UInt8(1), "my_array_copy_2 should have original value" arc4_types/mutable_params.py:77 + // virtual: load tmp%9#0 from l-stack (no copy) my_array#1,my_array_copy_2#2,tmp%9#0 assert my_array_copy_2[0] == UInt8(1), "my_array_copy_2 should have original value" arc4_types/mutable_params.py:77 + assert // my_array_copy_2 should have original value // my_array#1,my_array_copy_2#2 assert my_array_copy_2[0] == UInt8(1), "my_array_copy_2 should have original value" arc4_types/mutable_params.py:77 + // virtual: load my_array_copy_2#2 from l-stack (no copy) my_array#1,my_array_copy_2#2 self.other_routine_2(my_array_copy_2) arc4_types/mutable_params.py:79 + callsub other_routine_2 // my_array#1,{other_routine_2}.0,{other_routine_2}.1 self.other_routine_2(my_array_copy_2) arc4_types/mutable_params.py:79 + cover 1 // store my_array_copy_2#2 to l-stack (no copy) my_array#1,my_array_copy_2#2,{other_routine_2}.0 self.other_routine_2(my_array_copy_2) arc4_types/mutable_params.py:79 + pop // my_array#1,my_array_copy_2#2 self.other_routine_2(my_array_copy_2) arc4_types/mutable_params.py:79 + dup // load my_array_copy_2#2 from l-stack (copy) my_array#1,my_array_copy_2#2,my_array_copy_2#2 my_array_copy_2[0] arc4_types/mutable_params.py:80 + extract 0 1 // on error: Index access is out of bounds // my_array#1,my_array_copy_2#2,{extract} my_array_copy_2[0] arc4_types/mutable_params.py:80 + // virtual: store reinterpret_biguint%10#0 to l-stack (no copy) my_array#1,my_array_copy_2#2,reinterpret_biguint%10#0 my_array_copy_2[0] arc4_types/mutable_params.py:80 + // virtual: load reinterpret_biguint%10#0 from l-stack (no copy) my_array#1,my_array_copy_2#2,reinterpret_biguint%10#0 my_array_copy_2[0] == UInt8(10), "my_array_copy_2 should have mutated value" arc4_types/mutable_params.py:80 + byte 0x0a // my_array#1,my_array_copy_2#2,reinterpret_biguint%10#0,0x0a UInt8(10) arc4_types/mutable_params.py:80 + b== // my_array#1,my_array_copy_2#2,{b==} my_array_copy_2[0] == UInt8(10), "my_array_copy_2 should have mutated value" arc4_types/mutable_params.py:80 + // virtual: store tmp%10#0 to l-stack (no copy) my_array#1,my_array_copy_2#2,tmp%10#0 my_array_copy_2[0] == UInt8(10), "my_array_copy_2 should have mutated value" arc4_types/mutable_params.py:80 + // virtual: load tmp%10#0 from l-stack (no copy) my_array#1,my_array_copy_2#2,tmp%10#0 assert my_array_copy_2[0] == UInt8(10), "my_array_copy_2 should have mutated value" arc4_types/mutable_params.py:80 + assert // my_array_copy_2 should have mutated value // my_array#1,my_array_copy_2#2 assert my_array_copy_2[0] == UInt8(10), "my_array_copy_2 should have mutated value" arc4_types/mutable_params.py:80 + dig 1 // load my_array#1 from l-stack (copy) my_array#1,my_array_copy_2#2,my_array#1 # tuples of mutable types only work with a .copy()\nself.other_routine_3((my_array.copy(), my_arr... arc4_types/mutable_params.py:82-83 + dig 1 // load my_array_copy_2#2 from l-stack (copy) my_array#1,my_array_copy_2#2,my_array#1,my_array_copy_2#2 # tuples of mutable types only work with a .copy()\nself.other_routine_3((my_array.copy(), my_arr... arc4_types/mutable_params.py:82-83 + uncover 2 // load my_array_copy_2#2 from l-stack (no copy) my_array#1,my_array#1,my_array_copy_2#2,my_array_copy_2#2 # tuples of mutable types only work with a .copy()\nself.other_routine_3((my_array.copy(), my_arr... arc4_types/mutable_params.py:82-83 + callsub other_routine_3 // my_array#1,{other_routine_3}.0,{other_routine_3}.1,{other_routine_3}.2 # tuples of mutable types only work with a .copy()\nself.other_routine_3((my_array.copy(), my_arr... arc4_types/mutable_params.py:82-83 + pop // my_array#1,{other_routine_3}.0,{other_routine_3}.1 # tuples of mutable types only work with a .copy()\nself.other_routine_3((my_array.copy(), my_arr... arc4_types/mutable_params.py:82-83 + pop // my_array#1,{other_routine_3}.0 # tuples of mutable types only work with a .copy()\nself.other_routine_3((my_array.copy(), my_arr... arc4_types/mutable_params.py:82-83 + pop // my_array#1 # tuples of mutable types only work with a .copy()\nself.other_routine_3((my_array.copy(), my_arr... arc4_types/mutable_params.py:82-83 + // virtual: load my_array#1 from l-stack (no copy) my_array#1 nested.test_array arc4_types/mutable_params.py:87 + extract 0 4 // on error: Index access is out of bounds // {extract} nested.test_array arc4_types/mutable_params.py:87 + // virtual: store tmp%11#0 to l-stack (no copy) tmp%11#0 nested.test_array arc4_types/mutable_params.py:87 + // virtual: load tmp%11#0 from l-stack (no copy) tmp%11#0 self.other_routine_2(nested.test_array.copy()) arc4_types/mutable_params.py:87 + callsub other_routine_2 // {other_routine_2}.0,{other_routine_2}.1 self.other_routine_2(nested.test_array.copy()) arc4_types/mutable_params.py:87 + pop // {other_routine_2}.0 self.other_routine_2(nested.test_array.copy()) arc4_types/mutable_params.py:87 + pop // self.other_routine_2(nested.test_array.copy()) arc4_types/mutable_params.py:87 + retsub // // test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.other_routine(array: bytes, struct: bytes) -> uint64, uint64, bytes, bytes: other_routine: - proto 2 4 // (𝕡) array#0,struct#0 | @subroutine\ndef other_routine(self, array: TestArray, struct: TestStruct) -> tuple[bool, bool]: arc4_types/mutable_params.py:92-93 + proto 2 4 // (𝕡) array#0,struct#0 | @subroutine\ndef other_routine(self, array: TestArray, struct: TestStruct) -> tuple[bool, bool]: arc4_types/mutable_params.py:89-90 other_routine_block@0: - frame_dig -2 // load array#0 from parameters (𝕡) array#0,struct#0 | array#0 array[1] = UInt8(5) arc4_types/mutable_params.py:94 - byte 0x05 // (𝕡) array#0,struct#0 | array#0,0x05 UInt8(5) arc4_types/mutable_params.py:94 - replace2 1 // (𝕡) array#0,struct#0 | {replace2} array[1] = UInt8(5) arc4_types/mutable_params.py:94 - frame_bury -2 // store array#0 to parameters (no copy) (𝕡) array#0,struct#0 | array[1] = UInt8(5) arc4_types/mutable_params.py:94 - frame_dig -1 // load struct#0 from parameters (𝕡) array#0,struct#0 | struct#0 struct.s_val_1 = String("AARRGH!") arc4_types/mutable_params.py:95 - int 2 // (𝕡) array#0,struct#0 | struct#0,2 struct.s_val_1 = String("AARRGH!") arc4_types/mutable_params.py:95 - extract_uint16 // (𝕡) array#0,struct#0 | {extract_uint16} struct.s_val_1 = String("AARRGH!") arc4_types/mutable_params.py:95 - // virtual: store item_offset%0#0 to l-stack (no copy) (𝕡) array#0,struct#0 | item_offset%0#0 struct.s_val_1 = String("AARRGH!") arc4_types/mutable_params.py:95 - frame_dig -1 // load struct#0 from parameters (𝕡) array#0,struct#0 | item_offset%0#0,struct#0 struct.s_val_1 = String("AARRGH!") arc4_types/mutable_params.py:95 - int 0 // (𝕡) array#0,struct#0 | item_offset%0#0,struct#0,0 struct.s_val_1 = String("AARRGH!") arc4_types/mutable_params.py:95 - dig 2 // load item_offset%0#0 from l-stack (copy) (𝕡) array#0,struct#0 | item_offset%0#0,struct#0,0,item_offset%0#0 struct.s_val_1 = String("AARRGH!") arc4_types/mutable_params.py:95 - extract3 // (𝕡) array#0,struct#0 | item_offset%0#0,{extract3} struct.s_val_1 = String("AARRGH!") arc4_types/mutable_params.py:95 - // virtual: store data_up_to_item%0#0 to l-stack (no copy) (𝕡) array#0,struct#0 | item_offset%0#0,data_up_to_item%0#0 struct.s_val_1 = String("AARRGH!") arc4_types/mutable_params.py:95 - frame_dig -1 // load struct#0 from parameters (𝕡) array#0,struct#0 | item_offset%0#0,data_up_to_item%0#0,struct#0 struct.s_val_1 = String("AARRGH!") arc4_types/mutable_params.py:95 - int 4 // (𝕡) array#0,struct#0 | item_offset%0#0,data_up_to_item%0#0,struct#0,4 struct.s_val_1 = String("AARRGH!") arc4_types/mutable_params.py:95 - extract_uint16 // (𝕡) array#0,struct#0 | item_offset%0#0,data_up_to_item%0#0,{extract_uint16} struct.s_val_1 = String("AARRGH!") arc4_types/mutable_params.py:95 - // virtual: store next_item_offset%0#0 to l-stack (no copy) (𝕡) array#0,struct#0 | item_offset%0#0,data_up_to_item%0#0,next_item_offset%0#0 struct.s_val_1 = String("AARRGH!") arc4_types/mutable_params.py:95 - frame_dig -1 // load struct#0 from parameters (𝕡) array#0,struct#0 | item_offset%0#0,data_up_to_item%0#0,next_item_offset%0#0,struct#0 struct.s_val_1 = String("AARRGH!") arc4_types/mutable_params.py:95 - len // (𝕡) array#0,struct#0 | item_offset%0#0,data_up_to_item%0#0,next_item_offset%0#0,{len} struct.s_val_1 = String("AARRGH!") arc4_types/mutable_params.py:95 - // virtual: store total_data_length%0#0 to l-stack (no copy) (𝕡) array#0,struct#0 | item_offset%0#0,data_up_to_item%0#0,next_item_offset%0#0,total_data_length%0#0 struct.s_val_1 = String("AARRGH!") arc4_types/mutable_params.py:95 - frame_dig -1 // load struct#0 from parameters (𝕡) array#0,struct#0 | item_offset%0#0,data_up_to_item%0#0,next_item_offset%0#0,total_data_length%0#0,struct#0 struct.s_val_1 = String("AARRGH!") arc4_types/mutable_params.py:95 - dig 2 // load next_item_offset%0#0 from l-stack (copy) (𝕡) array#0,struct#0 | item_offset%0#0,data_up_to_item%0#0,next_item_offset%0#0,total_data_length%0#0,struct#0,next_item_offset%0#0 struct.s_val_1 = String("AARRGH!") arc4_types/mutable_params.py:95 - uncover 2 // load total_data_length%0#0 from l-stack (no copy) (𝕡) array#0,struct#0 | item_offset%0#0,data_up_to_item%0#0,next_item_offset%0#0,struct#0,next_item_offset%0#0,total_data_length%0#0 struct.s_val_1 = String("AARRGH!") arc4_types/mutable_params.py:95 - substring3 // (𝕡) array#0,struct#0 | item_offset%0#0,data_up_to_item%0#0,next_item_offset%0#0,{substring3} struct.s_val_1 = String("AARRGH!") arc4_types/mutable_params.py:95 - // virtual: store data_beyond_item%0#0 to l-stack (no copy) (𝕡) array#0,struct#0 | item_offset%0#0,data_up_to_item%0#0,next_item_offset%0#0,data_beyond_item%0#0 struct.s_val_1 = String("AARRGH!") arc4_types/mutable_params.py:95 - uncover 2 // load data_up_to_item%0#0 from l-stack (no copy) (𝕡) array#0,struct#0 | item_offset%0#0,next_item_offset%0#0,data_beyond_item%0#0,data_up_to_item%0#0 struct.s_val_1 = String("AARRGH!") arc4_types/mutable_params.py:95 - byte 0x000741415252474821 // (𝕡) array#0,struct#0 | item_offset%0#0,next_item_offset%0#0,data_beyond_item%0#0,data_up_to_item%0#0,0x000741415252474821 String("AARRGH!") arc4_types/mutable_params.py:95 - concat // (𝕡) array#0,struct#0 | item_offset%0#0,next_item_offset%0#0,data_beyond_item%0#0,{concat} struct.s_val_1 = String("AARRGH!") arc4_types/mutable_params.py:95 - // virtual: store updated_data%0#0 to l-stack (no copy) (𝕡) array#0,struct#0 | item_offset%0#0,next_item_offset%0#0,data_beyond_item%0#0,updated_data%0#0 struct.s_val_1 = String("AARRGH!") arc4_types/mutable_params.py:95 - // virtual: load updated_data%0#0 from l-stack (no copy) (𝕡) array#0,struct#0 | item_offset%0#0,next_item_offset%0#0,data_beyond_item%0#0,updated_data%0#0 struct.s_val_1 = String("AARRGH!") arc4_types/mutable_params.py:95 - uncover 1 // load data_beyond_item%0#0 from l-stack (no copy) (𝕡) array#0,struct#0 | item_offset%0#0,next_item_offset%0#0,updated_data%0#0,data_beyond_item%0#0 struct.s_val_1 = String("AARRGH!") arc4_types/mutable_params.py:95 - concat // (𝕡) array#0,struct#0 | item_offset%0#0,next_item_offset%0#0,{concat} struct.s_val_1 = String("AARRGH!") arc4_types/mutable_params.py:95 - // virtual: store updated_data%1#0 to l-stack (no copy) (𝕡) array#0,struct#0 | item_offset%0#0,next_item_offset%0#0,updated_data%1#0 struct.s_val_1 = String("AARRGH!") arc4_types/mutable_params.py:95 - uncover 1 // load next_item_offset%0#0 from l-stack (no copy) (𝕡) array#0,struct#0 | item_offset%0#0,updated_data%1#0,next_item_offset%0#0 struct.s_val_1 = String("AARRGH!") arc4_types/mutable_params.py:95 - uncover 2 // load item_offset%0#0 from l-stack (no copy) (𝕡) array#0,struct#0 | updated_data%1#0,next_item_offset%0#0,item_offset%0#0 struct.s_val_1 = String("AARRGH!") arc4_types/mutable_params.py:95 - - // (𝕡) array#0,struct#0 | updated_data%1#0,{-} struct.s_val_1 = String("AARRGH!") arc4_types/mutable_params.py:95 - cover 1 // store item_length%0#0 to l-stack (no copy) (𝕡) array#0,struct#0 | item_length%0#0,updated_data%1#0 struct.s_val_1 = String("AARRGH!") arc4_types/mutable_params.py:95 - dup // load updated_data%1#0 from l-stack (copy) (𝕡) array#0,struct#0 | item_length%0#0,updated_data%1#0,updated_data%1#0 struct.s_val_1 = String("AARRGH!") arc4_types/mutable_params.py:95 - int 4 // (𝕡) array#0,struct#0 | item_length%0#0,updated_data%1#0,updated_data%1#0,4 struct.s_val_1 = String("AARRGH!") arc4_types/mutable_params.py:95 - extract_uint16 // (𝕡) array#0,struct#0 | item_length%0#0,updated_data%1#0,{extract_uint16} struct.s_val_1 = String("AARRGH!") arc4_types/mutable_params.py:95 - // virtual: store tail_offset%0#0 to l-stack (no copy) (𝕡) array#0,struct#0 | item_length%0#0,updated_data%1#0,tail_offset%0#0 struct.s_val_1 = String("AARRGH!") arc4_types/mutable_params.py:95 - // virtual: load tail_offset%0#0 from l-stack (no copy) (𝕡) array#0,struct#0 | item_length%0#0,updated_data%1#0,tail_offset%0#0 struct.s_val_1 = String("AARRGH!") arc4_types/mutable_params.py:95 - int 9 // (𝕡) array#0,struct#0 | item_length%0#0,updated_data%1#0,tail_offset%0#0,9 struct.s_val_1 = String("AARRGH!") arc4_types/mutable_params.py:95 - + // (𝕡) array#0,struct#0 | item_length%0#0,updated_data%1#0,{+} struct.s_val_1 = String("AARRGH!") arc4_types/mutable_params.py:95 - // virtual: store tail_offset%1#0 to l-stack (no copy) (𝕡) array#0,struct#0 | item_length%0#0,updated_data%1#0,tail_offset%1#0 struct.s_val_1 = String("AARRGH!") arc4_types/mutable_params.py:95 - // virtual: load tail_offset%1#0 from l-stack (no copy) (𝕡) array#0,struct#0 | item_length%0#0,updated_data%1#0,tail_offset%1#0 struct.s_val_1 = String("AARRGH!") arc4_types/mutable_params.py:95 - uncover 2 // load item_length%0#0 from l-stack (no copy) (𝕡) array#0,struct#0 | updated_data%1#0,tail_offset%1#0,item_length%0#0 struct.s_val_1 = String("AARRGH!") arc4_types/mutable_params.py:95 - - // (𝕡) array#0,struct#0 | updated_data%1#0,{-} struct.s_val_1 = String("AARRGH!") arc4_types/mutable_params.py:95 - // virtual: store tail_offset%2#0 to l-stack (no copy) (𝕡) array#0,struct#0 | updated_data%1#0,tail_offset%2#0 struct.s_val_1 = String("AARRGH!") arc4_types/mutable_params.py:95 - // virtual: load tail_offset%2#0 from l-stack (no copy) (𝕡) array#0,struct#0 | updated_data%1#0,tail_offset%2#0 struct.s_val_1 = String("AARRGH!") arc4_types/mutable_params.py:95 - itob // (𝕡) array#0,struct#0 | updated_data%1#0,{itob} struct.s_val_1 = String("AARRGH!") arc4_types/mutable_params.py:95 - // virtual: store as_bytes%1#0 to l-stack (no copy) (𝕡) array#0,struct#0 | updated_data%1#0,as_bytes%1#0 struct.s_val_1 = String("AARRGH!") arc4_types/mutable_params.py:95 - // virtual: load as_bytes%1#0 from l-stack (no copy) (𝕡) array#0,struct#0 | updated_data%1#0,as_bytes%1#0 struct.s_val_1 = String("AARRGH!") arc4_types/mutable_params.py:95 - extract 6 2 // (𝕡) array#0,struct#0 | updated_data%1#0,{extract} struct.s_val_1 = String("AARRGH!") arc4_types/mutable_params.py:95 - // virtual: store tail_offset_bytes%0#0 to l-stack (no copy) (𝕡) array#0,struct#0 | updated_data%1#0,tail_offset_bytes%0#0 struct.s_val_1 = String("AARRGH!") arc4_types/mutable_params.py:95 - // virtual: load updated_data%1#0 from l-stack (no copy) (𝕡) array#0,struct#0 | tail_offset_bytes%0#0,updated_data%1#0 struct.s_val_1 = String("AARRGH!") arc4_types/mutable_params.py:95 - // virtual: load tail_offset_bytes%0#0 from l-stack (no copy) (𝕡) array#0,struct#0 | updated_data%1#0,tail_offset_bytes%0#0 struct.s_val_1 = String("AARRGH!") arc4_types/mutable_params.py:95 - replace2 4 // (𝕡) array#0,struct#0 | {replace2} struct.s_val_1 = String("AARRGH!") arc4_types/mutable_params.py:95 - frame_bury -1 // store struct#0 to parameters (no copy) (𝕡) array#0,struct#0 | struct.s_val_1 = String("AARRGH!") arc4_types/mutable_params.py:95 - int 1 // (𝕡) array#0,struct#0 | 1 True arc4_types/mutable_params.py:96 - int 0 // (𝕡) array#0,struct#0 | 1,0 False arc4_types/mutable_params.py:96 - frame_dig -2 // load array#0 from parameters (𝕡) array#0,struct#0 | 1,0,array#0 return True, False arc4_types/mutable_params.py:96 - frame_dig -1 // load struct#0 from parameters (𝕡) array#0,struct#0 | 1,0,array#0,struct#0 return True, False arc4_types/mutable_params.py:96 - retsub // 1,0,array#0,struct#0 return True, False arc4_types/mutable_params.py:96 + frame_dig -2 // load array#0 from parameters (𝕡) array#0,struct#0 | array#0 array[1] = UInt8(5) arc4_types/mutable_params.py:91 + byte 0x05 // (𝕡) array#0,struct#0 | array#0,0x05 UInt8(5) arc4_types/mutable_params.py:91 + replace2 1 // (𝕡) array#0,struct#0 | {replace2} array[1] = UInt8(5) arc4_types/mutable_params.py:91 + frame_bury -2 // store array#0 to parameters (no copy) (𝕡) array#0,struct#0 | array[1] = UInt8(5) arc4_types/mutable_params.py:91 + frame_dig -1 // load struct#0 from parameters (𝕡) array#0,struct#0 | struct#0 struct.s_val_1 = String("AARRGH!") arc4_types/mutable_params.py:92 + int 2 // (𝕡) array#0,struct#0 | struct#0,2 struct.s_val_1 = String("AARRGH!") arc4_types/mutable_params.py:92 + extract_uint16 // (𝕡) array#0,struct#0 | {extract_uint16} struct.s_val_1 = String("AARRGH!") arc4_types/mutable_params.py:92 + // virtual: store item_offset%0#0 to l-stack (no copy) (𝕡) array#0,struct#0 | item_offset%0#0 struct.s_val_1 = String("AARRGH!") arc4_types/mutable_params.py:92 + frame_dig -1 // load struct#0 from parameters (𝕡) array#0,struct#0 | item_offset%0#0,struct#0 struct.s_val_1 = String("AARRGH!") arc4_types/mutable_params.py:92 + int 0 // (𝕡) array#0,struct#0 | item_offset%0#0,struct#0,0 struct.s_val_1 = String("AARRGH!") arc4_types/mutable_params.py:92 + dig 2 // load item_offset%0#0 from l-stack (copy) (𝕡) array#0,struct#0 | item_offset%0#0,struct#0,0,item_offset%0#0 struct.s_val_1 = String("AARRGH!") arc4_types/mutable_params.py:92 + extract3 // (𝕡) array#0,struct#0 | item_offset%0#0,{extract3} struct.s_val_1 = String("AARRGH!") arc4_types/mutable_params.py:92 + // virtual: store data_up_to_item%0#0 to l-stack (no copy) (𝕡) array#0,struct#0 | item_offset%0#0,data_up_to_item%0#0 struct.s_val_1 = String("AARRGH!") arc4_types/mutable_params.py:92 + frame_dig -1 // load struct#0 from parameters (𝕡) array#0,struct#0 | item_offset%0#0,data_up_to_item%0#0,struct#0 struct.s_val_1 = String("AARRGH!") arc4_types/mutable_params.py:92 + int 4 // (𝕡) array#0,struct#0 | item_offset%0#0,data_up_to_item%0#0,struct#0,4 struct.s_val_1 = String("AARRGH!") arc4_types/mutable_params.py:92 + extract_uint16 // (𝕡) array#0,struct#0 | item_offset%0#0,data_up_to_item%0#0,{extract_uint16} struct.s_val_1 = String("AARRGH!") arc4_types/mutable_params.py:92 + // virtual: store next_item_offset%0#0 to l-stack (no copy) (𝕡) array#0,struct#0 | item_offset%0#0,data_up_to_item%0#0,next_item_offset%0#0 struct.s_val_1 = String("AARRGH!") arc4_types/mutable_params.py:92 + frame_dig -1 // load struct#0 from parameters (𝕡) array#0,struct#0 | item_offset%0#0,data_up_to_item%0#0,next_item_offset%0#0,struct#0 struct.s_val_1 = String("AARRGH!") arc4_types/mutable_params.py:92 + len // (𝕡) array#0,struct#0 | item_offset%0#0,data_up_to_item%0#0,next_item_offset%0#0,{len} struct.s_val_1 = String("AARRGH!") arc4_types/mutable_params.py:92 + // virtual: store total_data_length%0#0 to l-stack (no copy) (𝕡) array#0,struct#0 | item_offset%0#0,data_up_to_item%0#0,next_item_offset%0#0,total_data_length%0#0 struct.s_val_1 = String("AARRGH!") arc4_types/mutable_params.py:92 + frame_dig -1 // load struct#0 from parameters (𝕡) array#0,struct#0 | item_offset%0#0,data_up_to_item%0#0,next_item_offset%0#0,total_data_length%0#0,struct#0 struct.s_val_1 = String("AARRGH!") arc4_types/mutable_params.py:92 + dig 2 // load next_item_offset%0#0 from l-stack (copy) (𝕡) array#0,struct#0 | item_offset%0#0,data_up_to_item%0#0,next_item_offset%0#0,total_data_length%0#0,struct#0,next_item_offset%0#0 struct.s_val_1 = String("AARRGH!") arc4_types/mutable_params.py:92 + uncover 2 // load total_data_length%0#0 from l-stack (no copy) (𝕡) array#0,struct#0 | item_offset%0#0,data_up_to_item%0#0,next_item_offset%0#0,struct#0,next_item_offset%0#0,total_data_length%0#0 struct.s_val_1 = String("AARRGH!") arc4_types/mutable_params.py:92 + substring3 // (𝕡) array#0,struct#0 | item_offset%0#0,data_up_to_item%0#0,next_item_offset%0#0,{substring3} struct.s_val_1 = String("AARRGH!") arc4_types/mutable_params.py:92 + // virtual: store data_beyond_item%0#0 to l-stack (no copy) (𝕡) array#0,struct#0 | item_offset%0#0,data_up_to_item%0#0,next_item_offset%0#0,data_beyond_item%0#0 struct.s_val_1 = String("AARRGH!") arc4_types/mutable_params.py:92 + uncover 2 // load data_up_to_item%0#0 from l-stack (no copy) (𝕡) array#0,struct#0 | item_offset%0#0,next_item_offset%0#0,data_beyond_item%0#0,data_up_to_item%0#0 struct.s_val_1 = String("AARRGH!") arc4_types/mutable_params.py:92 + byte 0x000741415252474821 // (𝕡) array#0,struct#0 | item_offset%0#0,next_item_offset%0#0,data_beyond_item%0#0,data_up_to_item%0#0,0x000741415252474821 String("AARRGH!") arc4_types/mutable_params.py:92 + concat // (𝕡) array#0,struct#0 | item_offset%0#0,next_item_offset%0#0,data_beyond_item%0#0,{concat} struct.s_val_1 = String("AARRGH!") arc4_types/mutable_params.py:92 + // virtual: store updated_data%0#0 to l-stack (no copy) (𝕡) array#0,struct#0 | item_offset%0#0,next_item_offset%0#0,data_beyond_item%0#0,updated_data%0#0 struct.s_val_1 = String("AARRGH!") arc4_types/mutable_params.py:92 + // virtual: load updated_data%0#0 from l-stack (no copy) (𝕡) array#0,struct#0 | item_offset%0#0,next_item_offset%0#0,data_beyond_item%0#0,updated_data%0#0 struct.s_val_1 = String("AARRGH!") arc4_types/mutable_params.py:92 + uncover 1 // load data_beyond_item%0#0 from l-stack (no copy) (𝕡) array#0,struct#0 | item_offset%0#0,next_item_offset%0#0,updated_data%0#0,data_beyond_item%0#0 struct.s_val_1 = String("AARRGH!") arc4_types/mutable_params.py:92 + concat // (𝕡) array#0,struct#0 | item_offset%0#0,next_item_offset%0#0,{concat} struct.s_val_1 = String("AARRGH!") arc4_types/mutable_params.py:92 + // virtual: store updated_data%1#0 to l-stack (no copy) (𝕡) array#0,struct#0 | item_offset%0#0,next_item_offset%0#0,updated_data%1#0 struct.s_val_1 = String("AARRGH!") arc4_types/mutable_params.py:92 + uncover 1 // load next_item_offset%0#0 from l-stack (no copy) (𝕡) array#0,struct#0 | item_offset%0#0,updated_data%1#0,next_item_offset%0#0 struct.s_val_1 = String("AARRGH!") arc4_types/mutable_params.py:92 + uncover 2 // load item_offset%0#0 from l-stack (no copy) (𝕡) array#0,struct#0 | updated_data%1#0,next_item_offset%0#0,item_offset%0#0 struct.s_val_1 = String("AARRGH!") arc4_types/mutable_params.py:92 + - // (𝕡) array#0,struct#0 | updated_data%1#0,{-} struct.s_val_1 = String("AARRGH!") arc4_types/mutable_params.py:92 + cover 1 // store item_length%0#0 to l-stack (no copy) (𝕡) array#0,struct#0 | item_length%0#0,updated_data%1#0 struct.s_val_1 = String("AARRGH!") arc4_types/mutable_params.py:92 + dup // load updated_data%1#0 from l-stack (copy) (𝕡) array#0,struct#0 | item_length%0#0,updated_data%1#0,updated_data%1#0 struct.s_val_1 = String("AARRGH!") arc4_types/mutable_params.py:92 + int 4 // (𝕡) array#0,struct#0 | item_length%0#0,updated_data%1#0,updated_data%1#0,4 struct.s_val_1 = String("AARRGH!") arc4_types/mutable_params.py:92 + extract_uint16 // (𝕡) array#0,struct#0 | item_length%0#0,updated_data%1#0,{extract_uint16} struct.s_val_1 = String("AARRGH!") arc4_types/mutable_params.py:92 + // virtual: store tail_offset%0#0 to l-stack (no copy) (𝕡) array#0,struct#0 | item_length%0#0,updated_data%1#0,tail_offset%0#0 struct.s_val_1 = String("AARRGH!") arc4_types/mutable_params.py:92 + // virtual: load tail_offset%0#0 from l-stack (no copy) (𝕡) array#0,struct#0 | item_length%0#0,updated_data%1#0,tail_offset%0#0 struct.s_val_1 = String("AARRGH!") arc4_types/mutable_params.py:92 + int 9 // (𝕡) array#0,struct#0 | item_length%0#0,updated_data%1#0,tail_offset%0#0,9 struct.s_val_1 = String("AARRGH!") arc4_types/mutable_params.py:92 + + // (𝕡) array#0,struct#0 | item_length%0#0,updated_data%1#0,{+} struct.s_val_1 = String("AARRGH!") arc4_types/mutable_params.py:92 + // virtual: store tail_offset%1#0 to l-stack (no copy) (𝕡) array#0,struct#0 | item_length%0#0,updated_data%1#0,tail_offset%1#0 struct.s_val_1 = String("AARRGH!") arc4_types/mutable_params.py:92 + // virtual: load tail_offset%1#0 from l-stack (no copy) (𝕡) array#0,struct#0 | item_length%0#0,updated_data%1#0,tail_offset%1#0 struct.s_val_1 = String("AARRGH!") arc4_types/mutable_params.py:92 + uncover 2 // load item_length%0#0 from l-stack (no copy) (𝕡) array#0,struct#0 | updated_data%1#0,tail_offset%1#0,item_length%0#0 struct.s_val_1 = String("AARRGH!") arc4_types/mutable_params.py:92 + - // (𝕡) array#0,struct#0 | updated_data%1#0,{-} struct.s_val_1 = String("AARRGH!") arc4_types/mutable_params.py:92 + // virtual: store tail_offset%2#0 to l-stack (no copy) (𝕡) array#0,struct#0 | updated_data%1#0,tail_offset%2#0 struct.s_val_1 = String("AARRGH!") arc4_types/mutable_params.py:92 + // virtual: load tail_offset%2#0 from l-stack (no copy) (𝕡) array#0,struct#0 | updated_data%1#0,tail_offset%2#0 struct.s_val_1 = String("AARRGH!") arc4_types/mutable_params.py:92 + itob // (𝕡) array#0,struct#0 | updated_data%1#0,{itob} struct.s_val_1 = String("AARRGH!") arc4_types/mutable_params.py:92 + // virtual: store as_bytes%1#0 to l-stack (no copy) (𝕡) array#0,struct#0 | updated_data%1#0,as_bytes%1#0 struct.s_val_1 = String("AARRGH!") arc4_types/mutable_params.py:92 + // virtual: load as_bytes%1#0 from l-stack (no copy) (𝕡) array#0,struct#0 | updated_data%1#0,as_bytes%1#0 struct.s_val_1 = String("AARRGH!") arc4_types/mutable_params.py:92 + extract 6 2 // (𝕡) array#0,struct#0 | updated_data%1#0,{extract} struct.s_val_1 = String("AARRGH!") arc4_types/mutable_params.py:92 + // virtual: store tail_offset_bytes%0#0 to l-stack (no copy) (𝕡) array#0,struct#0 | updated_data%1#0,tail_offset_bytes%0#0 struct.s_val_1 = String("AARRGH!") arc4_types/mutable_params.py:92 + // virtual: load updated_data%1#0 from l-stack (no copy) (𝕡) array#0,struct#0 | tail_offset_bytes%0#0,updated_data%1#0 struct.s_val_1 = String("AARRGH!") arc4_types/mutable_params.py:92 + // virtual: load tail_offset_bytes%0#0 from l-stack (no copy) (𝕡) array#0,struct#0 | updated_data%1#0,tail_offset_bytes%0#0 struct.s_val_1 = String("AARRGH!") arc4_types/mutable_params.py:92 + replace2 4 // (𝕡) array#0,struct#0 | {replace2} struct.s_val_1 = String("AARRGH!") arc4_types/mutable_params.py:92 + frame_bury -1 // store struct#0 to parameters (no copy) (𝕡) array#0,struct#0 | struct.s_val_1 = String("AARRGH!") arc4_types/mutable_params.py:92 + int 1 // (𝕡) array#0,struct#0 | 1 True arc4_types/mutable_params.py:93 + int 0 // (𝕡) array#0,struct#0 | 1,0 False arc4_types/mutable_params.py:93 + frame_dig -2 // load array#0 from parameters (𝕡) array#0,struct#0 | 1,0,array#0 return True, False arc4_types/mutable_params.py:93 + frame_dig -1 // load struct#0 from parameters (𝕡) array#0,struct#0 | 1,0,array#0,struct#0 return True, False arc4_types/mutable_params.py:93 + retsub // 1,0,array#0,struct#0 return True, False arc4_types/mutable_params.py:93 // test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.other_routine_2(array: bytes) -> bytes, bytes: other_routine_2: - proto 1 2 // (𝕡) array#0 | @subroutine\ndef other_routine_2(self, array: TestArray) -> TestArray: arc4_types/mutable_params.py:98-99 + proto 1 2 // (𝕡) array#0 | @subroutine\ndef other_routine_2(self, array: TestArray) -> TestArray: arc4_types/mutable_params.py:95-96 other_routine_2_block@0: - frame_dig -1 // load array#0 from parameters (𝕡) array#0 | array#0 array[0] = UInt8(10) arc4_types/mutable_params.py:101 - byte 0x0a // (𝕡) array#0 | array#0,0x0a UInt8(10) arc4_types/mutable_params.py:101 - replace2 0 // (𝕡) array#0 | {replace2} array[0] = UInt8(10) arc4_types/mutable_params.py:101 - // virtual: store array#1 to l-stack (no copy) (𝕡) array#0 | array#1 array[0] = UInt8(10) arc4_types/mutable_params.py:101 - frame_dig -1 // load array#0 from parameters (𝕡) array#0 | array#1,array#0 return copy arc4_types/mutable_params.py:102 - uncover 1 // load array#1 from l-stack (no copy) (𝕡) array#0 | array#0,array#1 return copy arc4_types/mutable_params.py:102 - retsub // array#0,array#1 return copy arc4_types/mutable_params.py:102 + frame_dig -1 // load array#0 from parameters (𝕡) array#0 | array#0 array[0] = UInt8(10) arc4_types/mutable_params.py:98 + byte 0x0a // (𝕡) array#0 | array#0,0x0a UInt8(10) arc4_types/mutable_params.py:98 + replace2 0 // (𝕡) array#0 | {replace2} array[0] = UInt8(10) arc4_types/mutable_params.py:98 + // virtual: store array#1 to l-stack (no copy) (𝕡) array#0 | array#1 array[0] = UInt8(10) arc4_types/mutable_params.py:98 + frame_dig -1 // load array#0 from parameters (𝕡) array#0 | array#1,array#0 return copy arc4_types/mutable_params.py:99 + uncover 1 // load array#1 from l-stack (no copy) (𝕡) array#0 | array#0,array#1 return copy arc4_types/mutable_params.py:99 + retsub // array#0,array#1 return copy arc4_types/mutable_params.py:99 + + +// test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.other_routine_3(arrays.0: bytes, arrays.1: bytes, arrays.2: bytes) -> bytes, bytes, bytes: +other_routine_3: + proto 3 3 // (𝕡) arrays.0#0,arrays.1#0,arrays.2#0 | @subroutine\ndef other_routine_3(self, arrays: tuple[TestArray, TestArray, TestArray]) -> None: arc4_types/mutable_params.py:101-102 + byte "" // allocate 1 to stack (𝕡) arrays.0#0,arrays.1#0,arrays.2#0 | (𝕗) tuple_index%0#4 | + +other_routine_3_block@0: + int 0 // (𝕡) arrays.0#0,arrays.1#0,arrays.2#0 | (𝕗) tuple_index%0#4 | 0 + // virtual: store tuple_index%0#0 to x-stack (no copy) (𝕡) arrays.0#0,arrays.1#0,arrays.2#0 | (𝕗) tuple_index%0#4 | (𝕏) tuple_index%0#0 | + b other_routine_3_for_body@4 // (𝕡) arrays.0#0,arrays.1#0,arrays.2#0 | (𝕗) tuple_index%0#4 | (𝕏) tuple_index%0#0 | tuple_index%0#0 + +other_routine_3_for_header_1@2: + frame_dig 0 // load tuple_index%0#4 from f-stack (𝕡) arrays.0#0,arrays.1#0,arrays.2#0 | (𝕗) tuple_index%0#4 | tuple_index%0#4 + // virtual: store tuple_index%0#0 to x-stack (no copy) (𝕡) arrays.0#0,arrays.1#0,arrays.2#0 | (𝕗) tuple_index%0#4 | (𝕏) tuple_index%0#0 | + b other_routine_3_for_body@4 // (𝕡) arrays.0#0,arrays.1#0,arrays.2#0 | (𝕗) tuple_index%0#4 | (𝕏) tuple_index%0#0 | tuple_index%0#0 + +other_routine_3_for_header_2@3: + frame_dig 0 // load tuple_index%0#4 from f-stack (𝕡) arrays.0#0,arrays.1#0,arrays.2#0 | (𝕗) tuple_index%0#4 | tuple_index%0#4 + // virtual: store tuple_index%0#0 to x-stack (no copy) (𝕡) arrays.0#0,arrays.1#0,arrays.2#0 | (𝕗) tuple_index%0#4 | (𝕏) tuple_index%0#0 | + // Implicit fall through to other_routine_3_for_body@4 // (𝕡) arrays.0#0,arrays.1#0,arrays.2#0 | (𝕗) tuple_index%0#4 | (𝕏) tuple_index%0#0 | tuple_index%0#0 + +other_routine_3_for_body@4: + // virtual: load tuple_index%0#0 from x-stack (𝕡) arrays.0#0,arrays.1#0,arrays.2#0 | (𝕗) tuple_index%0#4 | tuple_index%0#0 tuple_index%0#0 + dup // store tuple_index%0#0 to l-stack (copy) (𝕡) arrays.0#0,arrays.1#0,arrays.2#0 | (𝕗) tuple_index%0#4 | tuple_index%0#0,tuple_index%0#0 + int 1 // (𝕡) arrays.0#0,arrays.1#0,arrays.2#0 | (𝕗) tuple_index%0#4 | tuple_index%0#0,tuple_index%0#0,1 + + // (𝕡) arrays.0#0,arrays.1#0,arrays.2#0 | (𝕗) tuple_index%0#4 | tuple_index%0#0,{+} + frame_bury 0 // store tuple_index%0#4 to f-stack (𝕡) arrays.0#0,arrays.1#0,arrays.2#0 | (𝕗) tuple_index%0#4 | tuple_index%0#0 + // virtual: load tuple_index%0#0 from l-stack (no copy) (𝕡) arrays.0#0,arrays.1#0,arrays.2#0 | (𝕗) tuple_index%0#4 | tuple_index%0#0 # this modifies the local copy\nfor array in arrays: arc4_types/mutable_params.py:103-104 + switch other_routine_3_for_header_1@2 other_routine_3_for_header_2@3 // (𝕡) arrays.0#0,arrays.1#0,arrays.2#0 | (𝕗) tuple_index%0#4 | # this modifies the local copy\nfor array in arrays: arc4_types/mutable_params.py:103-104 + // Implicit fall through to other_routine_3_after_for@6 // (𝕡) arrays.0#0,arrays.1#0,arrays.2#0 | (𝕗) tuple_index%0#4 | # this modifies the local copy\nfor array in arrays: arc4_types/mutable_params.py:103-104 + +other_routine_3_after_for@6: + frame_dig -3 // load arrays.0#0 from parameters (𝕡) arrays.0#0,arrays.1#0,arrays.2#0 | (𝕗) tuple_index%0#4 | arrays.0#0 arrays[0][0] = UInt8(99) arc4_types/mutable_params.py:107 + byte 0x63 // (𝕡) arrays.0#0,arrays.1#0,arrays.2#0 | (𝕗) tuple_index%0#4 | arrays.0#0,0x63 UInt8(99) arc4_types/mutable_params.py:107 + replace2 0 // (𝕡) arrays.0#0,arrays.1#0,arrays.2#0 | (𝕗) tuple_index%0#4 | {replace2} arrays[0][0] = UInt8(99) arc4_types/mutable_params.py:107 + frame_bury -3 // store arrays.0#0 to parameters (no copy) (𝕡) arrays.0#0,arrays.1#0,arrays.2#0 | (𝕗) tuple_index%0#4 | arrays[0][0] = UInt8(99) arc4_types/mutable_params.py:107 + frame_dig -2 // load arrays.1#0 from parameters (𝕡) arrays.0#0,arrays.1#0,arrays.2#0 | (𝕗) tuple_index%0#4 | arrays.1#0 arrays[1][0] = UInt8(99) arc4_types/mutable_params.py:108 + byte 0x63 // (𝕡) arrays.0#0,arrays.1#0,arrays.2#0 | (𝕗) tuple_index%0#4 | arrays.1#0,0x63 UInt8(99) arc4_types/mutable_params.py:108 + replace2 0 // (𝕡) arrays.0#0,arrays.1#0,arrays.2#0 | (𝕗) tuple_index%0#4 | {replace2} arrays[1][0] = UInt8(99) arc4_types/mutable_params.py:108 + frame_bury -2 // store arrays.1#0 to parameters (no copy) (𝕡) arrays.0#0,arrays.1#0,arrays.2#0 | (𝕗) tuple_index%0#4 | arrays[1][0] = UInt8(99) arc4_types/mutable_params.py:108 + frame_dig -1 // load arrays.2#0 from parameters (𝕡) arrays.0#0,arrays.1#0,arrays.2#0 | (𝕗) tuple_index%0#4 | arrays.2#0 arrays[2][0] = UInt8(99) arc4_types/mutable_params.py:109 + byte 0x63 // (𝕡) arrays.0#0,arrays.1#0,arrays.2#0 | (𝕗) tuple_index%0#4 | arrays.2#0,0x63 UInt8(99) arc4_types/mutable_params.py:109 + replace2 0 // (𝕡) arrays.0#0,arrays.1#0,arrays.2#0 | (𝕗) tuple_index%0#4 | {replace2} arrays[2][0] = UInt8(99) arc4_types/mutable_params.py:109 + frame_bury -1 // store arrays.2#0 to parameters (no copy) (𝕡) arrays.0#0,arrays.1#0,arrays.2#0 | (𝕗) tuple_index%0#4 | arrays[2][0] = UInt8(99) arc4_types/mutable_params.py:109 + frame_dig -3 // load arrays.0#0 from parameters (𝕡) arrays.0#0,arrays.1#0,arrays.2#0 | (𝕗) tuple_index%0#4 | arrays.0#0 + frame_dig -2 // load arrays.1#0 from parameters (𝕡) arrays.0#0,arrays.1#0,arrays.2#0 | (𝕗) tuple_index%0#4 | arrays.0#0,arrays.1#0 + frame_dig -1 // load arrays.2#0 from parameters (𝕡) arrays.0#0,arrays.1#0,arrays.2#0 | (𝕗) tuple_index%0#4 | arrays.0#0,arrays.1#0,arrays.2#0 + uncover 3 + retsub // arrays.0#0,arrays.1#0,arrays.2#0 diff --git a/test_cases/arc4_types/out/Arc4MutableParamsContract.approval.teal b/test_cases/arc4_types/out/Arc4MutableParamsContract.approval.teal index 24949c0706..0a58139c98 100644 --- a/test_cases/arc4_types/out/Arc4MutableParamsContract.approval.teal +++ b/test_cases/arc4_types/out/Arc4MutableParamsContract.approval.teal @@ -115,11 +115,19 @@ mutating_copies: bury 1 // arc4_types/mutable_params.py:80 // assert my_array_copy_2[0] == UInt8(10), "my_array_copy_2 should have mutated value" + dup extract 0 1 // on error: Index access is out of bounds byte 0x0a b== assert // my_array_copy_2 should have mutated value - // arc4_types/mutable_params.py:90 + // arc4_types/mutable_params.py:82-83 + // # tuples of mutable types only work with a .copy() + // self.other_routine_3((my_array.copy(), my_array_copy_2.copy(), my_array_copy_2.copy())) + dup2 + uncover 2 + callsub other_routine_3 + popn 3 + // arc4_types/mutable_params.py:87 // self.other_routine_2(nested.test_array.copy()) extract 0 4 // on error: Index access is out of bounds callsub other_routine_2 @@ -129,17 +137,17 @@ mutating_copies: // test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.other_routine(array: bytes, struct: bytes) -> uint64, uint64, bytes, bytes: other_routine: - // arc4_types/mutable_params.py:92-93 + // arc4_types/mutable_params.py:89-90 // @subroutine // def other_routine(self, array: TestArray, struct: TestStruct) -> tuple[bool, bool]: proto 2 4 - // arc4_types/mutable_params.py:94 + // arc4_types/mutable_params.py:91 // array[1] = UInt8(5) frame_dig -2 byte 0x05 replace2 1 frame_bury -2 - // arc4_types/mutable_params.py:95 + // arc4_types/mutable_params.py:92 // struct.s_val_1 = String("AARRGH!") frame_dig -1 int 2 @@ -177,7 +185,7 @@ other_routine: extract 6 2 replace2 4 frame_bury -1 - // arc4_types/mutable_params.py:96 + // arc4_types/mutable_params.py:93 // return True, False int 1 int 0 @@ -188,17 +196,68 @@ other_routine: // test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.other_routine_2(array: bytes) -> bytes, bytes: other_routine_2: - // arc4_types/mutable_params.py:98-99 + // arc4_types/mutable_params.py:95-96 // @subroutine // def other_routine_2(self, array: TestArray) -> TestArray: proto 1 2 - // arc4_types/mutable_params.py:101 + // arc4_types/mutable_params.py:98 // array[0] = UInt8(10) frame_dig -1 byte 0x0a replace2 0 - // arc4_types/mutable_params.py:102 + // arc4_types/mutable_params.py:99 // return copy frame_dig -1 swap retsub + + +// test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.other_routine_3(arrays.0: bytes, arrays.1: bytes, arrays.2: bytes) -> bytes, bytes, bytes: +other_routine_3: + // arc4_types/mutable_params.py:101-102 + // @subroutine + // def other_routine_3(self, arrays: tuple[TestArray, TestArray, TestArray]) -> None: + proto 3 3 + byte "" + int 0 + b other_routine_3_for_body@4 + +other_routine_3_for_header_1@2: + frame_dig 0 + b other_routine_3_for_body@4 + +other_routine_3_for_header_2@3: + frame_dig 0 + +other_routine_3_for_body@4: + dup + int 1 + + + frame_bury 0 + // arc4_types/mutable_params.py:103-104 + // # this modifies the local copy + // for array in arrays: + switch other_routine_3_for_header_1@2 other_routine_3_for_header_2@3 + // arc4_types/mutable_params.py:107 + // arrays[0][0] = UInt8(99) + frame_dig -3 + byte 0x63 + replace2 0 + frame_bury -3 + // arc4_types/mutable_params.py:108 + // arrays[1][0] = UInt8(99) + frame_dig -2 + byte 0x63 + replace2 0 + frame_bury -2 + // arc4_types/mutable_params.py:109 + // arrays[2][0] = UInt8(99) + frame_dig -1 + byte 0x63 + replace2 0 + frame_bury -1 + frame_dig -3 + frame_dig -2 + frame_dig -1 + uncover 3 + retsub diff --git a/test_cases/arc4_types/out/Arc4MutableParamsContract.clear.mir b/test_cases/arc4_types/out/Arc4MutableParamsContract.clear.mir index 2a3447db8c..7e9b7c1094 100644 --- a/test_cases/arc4_types/out/Arc4MutableParamsContract.clear.mir +++ b/test_cases/arc4_types/out/Arc4MutableParamsContract.clear.mir @@ -4,6 +4,6 @@ // test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.clear_state_program() -> uint64: main_block@0: - int 1 // 1 True arc4_types/mutable_params.py:116 - return // return True arc4_types/mutable_params.py:116 + int 1 // 1 True arc4_types/mutable_params.py:112 + return // return True arc4_types/mutable_params.py:112 diff --git a/test_cases/arc4_types/out/Arc4MutableParamsContract.clear.teal b/test_cases/arc4_types/out/Arc4MutableParamsContract.clear.teal index bf19312e21..3c6fb7a505 100644 --- a/test_cases/arc4_types/out/Arc4MutableParamsContract.clear.teal +++ b/test_cases/arc4_types/out/Arc4MutableParamsContract.clear.teal @@ -1,7 +1,7 @@ #pragma version 10 test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.clear_state_program: - // arc4_types/mutable_params.py:116 + // arc4_types/mutable_params.py:112 // return True int 1 return diff --git a/test_cases/arc4_types/out/Arc4MutableParamsContract.destructured.ir b/test_cases/arc4_types/out/Arc4MutableParamsContract.destructured.ir index f1f680f987..144206892d 100644 --- a/test_cases/arc4_types/out/Arc4MutableParamsContract.destructured.ir +++ b/test_cases/arc4_types/out/Arc4MutableParamsContract.destructured.ir @@ -32,12 +32,13 @@ contract test_cases.arc4_types.mutable_params.Arc4MutableParamsContract: let reinterpret_biguint%10#0: biguint = ((extract 0 1) my_array_copy_2#2) // on error: Index access is out of bounds let tmp%10#0: bool = (b== reinterpret_biguint%10#0 0x0a) (assert tmp%10#0) // my_array_copy_2 should have mutated value + let (other_routine_3%0#0: bytes, other_routine_3%1#0: bytes, other_routine_3%2#0: bytes) = test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.other_routine_3(my_array#1, my_array_copy_2#2, my_array_copy_2#2) let tmp%11#0: bytes = ((extract 0 4) my_array#1) // on error: Index access is out of bounds let (other_routine_2%4#0: bytes, other_routine_2%5#0: bytes) = test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.other_routine_2(tmp%11#0) return subroutine test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.other_routine(array: bytes, struct: bytes) -> : - block@0: // L92 + block@0: // L89 let array#0: bytes = ((replace2 1) array#0 0x05) let item_offset%0#0: uint64 = (extract_uint16 struct#0 2u) let data_up_to_item%0#0: bytes = (extract3 struct#0 0u item_offset%0#0) @@ -56,11 +57,30 @@ contract test_cases.arc4_types.mutable_params.Arc4MutableParamsContract: return 1u 0u array#0 struct#0 subroutine test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.other_routine_2(array: bytes) -> : - block@0: // L98 + block@0: // L95 let array#1: bytes = ((replace2 0) array#0 0x0a) return array#0 array#1 + + subroutine test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.other_routine_3(arrays.0: bytes, arrays.1: bytes, arrays.2: bytes) -> : + block@0: // L101 + let tuple_index%0#0: uint64 = 0u + goto block@4 + block@2: // for_header_1_L103 + let tuple_index%0#0: uint64 = tuple_index%0#4 + goto block@4 + block@3: // for_header_2_L103 + let tuple_index%0#0: uint64 = tuple_index%0#4 + goto block@4 + block@4: // for_body_L103 + let tuple_index%0#4: uint64 = (+ tuple_index%0#0 1u) + goto_nth [block@2, block@3][tuple_index%0#0] else goto block@6 + block@6: // after_for_L103 + let arrays.0#0: bytes = ((replace2 0) arrays.0#0 0x63) + let arrays.1#0: bytes = ((replace2 0) arrays.1#0 0x63) + let arrays.2#0: bytes = ((replace2 0) arrays.2#0 0x63) + return arrays.0#0 arrays.1#0 arrays.2#0 program clear-state: subroutine test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.clear_state_program() -> bool: - block@0: // L115 + block@0: // L111 return 1u \ No newline at end of file diff --git a/test_cases/arc4_types/out/Arc4MutableParamsContract.ssa.ir b/test_cases/arc4_types/out/Arc4MutableParamsContract.ssa.ir index e33babf188..9aaad1c5c2 100644 --- a/test_cases/arc4_types/out/Arc4MutableParamsContract.ssa.ir +++ b/test_cases/arc4_types/out/Arc4MutableParamsContract.ssa.ir @@ -121,18 +121,25 @@ contract test_cases.arc4_types.mutable_params.Arc4MutableParamsContract: let tmp%10#0: bool = (b== reinterpret_biguint%10#0 reinterpret_biguint%11#0) (assert tmp%10#0) // my_array_copy_2 should have mutated value let copy%5#0: bytes = my_array#2 + let copy%6#0: bytes = my_array_copy_2#3 + let copy%7#0: bytes = my_array_copy_2#3 + let (other_routine_3%0#0: bytes, other_routine_3%1#0: bytes, other_routine_3%2#0: bytes) = test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.other_routine_3(copy%5#0, copy%6#0, copy%7#0) + let copy%7#1: bytes = other_routine_3%2#0 + let copy%6#1: bytes = other_routine_3%1#0 + let copy%5#1: bytes = other_routine_3%0#0 + let copy%8#0: bytes = my_array#2 let current_tail_offset%3#0: uint64 = 4u let encoded_tuple_buffer%7#0: bytes = 0x - let encoded_tuple_buffer%8#0: bytes = (concat encoded_tuple_buffer%7#0 copy%5#0) + let encoded_tuple_buffer%8#0: bytes = (concat encoded_tuple_buffer%7#0 copy%8#0) let nested#0: bytes = encoded_tuple_buffer%8#0 let tmp%11#0: bytes = (extract3 nested#0 0u 4u) // on error: Index access is out of bounds - let copy%6#0: bytes = tmp%11#0 - let (other_routine_2%4#0: bytes, other_routine_2%5#0: bytes) = test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.other_routine_2(copy%6#0) - let copy%6#1: bytes = other_routine_2%5#0 + let copy%9#0: bytes = tmp%11#0 + let (other_routine_2%4#0: bytes, other_routine_2%5#0: bytes) = test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.other_routine_2(copy%9#0) + let copy%9#1: bytes = other_routine_2%5#0 return subroutine test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.other_routine(array: bytes, struct: bytes) -> : - block@0: // L92 + block@0: // L89 let assigned_value%0#0: bytes = 0x05 let updated_target%0#0: bytes = (replace3 array#0 1u assigned_value%0#0) let array#1: bytes = updated_target%0#0 @@ -160,15 +167,50 @@ contract test_cases.arc4_types.mutable_params.Arc4MutableParamsContract: return 1u 0u array#1 struct#1 subroutine test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.other_routine_2(array: bytes) -> : - block@0: // L98 + block@0: // L95 let copy%0#0: bytes = array#0 let copy#0: bytes = copy%0#0 let assigned_value%0#0: bytes = 0x0a let updated_target%0#0: bytes = (replace3 array#0 0u assigned_value%0#0) let array#1: bytes = updated_target%0#0 return copy#0 array#1 + + subroutine test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.other_routine_3(arrays.0: bytes, arrays.1: bytes, arrays.2: bytes) -> : + block@0: // L101 + goto block@1 + block@1: // for_header_0_L103 + let tuple_index%0#0: uint64 = 0u + let array#0: bytes = arrays.0#0 + goto block@4 + block@2: // for_header_1_L103 + let array#1: bytes = arrays.1#0 + goto block@4 + block@3: // for_header_2_L103 + let array#2: bytes = arrays.2#0 + goto block@4 + block@4: // for_body_L103 + let array#3: bytes = φ(array#0 <- block@1, array#1 <- block@2, array#2 <- block@3) + let tuple_index%0#1: uint64 = φ(tuple_index%0#0 <- block@1, tuple_index%0#4 <- block@2, tuple_index%0#4 <- block@3) + let assigned_value%0#0: bytes = 0x63 + let updated_target%0#0: bytes = (replace3 array#3 0u assigned_value%0#0) + let array#4: bytes = updated_target%0#0 + goto block@5 + block@5: // for_footer_L103 + let tuple_index%0#4: uint64 = (+ tuple_index%0#1 1u) + goto_nth [block@2, block@3][tuple_index%0#1] else goto block@6 + block@6: // after_for_L103 + let assigned_value%1#0: bytes = 0x63 + let updated_target%1#0: bytes = (replace3 arrays.0#0 0u assigned_value%1#0) + let arrays.0#2: bytes = updated_target%1#0 + let assigned_value%2#0: bytes = 0x63 + let updated_target%2#0: bytes = (replace3 arrays.1#0 0u assigned_value%2#0) + let arrays.1#2: bytes = updated_target%2#0 + let assigned_value%3#0: bytes = 0x63 + let updated_target%3#0: bytes = (replace3 arrays.2#0 0u assigned_value%3#0) + let arrays.2#2: bytes = updated_target%3#0 + return arrays.0#2 arrays.1#2 arrays.2#2 program clear-state: subroutine test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.clear_state_program() -> bool: - block@0: // L115 + block@0: // L111 return 1u \ No newline at end of file diff --git a/test_cases/arc4_types/out/Arc4MutableParamsContract.ssa.opt_pass_1.ir b/test_cases/arc4_types/out/Arc4MutableParamsContract.ssa.opt_pass_1.ir index e15dc9f61c..207793e728 100644 --- a/test_cases/arc4_types/out/Arc4MutableParamsContract.ssa.opt_pass_1.ir +++ b/test_cases/arc4_types/out/Arc4MutableParamsContract.ssa.opt_pass_1.ir @@ -83,13 +83,14 @@ contract test_cases.arc4_types.mutable_params.Arc4MutableParamsContract: let reinterpret_biguint%10#0: biguint = (extract3 my_array_copy_2#3 item_offset%5#0 1u) // on error: Index access is out of bounds let tmp%10#0: bool = (b== reinterpret_biguint%10#0 0x0a) (assert tmp%10#0) // my_array_copy_2 should have mutated value + let (other_routine_3%0#0: bytes, other_routine_3%1#0: bytes, other_routine_3%2#0: bytes) = test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.other_routine_3(my_array#2, my_array_copy_2#3, my_array_copy_2#3) let nested#0: bytes = my_array#2 let tmp%11#0: bytes = ((extract 0 4) nested#0) // on error: Index access is out of bounds let (other_routine_2%4#0: bytes, other_routine_2%5#0: bytes) = test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.other_routine_2(tmp%11#0) return subroutine test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.other_routine(array: bytes, struct: bytes) -> : - block@0: // L92 + block@0: // L89 let array#1: bytes = ((replace2 1) array#0 0x05) let length%0#0: uint64 = 7u let as_bytes%0#0: bytes = (itob length%0#0) @@ -113,11 +114,30 @@ contract test_cases.arc4_types.mutable_params.Arc4MutableParamsContract: return 1u 0u array#1 struct#1 subroutine test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.other_routine_2(array: bytes) -> : - block@0: // L98 + block@0: // L95 let array#1: bytes = ((replace2 0) array#0 0x0a) return array#0 array#1 + + subroutine test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.other_routine_3(arrays.0: bytes, arrays.1: bytes, arrays.2: bytes) -> : + block@0: // L101 + let tuple_index%0#0: uint64 = 0u + goto block@4 + block@2: // for_header_1_L103 + goto block@4 + block@3: // for_header_2_L103 + goto block@4 + block@4: // for_body_L103 + let array#3: bytes = φ(arrays.0#0 <- block@0, arrays.1#0 <- block@2, arrays.2#0 <- block@3) + let tuple_index%0#1: uint64 = φ(tuple_index%0#0 <- block@0, tuple_index%0#4 <- block@2, tuple_index%0#4 <- block@3) + let tuple_index%0#4: uint64 = (+ tuple_index%0#1 1u) + goto_nth [block@2, block@3][tuple_index%0#1] else goto block@6 + block@6: // after_for_L103 + let arrays.0#2: bytes = ((replace2 0) arrays.0#0 0x63) + let arrays.1#2: bytes = ((replace2 0) arrays.1#0 0x63) + let arrays.2#2: bytes = ((replace2 0) arrays.2#0 0x63) + return arrays.0#2 arrays.1#2 arrays.2#2 program clear-state: subroutine test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.clear_state_program() -> bool: - block@0: // L115 + block@0: // L111 return 1u \ No newline at end of file diff --git a/test_cases/arc4_types/out/Arc4MutableParamsContract.ssa.opt_pass_10.ir b/test_cases/arc4_types/out/Arc4MutableParamsContract.ssa.opt_pass_10.ir index 3ae5d72b1c..081a2b425e 100644 --- a/test_cases/arc4_types/out/Arc4MutableParamsContract.ssa.opt_pass_10.ir +++ b/test_cases/arc4_types/out/Arc4MutableParamsContract.ssa.opt_pass_10.ir @@ -37,12 +37,13 @@ contract test_cases.arc4_types.mutable_params.Arc4MutableParamsContract: let reinterpret_biguint%10#0: biguint = ((extract 0 1) my_array_copy_2#3) // on error: Index access is out of bounds let tmp%10#0: bool = (b== reinterpret_biguint%10#0 0x0a) (assert tmp%10#0) // my_array_copy_2 should have mutated value + let (other_routine_3%0#0: bytes, other_routine_3%1#0: bytes, other_routine_3%2#0: bytes) = test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.other_routine_3(my_array#2, my_array_copy_2#3, my_array_copy_2#3) let tmp%11#0: bytes = ((extract 0 4) my_array#2) // on error: Index access is out of bounds let (other_routine_2%4#0: bytes, other_routine_2%5#0: bytes) = test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.other_routine_2(tmp%11#0) return subroutine test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.other_routine(array: bytes, struct: bytes) -> : - block@0: // L92 + block@0: // L89 let array#1: bytes = ((replace2 1) array#0 0x05) let item_offset%0#0: uint64 = (extract_uint16 struct#0 2u) let data_up_to_item%0#0: bytes = (extract3 struct#0 0u item_offset%0#0) @@ -61,11 +62,29 @@ contract test_cases.arc4_types.mutable_params.Arc4MutableParamsContract: return 1u 0u array#1 struct#1 subroutine test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.other_routine_2(array: bytes) -> : - block@0: // L98 + block@0: // L95 let array#1: bytes = ((replace2 0) array#0 0x0a) return array#0 array#1 + + subroutine test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.other_routine_3(arrays.0: bytes, arrays.1: bytes, arrays.2: bytes) -> : + block@0: // L101 + let tuple_index%0#0: uint64 = 0u + goto block@4 + block@2: // for_header_1_L103 + goto block@4 + block@3: // for_header_2_L103 + goto block@4 + block@4: // for_body_L103 + let tuple_index%0#1: uint64 = φ(tuple_index%0#0 <- block@0, tuple_index%0#4 <- block@2, tuple_index%0#4 <- block@3) + let tuple_index%0#4: uint64 = (+ tuple_index%0#1 1u) + goto_nth [block@2, block@3][tuple_index%0#1] else goto block@6 + block@6: // after_for_L103 + let arrays.0#2: bytes = ((replace2 0) arrays.0#0 0x63) + let arrays.1#2: bytes = ((replace2 0) arrays.1#0 0x63) + let arrays.2#2: bytes = ((replace2 0) arrays.2#0 0x63) + return arrays.0#2 arrays.1#2 arrays.2#2 program clear-state: subroutine test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.clear_state_program() -> bool: - block@0: // L115 + block@0: // L111 return 1u \ No newline at end of file diff --git a/test_cases/arc4_types/out/Arc4MutableParamsContract.ssa.opt_pass_11.ir b/test_cases/arc4_types/out/Arc4MutableParamsContract.ssa.opt_pass_11.ir index 0937f7220f..dc31bccc93 100644 --- a/test_cases/arc4_types/out/Arc4MutableParamsContract.ssa.opt_pass_11.ir +++ b/test_cases/arc4_types/out/Arc4MutableParamsContract.ssa.opt_pass_11.ir @@ -35,12 +35,13 @@ contract test_cases.arc4_types.mutable_params.Arc4MutableParamsContract: let reinterpret_biguint%10#0: biguint = ((extract 0 1) my_array_copy_2#3) // on error: Index access is out of bounds let tmp%10#0: bool = (b== reinterpret_biguint%10#0 0x0a) (assert tmp%10#0) // my_array_copy_2 should have mutated value + let (other_routine_3%0#0: bytes, other_routine_3%1#0: bytes, other_routine_3%2#0: bytes) = test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.other_routine_3(my_array#2, my_array_copy_2#3, my_array_copy_2#3) let tmp%11#0: bytes = ((extract 0 4) my_array#2) // on error: Index access is out of bounds let (other_routine_2%4#0: bytes, other_routine_2%5#0: bytes) = test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.other_routine_2(tmp%11#0) return subroutine test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.other_routine(array: bytes, struct: bytes) -> : - block@0: // L92 + block@0: // L89 let array#1: bytes = ((replace2 1) array#0 0x05) let item_offset%0#0: uint64 = (extract_uint16 struct#0 2u) let data_up_to_item%0#0: bytes = (extract3 struct#0 0u item_offset%0#0) @@ -59,11 +60,29 @@ contract test_cases.arc4_types.mutable_params.Arc4MutableParamsContract: return 1u 0u array#1 struct#1 subroutine test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.other_routine_2(array: bytes) -> : - block@0: // L98 + block@0: // L95 let array#1: bytes = ((replace2 0) array#0 0x0a) return array#0 array#1 + + subroutine test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.other_routine_3(arrays.0: bytes, arrays.1: bytes, arrays.2: bytes) -> : + block@0: // L101 + let tuple_index%0#0: uint64 = 0u + goto block@4 + block@2: // for_header_1_L103 + goto block@4 + block@3: // for_header_2_L103 + goto block@4 + block@4: // for_body_L103 + let tuple_index%0#1: uint64 = φ(tuple_index%0#0 <- block@0, tuple_index%0#4 <- block@2, tuple_index%0#4 <- block@3) + let tuple_index%0#4: uint64 = (+ tuple_index%0#1 1u) + goto_nth [block@2, block@3][tuple_index%0#1] else goto block@6 + block@6: // after_for_L103 + let arrays.0#2: bytes = ((replace2 0) arrays.0#0 0x63) + let arrays.1#2: bytes = ((replace2 0) arrays.1#0 0x63) + let arrays.2#2: bytes = ((replace2 0) arrays.2#0 0x63) + return arrays.0#2 arrays.1#2 arrays.2#2 program clear-state: subroutine test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.clear_state_program() -> bool: - block@0: // L115 + block@0: // L111 return 1u \ No newline at end of file diff --git a/test_cases/arc4_types/out/Arc4MutableParamsContract.ssa.opt_pass_12.ir b/test_cases/arc4_types/out/Arc4MutableParamsContract.ssa.opt_pass_12.ir index 4c7bd23b2a..5e15dfe471 100644 --- a/test_cases/arc4_types/out/Arc4MutableParamsContract.ssa.opt_pass_12.ir +++ b/test_cases/arc4_types/out/Arc4MutableParamsContract.ssa.opt_pass_12.ir @@ -34,12 +34,13 @@ contract test_cases.arc4_types.mutable_params.Arc4MutableParamsContract: let reinterpret_biguint%10#0: biguint = ((extract 0 1) my_array_copy_2#3) // on error: Index access is out of bounds let tmp%10#0: bool = (b== reinterpret_biguint%10#0 0x0a) (assert tmp%10#0) // my_array_copy_2 should have mutated value + let (other_routine_3%0#0: bytes, other_routine_3%1#0: bytes, other_routine_3%2#0: bytes) = test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.other_routine_3(my_array#2, my_array_copy_2#3, my_array_copy_2#3) let tmp%11#0: bytes = ((extract 0 4) my_array#2) // on error: Index access is out of bounds let (other_routine_2%4#0: bytes, other_routine_2%5#0: bytes) = test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.other_routine_2(tmp%11#0) return subroutine test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.other_routine(array: bytes, struct: bytes) -> : - block@0: // L92 + block@0: // L89 let array#1: bytes = ((replace2 1) array#0 0x05) let item_offset%0#0: uint64 = (extract_uint16 struct#0 2u) let data_up_to_item%0#0: bytes = (extract3 struct#0 0u item_offset%0#0) @@ -58,11 +59,29 @@ contract test_cases.arc4_types.mutable_params.Arc4MutableParamsContract: return 1u 0u array#1 struct#1 subroutine test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.other_routine_2(array: bytes) -> : - block@0: // L98 + block@0: // L95 let array#1: bytes = ((replace2 0) array#0 0x0a) return array#0 array#1 + + subroutine test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.other_routine_3(arrays.0: bytes, arrays.1: bytes, arrays.2: bytes) -> : + block@0: // L101 + let tuple_index%0#0: uint64 = 0u + goto block@4 + block@2: // for_header_1_L103 + goto block@4 + block@3: // for_header_2_L103 + goto block@4 + block@4: // for_body_L103 + let tuple_index%0#1: uint64 = φ(tuple_index%0#0 <- block@0, tuple_index%0#4 <- block@2, tuple_index%0#4 <- block@3) + let tuple_index%0#4: uint64 = (+ tuple_index%0#1 1u) + goto_nth [block@2, block@3][tuple_index%0#1] else goto block@6 + block@6: // after_for_L103 + let arrays.0#2: bytes = ((replace2 0) arrays.0#0 0x63) + let arrays.1#2: bytes = ((replace2 0) arrays.1#0 0x63) + let arrays.2#2: bytes = ((replace2 0) arrays.2#0 0x63) + return arrays.0#2 arrays.1#2 arrays.2#2 program clear-state: subroutine test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.clear_state_program() -> bool: - block@0: // L115 + block@0: // L111 return 1u \ No newline at end of file diff --git a/test_cases/arc4_types/out/Arc4MutableParamsContract.ssa.opt_pass_13.ir b/test_cases/arc4_types/out/Arc4MutableParamsContract.ssa.opt_pass_13.ir index 5e12c32cfb..bb7d396b5f 100644 --- a/test_cases/arc4_types/out/Arc4MutableParamsContract.ssa.opt_pass_13.ir +++ b/test_cases/arc4_types/out/Arc4MutableParamsContract.ssa.opt_pass_13.ir @@ -32,12 +32,13 @@ contract test_cases.arc4_types.mutable_params.Arc4MutableParamsContract: let reinterpret_biguint%10#0: biguint = ((extract 0 1) my_array_copy_2#3) // on error: Index access is out of bounds let tmp%10#0: bool = (b== reinterpret_biguint%10#0 0x0a) (assert tmp%10#0) // my_array_copy_2 should have mutated value + let (other_routine_3%0#0: bytes, other_routine_3%1#0: bytes, other_routine_3%2#0: bytes) = test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.other_routine_3(my_array#2, my_array_copy_2#3, my_array_copy_2#3) let tmp%11#0: bytes = ((extract 0 4) my_array#2) // on error: Index access is out of bounds let (other_routine_2%4#0: bytes, other_routine_2%5#0: bytes) = test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.other_routine_2(tmp%11#0) return subroutine test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.other_routine(array: bytes, struct: bytes) -> : - block@0: // L92 + block@0: // L89 let array#1: bytes = ((replace2 1) array#0 0x05) let item_offset%0#0: uint64 = (extract_uint16 struct#0 2u) let data_up_to_item%0#0: bytes = (extract3 struct#0 0u item_offset%0#0) @@ -56,11 +57,29 @@ contract test_cases.arc4_types.mutable_params.Arc4MutableParamsContract: return 1u 0u array#1 struct#1 subroutine test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.other_routine_2(array: bytes) -> : - block@0: // L98 + block@0: // L95 let array#1: bytes = ((replace2 0) array#0 0x0a) return array#0 array#1 + + subroutine test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.other_routine_3(arrays.0: bytes, arrays.1: bytes, arrays.2: bytes) -> : + block@0: // L101 + let tuple_index%0#0: uint64 = 0u + goto block@4 + block@2: // for_header_1_L103 + goto block@4 + block@3: // for_header_2_L103 + goto block@4 + block@4: // for_body_L103 + let tuple_index%0#1: uint64 = φ(tuple_index%0#0 <- block@0, tuple_index%0#4 <- block@2, tuple_index%0#4 <- block@3) + let tuple_index%0#4: uint64 = (+ tuple_index%0#1 1u) + goto_nth [block@2, block@3][tuple_index%0#1] else goto block@6 + block@6: // after_for_L103 + let arrays.0#2: bytes = ((replace2 0) arrays.0#0 0x63) + let arrays.1#2: bytes = ((replace2 0) arrays.1#0 0x63) + let arrays.2#2: bytes = ((replace2 0) arrays.2#0 0x63) + return arrays.0#2 arrays.1#2 arrays.2#2 program clear-state: subroutine test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.clear_state_program() -> bool: - block@0: // L115 + block@0: // L111 return 1u \ No newline at end of file diff --git a/test_cases/arc4_types/out/Arc4MutableParamsContract.ssa.opt_pass_2.ir b/test_cases/arc4_types/out/Arc4MutableParamsContract.ssa.opt_pass_2.ir index e31533dd38..f061a12ac3 100644 --- a/test_cases/arc4_types/out/Arc4MutableParamsContract.ssa.opt_pass_2.ir +++ b/test_cases/arc4_types/out/Arc4MutableParamsContract.ssa.opt_pass_2.ir @@ -63,12 +63,13 @@ contract test_cases.arc4_types.mutable_params.Arc4MutableParamsContract: let reinterpret_biguint%10#0: biguint = ((extract 0 1) my_array_copy_2#3) // on error: Index access is out of bounds let tmp%10#0: bool = (b== reinterpret_biguint%10#0 0x0a) (assert tmp%10#0) // my_array_copy_2 should have mutated value + let (other_routine_3%0#0: bytes, other_routine_3%1#0: bytes, other_routine_3%2#0: bytes) = test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.other_routine_3(my_array#2, my_array_copy_2#3, my_array_copy_2#3) let tmp%11#0: bytes = ((extract 0 4) my_array#2) // on error: Index access is out of bounds let (other_routine_2%4#0: bytes, other_routine_2%5#0: bytes) = test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.other_routine_2(tmp%11#0) return subroutine test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.other_routine(array: bytes, struct: bytes) -> : - block@0: // L92 + block@0: // L89 let array#1: bytes = ((replace2 1) array#0 0x05) let length_uint16%0#0: bytes = 0x0007 let encoded_value%0#0: bytes = (concat length_uint16%0#0 "AARRGH!") @@ -90,11 +91,29 @@ contract test_cases.arc4_types.mutable_params.Arc4MutableParamsContract: return 1u 0u array#1 struct#1 subroutine test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.other_routine_2(array: bytes) -> : - block@0: // L98 + block@0: // L95 let array#1: bytes = ((replace2 0) array#0 0x0a) return array#0 array#1 + + subroutine test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.other_routine_3(arrays.0: bytes, arrays.1: bytes, arrays.2: bytes) -> : + block@0: // L101 + let tuple_index%0#0: uint64 = 0u + goto block@4 + block@2: // for_header_1_L103 + goto block@4 + block@3: // for_header_2_L103 + goto block@4 + block@4: // for_body_L103 + let tuple_index%0#1: uint64 = φ(tuple_index%0#0 <- block@0, tuple_index%0#4 <- block@2, tuple_index%0#4 <- block@3) + let tuple_index%0#4: uint64 = (+ tuple_index%0#1 1u) + goto_nth [block@2, block@3][tuple_index%0#1] else goto block@6 + block@6: // after_for_L103 + let arrays.0#2: bytes = ((replace2 0) arrays.0#0 0x63) + let arrays.1#2: bytes = ((replace2 0) arrays.1#0 0x63) + let arrays.2#2: bytes = ((replace2 0) arrays.2#0 0x63) + return arrays.0#2 arrays.1#2 arrays.2#2 program clear-state: subroutine test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.clear_state_program() -> bool: - block@0: // L115 + block@0: // L111 return 1u \ No newline at end of file diff --git a/test_cases/arc4_types/out/Arc4MutableParamsContract.ssa.opt_pass_3.ir b/test_cases/arc4_types/out/Arc4MutableParamsContract.ssa.opt_pass_3.ir index fc61ee4866..76b802aad4 100644 --- a/test_cases/arc4_types/out/Arc4MutableParamsContract.ssa.opt_pass_3.ir +++ b/test_cases/arc4_types/out/Arc4MutableParamsContract.ssa.opt_pass_3.ir @@ -57,12 +57,13 @@ contract test_cases.arc4_types.mutable_params.Arc4MutableParamsContract: let reinterpret_biguint%10#0: biguint = ((extract 0 1) my_array_copy_2#3) // on error: Index access is out of bounds let tmp%10#0: bool = (b== reinterpret_biguint%10#0 0x0a) (assert tmp%10#0) // my_array_copy_2 should have mutated value + let (other_routine_3%0#0: bytes, other_routine_3%1#0: bytes, other_routine_3%2#0: bytes) = test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.other_routine_3(my_array#2, my_array_copy_2#3, my_array_copy_2#3) let tmp%11#0: bytes = ((extract 0 4) my_array#2) // on error: Index access is out of bounds let (other_routine_2%4#0: bytes, other_routine_2%5#0: bytes) = test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.other_routine_2(tmp%11#0) return subroutine test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.other_routine(array: bytes, struct: bytes) -> : - block@0: // L92 + block@0: // L89 let array#1: bytes = ((replace2 1) array#0 0x05) let encoded_value%0#0: bytes = 0x000741415252474821 let item_offset%0#0: uint64 = (extract_uint16 struct#0 2u) @@ -83,11 +84,29 @@ contract test_cases.arc4_types.mutable_params.Arc4MutableParamsContract: return 1u 0u array#1 struct#1 subroutine test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.other_routine_2(array: bytes) -> : - block@0: // L98 + block@0: // L95 let array#1: bytes = ((replace2 0) array#0 0x0a) return array#0 array#1 + + subroutine test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.other_routine_3(arrays.0: bytes, arrays.1: bytes, arrays.2: bytes) -> : + block@0: // L101 + let tuple_index%0#0: uint64 = 0u + goto block@4 + block@2: // for_header_1_L103 + goto block@4 + block@3: // for_header_2_L103 + goto block@4 + block@4: // for_body_L103 + let tuple_index%0#1: uint64 = φ(tuple_index%0#0 <- block@0, tuple_index%0#4 <- block@2, tuple_index%0#4 <- block@3) + let tuple_index%0#4: uint64 = (+ tuple_index%0#1 1u) + goto_nth [block@2, block@3][tuple_index%0#1] else goto block@6 + block@6: // after_for_L103 + let arrays.0#2: bytes = ((replace2 0) arrays.0#0 0x63) + let arrays.1#2: bytes = ((replace2 0) arrays.1#0 0x63) + let arrays.2#2: bytes = ((replace2 0) arrays.2#0 0x63) + return arrays.0#2 arrays.1#2 arrays.2#2 program clear-state: subroutine test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.clear_state_program() -> bool: - block@0: // L115 + block@0: // L111 return 1u \ No newline at end of file diff --git a/test_cases/arc4_types/out/Arc4MutableParamsContract.ssa.opt_pass_4.ir b/test_cases/arc4_types/out/Arc4MutableParamsContract.ssa.opt_pass_4.ir index 197e534893..14d5b150e1 100644 --- a/test_cases/arc4_types/out/Arc4MutableParamsContract.ssa.opt_pass_4.ir +++ b/test_cases/arc4_types/out/Arc4MutableParamsContract.ssa.opt_pass_4.ir @@ -51,12 +51,13 @@ contract test_cases.arc4_types.mutable_params.Arc4MutableParamsContract: let reinterpret_biguint%10#0: biguint = ((extract 0 1) my_array_copy_2#3) // on error: Index access is out of bounds let tmp%10#0: bool = (b== reinterpret_biguint%10#0 0x0a) (assert tmp%10#0) // my_array_copy_2 should have mutated value + let (other_routine_3%0#0: bytes, other_routine_3%1#0: bytes, other_routine_3%2#0: bytes) = test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.other_routine_3(my_array#2, my_array_copy_2#3, my_array_copy_2#3) let tmp%11#0: bytes = ((extract 0 4) my_array#2) // on error: Index access is out of bounds let (other_routine_2%4#0: bytes, other_routine_2%5#0: bytes) = test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.other_routine_2(tmp%11#0) return subroutine test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.other_routine(array: bytes, struct: bytes) -> : - block@0: // L92 + block@0: // L89 let array#1: bytes = ((replace2 1) array#0 0x05) let item_offset%0#0: uint64 = (extract_uint16 struct#0 2u) let data_up_to_item%0#0: bytes = (extract3 struct#0 0u item_offset%0#0) @@ -76,11 +77,29 @@ contract test_cases.arc4_types.mutable_params.Arc4MutableParamsContract: return 1u 0u array#1 struct#1 subroutine test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.other_routine_2(array: bytes) -> : - block@0: // L98 + block@0: // L95 let array#1: bytes = ((replace2 0) array#0 0x0a) return array#0 array#1 + + subroutine test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.other_routine_3(arrays.0: bytes, arrays.1: bytes, arrays.2: bytes) -> : + block@0: // L101 + let tuple_index%0#0: uint64 = 0u + goto block@4 + block@2: // for_header_1_L103 + goto block@4 + block@3: // for_header_2_L103 + goto block@4 + block@4: // for_body_L103 + let tuple_index%0#1: uint64 = φ(tuple_index%0#0 <- block@0, tuple_index%0#4 <- block@2, tuple_index%0#4 <- block@3) + let tuple_index%0#4: uint64 = (+ tuple_index%0#1 1u) + goto_nth [block@2, block@3][tuple_index%0#1] else goto block@6 + block@6: // after_for_L103 + let arrays.0#2: bytes = ((replace2 0) arrays.0#0 0x63) + let arrays.1#2: bytes = ((replace2 0) arrays.1#0 0x63) + let arrays.2#2: bytes = ((replace2 0) arrays.2#0 0x63) + return arrays.0#2 arrays.1#2 arrays.2#2 program clear-state: subroutine test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.clear_state_program() -> bool: - block@0: // L115 + block@0: // L111 return 1u \ No newline at end of file diff --git a/test_cases/arc4_types/out/Arc4MutableParamsContract.ssa.opt_pass_5.ir b/test_cases/arc4_types/out/Arc4MutableParamsContract.ssa.opt_pass_5.ir index 250a6a4b98..19ad885a23 100644 --- a/test_cases/arc4_types/out/Arc4MutableParamsContract.ssa.opt_pass_5.ir +++ b/test_cases/arc4_types/out/Arc4MutableParamsContract.ssa.opt_pass_5.ir @@ -49,12 +49,13 @@ contract test_cases.arc4_types.mutable_params.Arc4MutableParamsContract: let reinterpret_biguint%10#0: biguint = ((extract 0 1) my_array_copy_2#3) // on error: Index access is out of bounds let tmp%10#0: bool = (b== reinterpret_biguint%10#0 0x0a) (assert tmp%10#0) // my_array_copy_2 should have mutated value + let (other_routine_3%0#0: bytes, other_routine_3%1#0: bytes, other_routine_3%2#0: bytes) = test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.other_routine_3(my_array#2, my_array_copy_2#3, my_array_copy_2#3) let tmp%11#0: bytes = ((extract 0 4) my_array#2) // on error: Index access is out of bounds let (other_routine_2%4#0: bytes, other_routine_2%5#0: bytes) = test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.other_routine_2(tmp%11#0) return subroutine test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.other_routine(array: bytes, struct: bytes) -> : - block@0: // L92 + block@0: // L89 let array#1: bytes = ((replace2 1) array#0 0x05) let item_offset%0#0: uint64 = (extract_uint16 struct#0 2u) let data_up_to_item%0#0: bytes = (extract3 struct#0 0u item_offset%0#0) @@ -73,11 +74,29 @@ contract test_cases.arc4_types.mutable_params.Arc4MutableParamsContract: return 1u 0u array#1 struct#1 subroutine test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.other_routine_2(array: bytes) -> : - block@0: // L98 + block@0: // L95 let array#1: bytes = ((replace2 0) array#0 0x0a) return array#0 array#1 + + subroutine test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.other_routine_3(arrays.0: bytes, arrays.1: bytes, arrays.2: bytes) -> : + block@0: // L101 + let tuple_index%0#0: uint64 = 0u + goto block@4 + block@2: // for_header_1_L103 + goto block@4 + block@3: // for_header_2_L103 + goto block@4 + block@4: // for_body_L103 + let tuple_index%0#1: uint64 = φ(tuple_index%0#0 <- block@0, tuple_index%0#4 <- block@2, tuple_index%0#4 <- block@3) + let tuple_index%0#4: uint64 = (+ tuple_index%0#1 1u) + goto_nth [block@2, block@3][tuple_index%0#1] else goto block@6 + block@6: // after_for_L103 + let arrays.0#2: bytes = ((replace2 0) arrays.0#0 0x63) + let arrays.1#2: bytes = ((replace2 0) arrays.1#0 0x63) + let arrays.2#2: bytes = ((replace2 0) arrays.2#0 0x63) + return arrays.0#2 arrays.1#2 arrays.2#2 program clear-state: subroutine test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.clear_state_program() -> bool: - block@0: // L115 + block@0: // L111 return 1u \ No newline at end of file diff --git a/test_cases/arc4_types/out/Arc4MutableParamsContract.ssa.opt_pass_6.ir b/test_cases/arc4_types/out/Arc4MutableParamsContract.ssa.opt_pass_6.ir index a77c8cf22f..95d922e09d 100644 --- a/test_cases/arc4_types/out/Arc4MutableParamsContract.ssa.opt_pass_6.ir +++ b/test_cases/arc4_types/out/Arc4MutableParamsContract.ssa.opt_pass_6.ir @@ -45,12 +45,13 @@ contract test_cases.arc4_types.mutable_params.Arc4MutableParamsContract: let reinterpret_biguint%10#0: biguint = ((extract 0 1) my_array_copy_2#3) // on error: Index access is out of bounds let tmp%10#0: bool = (b== reinterpret_biguint%10#0 0x0a) (assert tmp%10#0) // my_array_copy_2 should have mutated value + let (other_routine_3%0#0: bytes, other_routine_3%1#0: bytes, other_routine_3%2#0: bytes) = test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.other_routine_3(my_array#2, my_array_copy_2#3, my_array_copy_2#3) let tmp%11#0: bytes = ((extract 0 4) my_array#2) // on error: Index access is out of bounds let (other_routine_2%4#0: bytes, other_routine_2%5#0: bytes) = test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.other_routine_2(tmp%11#0) return subroutine test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.other_routine(array: bytes, struct: bytes) -> : - block@0: // L92 + block@0: // L89 let array#1: bytes = ((replace2 1) array#0 0x05) let item_offset%0#0: uint64 = (extract_uint16 struct#0 2u) let data_up_to_item%0#0: bytes = (extract3 struct#0 0u item_offset%0#0) @@ -69,11 +70,29 @@ contract test_cases.arc4_types.mutable_params.Arc4MutableParamsContract: return 1u 0u array#1 struct#1 subroutine test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.other_routine_2(array: bytes) -> : - block@0: // L98 + block@0: // L95 let array#1: bytes = ((replace2 0) array#0 0x0a) return array#0 array#1 + + subroutine test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.other_routine_3(arrays.0: bytes, arrays.1: bytes, arrays.2: bytes) -> : + block@0: // L101 + let tuple_index%0#0: uint64 = 0u + goto block@4 + block@2: // for_header_1_L103 + goto block@4 + block@3: // for_header_2_L103 + goto block@4 + block@4: // for_body_L103 + let tuple_index%0#1: uint64 = φ(tuple_index%0#0 <- block@0, tuple_index%0#4 <- block@2, tuple_index%0#4 <- block@3) + let tuple_index%0#4: uint64 = (+ tuple_index%0#1 1u) + goto_nth [block@2, block@3][tuple_index%0#1] else goto block@6 + block@6: // after_for_L103 + let arrays.0#2: bytes = ((replace2 0) arrays.0#0 0x63) + let arrays.1#2: bytes = ((replace2 0) arrays.1#0 0x63) + let arrays.2#2: bytes = ((replace2 0) arrays.2#0 0x63) + return arrays.0#2 arrays.1#2 arrays.2#2 program clear-state: subroutine test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.clear_state_program() -> bool: - block@0: // L115 + block@0: // L111 return 1u \ No newline at end of file diff --git a/test_cases/arc4_types/out/Arc4MutableParamsContract.ssa.opt_pass_7.ir b/test_cases/arc4_types/out/Arc4MutableParamsContract.ssa.opt_pass_7.ir index 31f39312f1..5d07d6e9b6 100644 --- a/test_cases/arc4_types/out/Arc4MutableParamsContract.ssa.opt_pass_7.ir +++ b/test_cases/arc4_types/out/Arc4MutableParamsContract.ssa.opt_pass_7.ir @@ -40,12 +40,13 @@ contract test_cases.arc4_types.mutable_params.Arc4MutableParamsContract: let reinterpret_biguint%10#0: biguint = ((extract 0 1) my_array_copy_2#3) // on error: Index access is out of bounds let tmp%10#0: bool = (b== reinterpret_biguint%10#0 0x0a) (assert tmp%10#0) // my_array_copy_2 should have mutated value + let (other_routine_3%0#0: bytes, other_routine_3%1#0: bytes, other_routine_3%2#0: bytes) = test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.other_routine_3(my_array#2, my_array_copy_2#3, my_array_copy_2#3) let tmp%11#0: bytes = ((extract 0 4) my_array#2) // on error: Index access is out of bounds let (other_routine_2%4#0: bytes, other_routine_2%5#0: bytes) = test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.other_routine_2(tmp%11#0) return subroutine test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.other_routine(array: bytes, struct: bytes) -> : - block@0: // L92 + block@0: // L89 let array#1: bytes = ((replace2 1) array#0 0x05) let item_offset%0#0: uint64 = (extract_uint16 struct#0 2u) let data_up_to_item%0#0: bytes = (extract3 struct#0 0u item_offset%0#0) @@ -64,11 +65,29 @@ contract test_cases.arc4_types.mutable_params.Arc4MutableParamsContract: return 1u 0u array#1 struct#1 subroutine test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.other_routine_2(array: bytes) -> : - block@0: // L98 + block@0: // L95 let array#1: bytes = ((replace2 0) array#0 0x0a) return array#0 array#1 + + subroutine test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.other_routine_3(arrays.0: bytes, arrays.1: bytes, arrays.2: bytes) -> : + block@0: // L101 + let tuple_index%0#0: uint64 = 0u + goto block@4 + block@2: // for_header_1_L103 + goto block@4 + block@3: // for_header_2_L103 + goto block@4 + block@4: // for_body_L103 + let tuple_index%0#1: uint64 = φ(tuple_index%0#0 <- block@0, tuple_index%0#4 <- block@2, tuple_index%0#4 <- block@3) + let tuple_index%0#4: uint64 = (+ tuple_index%0#1 1u) + goto_nth [block@2, block@3][tuple_index%0#1] else goto block@6 + block@6: // after_for_L103 + let arrays.0#2: bytes = ((replace2 0) arrays.0#0 0x63) + let arrays.1#2: bytes = ((replace2 0) arrays.1#0 0x63) + let arrays.2#2: bytes = ((replace2 0) arrays.2#0 0x63) + return arrays.0#2 arrays.1#2 arrays.2#2 program clear-state: subroutine test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.clear_state_program() -> bool: - block@0: // L115 + block@0: // L111 return 1u \ No newline at end of file diff --git a/test_cases/arc4_types/out/Arc4MutableParamsContract.ssa.opt_pass_8.ir b/test_cases/arc4_types/out/Arc4MutableParamsContract.ssa.opt_pass_8.ir index 1a5499b26e..cd7975cee6 100644 --- a/test_cases/arc4_types/out/Arc4MutableParamsContract.ssa.opt_pass_8.ir +++ b/test_cases/arc4_types/out/Arc4MutableParamsContract.ssa.opt_pass_8.ir @@ -39,12 +39,13 @@ contract test_cases.arc4_types.mutable_params.Arc4MutableParamsContract: let reinterpret_biguint%10#0: biguint = ((extract 0 1) my_array_copy_2#3) // on error: Index access is out of bounds let tmp%10#0: bool = (b== reinterpret_biguint%10#0 0x0a) (assert tmp%10#0) // my_array_copy_2 should have mutated value + let (other_routine_3%0#0: bytes, other_routine_3%1#0: bytes, other_routine_3%2#0: bytes) = test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.other_routine_3(my_array#2, my_array_copy_2#3, my_array_copy_2#3) let tmp%11#0: bytes = ((extract 0 4) my_array#2) // on error: Index access is out of bounds let (other_routine_2%4#0: bytes, other_routine_2%5#0: bytes) = test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.other_routine_2(tmp%11#0) return subroutine test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.other_routine(array: bytes, struct: bytes) -> : - block@0: // L92 + block@0: // L89 let array#1: bytes = ((replace2 1) array#0 0x05) let item_offset%0#0: uint64 = (extract_uint16 struct#0 2u) let data_up_to_item%0#0: bytes = (extract3 struct#0 0u item_offset%0#0) @@ -63,11 +64,29 @@ contract test_cases.arc4_types.mutable_params.Arc4MutableParamsContract: return 1u 0u array#1 struct#1 subroutine test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.other_routine_2(array: bytes) -> : - block@0: // L98 + block@0: // L95 let array#1: bytes = ((replace2 0) array#0 0x0a) return array#0 array#1 + + subroutine test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.other_routine_3(arrays.0: bytes, arrays.1: bytes, arrays.2: bytes) -> : + block@0: // L101 + let tuple_index%0#0: uint64 = 0u + goto block@4 + block@2: // for_header_1_L103 + goto block@4 + block@3: // for_header_2_L103 + goto block@4 + block@4: // for_body_L103 + let tuple_index%0#1: uint64 = φ(tuple_index%0#0 <- block@0, tuple_index%0#4 <- block@2, tuple_index%0#4 <- block@3) + let tuple_index%0#4: uint64 = (+ tuple_index%0#1 1u) + goto_nth [block@2, block@3][tuple_index%0#1] else goto block@6 + block@6: // after_for_L103 + let arrays.0#2: bytes = ((replace2 0) arrays.0#0 0x63) + let arrays.1#2: bytes = ((replace2 0) arrays.1#0 0x63) + let arrays.2#2: bytes = ((replace2 0) arrays.2#0 0x63) + return arrays.0#2 arrays.1#2 arrays.2#2 program clear-state: subroutine test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.clear_state_program() -> bool: - block@0: // L115 + block@0: // L111 return 1u \ No newline at end of file diff --git a/test_cases/arc4_types/out/Arc4MutableParamsContract.ssa.opt_pass_9.ir b/test_cases/arc4_types/out/Arc4MutableParamsContract.ssa.opt_pass_9.ir index ec35f8b706..21649e27ec 100644 --- a/test_cases/arc4_types/out/Arc4MutableParamsContract.ssa.opt_pass_9.ir +++ b/test_cases/arc4_types/out/Arc4MutableParamsContract.ssa.opt_pass_9.ir @@ -38,12 +38,13 @@ contract test_cases.arc4_types.mutable_params.Arc4MutableParamsContract: let reinterpret_biguint%10#0: biguint = ((extract 0 1) my_array_copy_2#3) // on error: Index access is out of bounds let tmp%10#0: bool = (b== reinterpret_biguint%10#0 0x0a) (assert tmp%10#0) // my_array_copy_2 should have mutated value + let (other_routine_3%0#0: bytes, other_routine_3%1#0: bytes, other_routine_3%2#0: bytes) = test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.other_routine_3(my_array#2, my_array_copy_2#3, my_array_copy_2#3) let tmp%11#0: bytes = ((extract 0 4) my_array#2) // on error: Index access is out of bounds let (other_routine_2%4#0: bytes, other_routine_2%5#0: bytes) = test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.other_routine_2(tmp%11#0) return subroutine test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.other_routine(array: bytes, struct: bytes) -> : - block@0: // L92 + block@0: // L89 let array#1: bytes = ((replace2 1) array#0 0x05) let item_offset%0#0: uint64 = (extract_uint16 struct#0 2u) let data_up_to_item%0#0: bytes = (extract3 struct#0 0u item_offset%0#0) @@ -62,11 +63,29 @@ contract test_cases.arc4_types.mutable_params.Arc4MutableParamsContract: return 1u 0u array#1 struct#1 subroutine test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.other_routine_2(array: bytes) -> : - block@0: // L98 + block@0: // L95 let array#1: bytes = ((replace2 0) array#0 0x0a) return array#0 array#1 + + subroutine test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.other_routine_3(arrays.0: bytes, arrays.1: bytes, arrays.2: bytes) -> : + block@0: // L101 + let tuple_index%0#0: uint64 = 0u + goto block@4 + block@2: // for_header_1_L103 + goto block@4 + block@3: // for_header_2_L103 + goto block@4 + block@4: // for_body_L103 + let tuple_index%0#1: uint64 = φ(tuple_index%0#0 <- block@0, tuple_index%0#4 <- block@2, tuple_index%0#4 <- block@3) + let tuple_index%0#4: uint64 = (+ tuple_index%0#1 1u) + goto_nth [block@2, block@3][tuple_index%0#1] else goto block@6 + block@6: // after_for_L103 + let arrays.0#2: bytes = ((replace2 0) arrays.0#0 0x63) + let arrays.1#2: bytes = ((replace2 0) arrays.1#0 0x63) + let arrays.2#2: bytes = ((replace2 0) arrays.2#0 0x63) + return arrays.0#2 arrays.1#2 arrays.2#2 program clear-state: subroutine test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.clear_state_program() -> bool: - block@0: // L115 + block@0: // L111 return 1u \ No newline at end of file diff --git a/test_cases/arc4_types/out/mutable_params.O0.log b/test_cases/arc4_types/out/mutable_params.O0.log index e143a9c52a..f813771cea 100644 --- a/test_cases/arc4_types/out/mutable_params.O0.log +++ b/test_cases/arc4_types/out/mutable_params.O0.log @@ -1,334 +1,396 @@ -PC Teal Stack -1 -8 -40 callsub mutating_copies -45 proto 0 0 -48 byte 0x 0x -49 byte 0x01 0x, 0x01 -51 concat 0x01 -52 byte 0x02 0x01, 0x02 -54 concat 0x0102 -55 byte 0x03 0x0102, 0x03 -57 concat 0x010203 -58 byte 0x04 0x010203, 0x04 -61 concat 0x01020304 -62 byte 0x 0x01020304, 0x -63 uncover 1 0x, 0x01020304 -65 concat 0x01020304 -66 byte 0x00 0x01020304, 0x00 -69 int 0 0x01020304, 0x00, 0 -70 int 1 0x01020304, 0x00, 0, 1 -71 setbit 0x01020304, 0x80 -72 byte "Happy" 0x01020304, 0x80, "Happy" -73 len 0x01020304, 0x80, 5 -74 itob 0x01020304, 0x80, 0x0000000000000005 -75 extract 6 2 0x01020304, 0x80, 0x0005 -78 byte "Happy" 0x01020304, 0x80, 0x0005, "Happy" -79 concat 0x01020304, 0x80, 0x00054861707079 -80 cover 1 0x01020304, 0x00054861707079, 0x80 -82 byte "Days" 0x01020304, 0x00054861707079, 0x80, "Days" -84 len 0x01020304, 0x00054861707079, 0x80, 4 -85 itob 0x01020304, 0x00054861707079, 0x80, 0x0000000000000004 -86 extract 6 2 0x01020304, 0x00054861707079, 0x80, 0x0004 -89 byte "Days" 0x01020304, 0x00054861707079, 0x80, 0x0004, "Days" -91 concat 0x01020304, 0x00054861707079, 0x80, 0x000444617973 -92 cover 2 0x01020304, 0x000444617973, 0x00054861707079, 0x80 -94 byte 0x 0x01020304, 0x000444617973, 0x00054861707079, 0x80, 0x -95 uncover 1 0x01020304, 0x000444617973, 0x00054861707079, 0x, 0x80 -97 concat 0x01020304, 0x000444617973, 0x00054861707079, 0x80 -98 byte 0x32 0x01020304, 0x000444617973, 0x00054861707079, 0x80, "2" -101 concat 0x01020304, 0x000444617973, 0x00054861707079, 0x8032 -102 int 6 0x01020304, 0x000444617973, 0x00054861707079, 0x8032, 6 -104 itob 0x01020304, 0x000444617973, 0x00054861707079, 0x8032, 0x0000000000000006 -105 extract 6 2 0x01020304, 0x000444617973, 0x00054861707079, 0x8032, 0x0006 -108 concat 0x01020304, 0x000444617973, 0x00054861707079, 0x80320006 -109 dig 1 0x01020304, 0x000444617973, 0x00054861707079, 0x80320006, 0x00054861707079 -111 len 0x01020304, 0x000444617973, 0x00054861707079, 0x80320006, 7 -112 int 6 0x01020304, 0x000444617973, 0x00054861707079, 0x80320006, 7, 6 -114 uncover 1 0x01020304, 0x000444617973, 0x00054861707079, 0x80320006, 6, 7 -116 + 0x01020304, 0x000444617973, 0x00054861707079, 0x80320006, 13 -117 itob 0x01020304, 0x000444617973, 0x00054861707079, 0x80320006, 0x000000000000000D -118 extract 6 2 0x01020304, 0x000444617973, 0x00054861707079, 0x80320006, 0x000D -121 concat 0x01020304, 0x000444617973, 0x00054861707079, 0x80320006000D -122 uncover 1 0x01020304, 0x000444617973, 0x80320006000D, 0x00054861707079 -124 concat 0x01020304, 0x000444617973, 0x80320006000D00054861707079 -125 uncover 1 0x01020304, 0x80320006000D00054861707079, 0x000444617973 -127 concat 0x01020304, 0x80320006000D00054861707079000444617973 -128 dig 1 0x01020304, 0x80320006000D00054861707079000444617973, 0x01020304 -130 cover 2 0x01020304, 0x01020304, 0x80320006000D00054861707079000444617973 -132 dup 0x01020304, 0x01020304, 0x80320006000D00054861707079000444617973, 0x80320006000D00054861707079000444617973 -133 cover 3 0x80320006000D00054861707079000444617973, 0x01020304, 0x01020304, 0x80320006000D00054861707079000444617973 -135 uncover 1 0x80320006000D00054861707079000444617973, 0x01020304, 0x80320006000D00054861707079000444617973, 0x01020304 -137 int 2 0x80320006000D00054861707079000444617973, 0x01020304, 0x80320006000D00054861707079000444617973, 0x01020304, 2 -138 byte 0x05 0x80320006000D00054861707079000444617973, 0x01020304, 0x80320006000D00054861707079000444617973, 0x01020304, 2, 0x05 -139 replace3 0x80320006000D00054861707079000444617973, 0x01020304, 0x80320006000D00054861707079000444617973, 0x01020504 -140 cover 1 0x80320006000D00054861707079000444617973, 0x01020304, 0x01020504, 0x80320006000D00054861707079000444617973 -142 dig 2 0x80320006000D00054861707079000444617973, 0x01020304, 0x01020504, 0x80320006000D00054861707079000444617973, 0x01020304 -144 int 2 0x80320006000D00054861707079000444617973, 0x01020304, 0x01020504, 0x80320006000D00054861707079000444617973, 0x01020304, 2 -145 int 1 0x80320006000D00054861707079000444617973, 0x01020304, 0x01020504, 0x80320006000D00054861707079000444617973, 0x01020304, 2, 1 -146 * 0x80320006000D00054861707079000444617973, 0x01020304, 0x01020504, 0x80320006000D00054861707079000444617973, 0x01020304, 2 -147 int 1 0x80320006000D00054861707079000444617973, 0x01020304, 0x01020504, 0x80320006000D00054861707079000444617973, 0x01020304, 2, 1 -148 extract3 0x80320006000D00054861707079000444617973, 0x01020304, 0x01020504, 0x80320006000D00054861707079000444617973, 0x03 -149 byte 0x03 0x80320006000D00054861707079000444617973, 0x01020304, 0x01020504, 0x80320006000D00054861707079000444617973, 0x03, 0x03 -151 b== 0x80320006000D00054861707079000444617973, 0x01020304, 0x01020504, 0x80320006000D00054861707079000444617973, 1 -152 assert 0x80320006000D00054861707079000444617973, 0x01020304, 0x01020504, 0x80320006000D00054861707079000444617973 -153 dig 1 0x80320006000D00054861707079000444617973, 0x01020304, 0x01020504, 0x80320006000D00054861707079000444617973, 0x01020504 -155 int 2 0x80320006000D00054861707079000444617973, 0x01020304, 0x01020504, 0x80320006000D00054861707079000444617973, 0x01020504, 2 -156 int 1 0x80320006000D00054861707079000444617973, 0x01020304, 0x01020504, 0x80320006000D00054861707079000444617973, 0x01020504, 2, 1 -157 * 0x80320006000D00054861707079000444617973, 0x01020304, 0x01020504, 0x80320006000D00054861707079000444617973, 0x01020504, 2 -158 int 1 0x80320006000D00054861707079000444617973, 0x01020304, 0x01020504, 0x80320006000D00054861707079000444617973, 0x01020504, 2, 1 -159 extract3 0x80320006000D00054861707079000444617973, 0x01020304, 0x01020504, 0x80320006000D00054861707079000444617973, 0x05 -160 byte 0x05 0x80320006000D00054861707079000444617973, 0x01020304, 0x01020504, 0x80320006000D00054861707079000444617973, 0x05, 0x05 -161 b== 0x80320006000D00054861707079000444617973, 0x01020304, 0x01020504, 0x80320006000D00054861707079000444617973, 1 -162 assert 0x80320006000D00054861707079000444617973, 0x01020304, 0x01020504, 0x80320006000D00054861707079000444617973 -163 callsub other_routine 0x80320006000D00054861707079000444617973, 0x01020304, 0x01020504, 0x80320006000D00054861707079000444617973 -310 proto 2 4 0x80320006000D00054861707079000444617973, 0x01020304, 0x01020504, 0x80320006000D00054861707079000444617973 -313 frame_dig -2 0x80320006000D00054861707079000444617973, 0x01020304, 0x01020504, 0x80320006000D00054861707079000444617973, 0x01020504 -315 int 1 0x80320006000D00054861707079000444617973, 0x01020304, 0x01020504, 0x80320006000D00054861707079000444617973, 0x01020504, 1 -316 byte 0x05 0x80320006000D00054861707079000444617973, 0x01020304, 0x01020504, 0x80320006000D00054861707079000444617973, 0x01020504, 1, 0x05 -317 replace3 0x80320006000D00054861707079000444617973, 0x01020304, 0x01020504, 0x80320006000D00054861707079000444617973, 0x01050504 -318 frame_bury -2 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x80320006000D00054861707079000444617973 -320 byte "AARRGH!" 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x80320006000D00054861707079000444617973, "AARRGH!" -321 len 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x80320006000D00054861707079000444617973, 7 -322 itob 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x80320006000D00054861707079000444617973, 0x0000000000000007 -323 extract 6 2 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x80320006000D00054861707079000444617973, 0x0007 -326 byte "AARRGH!" 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x80320006000D00054861707079000444617973, 0x0007, "AARRGH!" -327 concat 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x80320006000D00054861707079000444617973, 0x000741415252474821 -328 frame_dig -1 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x80320006000D00054861707079000444617973, 0x000741415252474821, 0x80320006000D00054861707079000444617973 -330 int 2 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x80320006000D00054861707079000444617973, 0x000741415252474821, 0x80320006000D00054861707079000444617973, 2 -331 extract_uint16 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x80320006000D00054861707079000444617973, 0x000741415252474821, 6 -332 frame_dig -1 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x80320006000D00054861707079000444617973, 0x000741415252474821, 6, 0x80320006000D00054861707079000444617973 -334 int 0 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x80320006000D00054861707079000444617973, 0x000741415252474821, 6, 0x80320006000D00054861707079000444617973, 0 -335 dig 2 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x80320006000D00054861707079000444617973, 0x000741415252474821, 6, 0x80320006000D00054861707079000444617973, 0, 6 -337 extract3 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x80320006000D00054861707079000444617973, 0x000741415252474821, 6, 0x80320006000D -338 frame_dig -1 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x80320006000D00054861707079000444617973, 0x000741415252474821, 6, 0x80320006000D, 0x80320006000D00054861707079000444617973 -340 int 4 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x80320006000D00054861707079000444617973, 0x000741415252474821, 6, 0x80320006000D, 0x80320006000D00054861707079000444617973, 4 -341 extract_uint16 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x80320006000D00054861707079000444617973, 0x000741415252474821, 6, 0x80320006000D, 13 -342 frame_dig -1 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x80320006000D00054861707079000444617973, 0x000741415252474821, 6, 0x80320006000D, 13, 0x80320006000D00054861707079000444617973 -344 len 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x80320006000D00054861707079000444617973, 0x000741415252474821, 6, 0x80320006000D, 13, 19 -345 frame_dig -1 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x80320006000D00054861707079000444617973, 0x000741415252474821, 6, 0x80320006000D, 13, 19, 0x80320006000D00054861707079000444617973 -347 dig 2 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x80320006000D00054861707079000444617973, 0x000741415252474821, 6, 0x80320006000D, 13, 19, 0x80320006000D00054861707079000444617973, 13 -349 uncover 2 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x80320006000D00054861707079000444617973, 0x000741415252474821, 6, 0x80320006000D, 13, 0x80320006000D00054861707079000444617973, 13, 19 -351 substring3 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x80320006000D00054861707079000444617973, 0x000741415252474821, 6, 0x80320006000D, 13, 0x000444617973 -352 uncover 2 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x80320006000D00054861707079000444617973, 0x000741415252474821, 6, 13, 0x000444617973, 0x80320006000D -354 dig 4 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x80320006000D00054861707079000444617973, 0x000741415252474821, 6, 13, 0x000444617973, 0x80320006000D, 0x000741415252474821 -356 concat 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x80320006000D00054861707079000444617973, 0x000741415252474821, 6, 13, 0x000444617973, 0x80320006000D000741415252474821 -357 uncover 1 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x80320006000D00054861707079000444617973, 0x000741415252474821, 6, 13, 0x80320006000D000741415252474821, 0x000444617973 -359 concat 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x80320006000D00054861707079000444617973, 0x000741415252474821, 6, 13, 0x80320006000D000741415252474821000444617973 -360 uncover 1 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x80320006000D00054861707079000444617973, 0x000741415252474821, 6, 0x80320006000D000741415252474821000444617973, 13 -362 uncover 2 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x80320006000D00054861707079000444617973, 0x000741415252474821, 0x80320006000D000741415252474821000444617973, 13, 6 -364 - 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x80320006000D00054861707079000444617973, 0x000741415252474821, 0x80320006000D000741415252474821000444617973, 7 -365 cover 2 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x80320006000D00054861707079000444617973, 7, 0x000741415252474821, 0x80320006000D000741415252474821000444617973 -367 uncover 1 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x80320006000D00054861707079000444617973, 7, 0x80320006000D000741415252474821000444617973, 0x000741415252474821 -369 len 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x80320006000D00054861707079000444617973, 7, 0x80320006000D000741415252474821000444617973, 9 -370 dig 1 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x80320006000D00054861707079000444617973, 7, 0x80320006000D000741415252474821000444617973, 9, 0x80320006000D000741415252474821000444617973 -372 int 4 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x80320006000D00054861707079000444617973, 7, 0x80320006000D000741415252474821000444617973, 9, 0x80320006000D000741415252474821000444617973, 4 -373 extract_uint16 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x80320006000D00054861707079000444617973, 7, 0x80320006000D000741415252474821000444617973, 9, 13 -374 uncover 1 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x80320006000D00054861707079000444617973, 7, 0x80320006000D000741415252474821000444617973, 13, 9 -376 + 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x80320006000D00054861707079000444617973, 7, 0x80320006000D000741415252474821000444617973, 22 -377 uncover 2 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x80320006000D00054861707079000444617973, 0x80320006000D000741415252474821000444617973, 22, 7 -379 - 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x80320006000D00054861707079000444617973, 0x80320006000D000741415252474821000444617973, 15 -380 itob 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x80320006000D00054861707079000444617973, 0x80320006000D000741415252474821000444617973, 0x000000000000000F -381 extract 6 2 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x80320006000D00054861707079000444617973, 0x80320006000D000741415252474821000444617973, 0x000F -384 uncover 1 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x80320006000D00054861707079000444617973, 0x000F, 0x80320006000D000741415252474821000444617973 -386 int 4 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x80320006000D00054861707079000444617973, 0x000F, 0x80320006000D000741415252474821000444617973, 4 -387 uncover 2 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x80320006000D00054861707079000444617973, 0x80320006000D000741415252474821000444617973, 4, 0x000F -389 replace3 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x80320006000D00054861707079000444617973, 0x80320006000F000741415252474821000444617973 -390 frame_bury -1 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x80320006000F000741415252474821000444617973 -392 int 1 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x80320006000F000741415252474821000444617973, 1 -393 int 0 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x80320006000F000741415252474821000444617973, 1, 0 -394 frame_dig -2 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x80320006000F000741415252474821000444617973, 1, 0, 0x01050504 -396 frame_dig -1 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x80320006000F000741415252474821000444617973, 1, 0, 0x01050504, 0x80320006000F000741415252474821000444617973 -398 retsub 0x80320006000D00054861707079000444617973, 0x01020304, 1, 0, 0x01050504, 0x80320006000F000741415252474821000444617973 -166 cover 3 0x80320006000D00054861707079000444617973, 0x01020304, 0x80320006000F000741415252474821000444617973, 1, 0, 0x01050504 -168 cover 3 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x80320006000F000741415252474821000444617973, 1, 0 -170 cover 3 0x80320006000D00054861707079000444617973, 0x01020304, 0, 0x01050504, 0x80320006000F000741415252474821000444617973, 1 -172 cover 2 0x80320006000D00054861707079000444617973, 0x01020304, 0, 1, 0x01050504, 0x80320006000F000741415252474821000444617973 -174 cover 3 0x80320006000D00054861707079000444617973, 0x01020304, 0x80320006000F000741415252474821000444617973, 0, 1, 0x01050504 -176 cover 2 0x80320006000D00054861707079000444617973, 0x01020304, 0x80320006000F000741415252474821000444617973, 0x01050504, 0, 1 -178 assert 0x80320006000D00054861707079000444617973, 0x01020304, 0x80320006000F000741415252474821000444617973, 0x01050504, 0 -179 ! 0x80320006000D00054861707079000444617973, 0x01020304, 0x80320006000F000741415252474821000444617973, 0x01050504, 1 -180 assert 0x80320006000D00054861707079000444617973, 0x01020304, 0x80320006000F000741415252474821000444617973, 0x01050504 -181 dup 0x80320006000D00054861707079000444617973, 0x01020304, 0x80320006000F000741415252474821000444617973, 0x01050504, 0x01050504 -182 int 1 0x80320006000D00054861707079000444617973, 0x01020304, 0x80320006000F000741415252474821000444617973, 0x01050504, 0x01050504, 1 -183 int 1 0x80320006000D00054861707079000444617973, 0x01020304, 0x80320006000F000741415252474821000444617973, 0x01050504, 0x01050504, 1, 1 -184 * 0x80320006000D00054861707079000444617973, 0x01020304, 0x80320006000F000741415252474821000444617973, 0x01050504, 0x01050504, 1 -185 int 1 0x80320006000D00054861707079000444617973, 0x01020304, 0x80320006000F000741415252474821000444617973, 0x01050504, 0x01050504, 1, 1 -186 extract3 0x80320006000D00054861707079000444617973, 0x01020304, 0x80320006000F000741415252474821000444617973, 0x01050504, 0x05 -187 byte 0x05 0x80320006000D00054861707079000444617973, 0x01020304, 0x80320006000F000741415252474821000444617973, 0x01050504, 0x05, 0x05 -188 b== 0x80320006000D00054861707079000444617973, 0x01020304, 0x80320006000F000741415252474821000444617973, 0x01050504, 1 -189 assert 0x80320006000D00054861707079000444617973, 0x01020304, 0x80320006000F000741415252474821000444617973, 0x01050504 -190 dig 1 0x80320006000D00054861707079000444617973, 0x01020304, 0x80320006000F000741415252474821000444617973, 0x01050504, 0x80320006000F000741415252474821000444617973 -192 int 2 0x80320006000D00054861707079000444617973, 0x01020304, 0x80320006000F000741415252474821000444617973, 0x01050504, 0x80320006000F000741415252474821000444617973, 2 -193 extract_uint16 0x80320006000D00054861707079000444617973, 0x01020304, 0x80320006000F000741415252474821000444617973, 0x01050504, 6 -194 cover 1 0x80320006000D00054861707079000444617973, 0x01020304, 0x80320006000F000741415252474821000444617973, 6, 0x01050504 -196 dig 2 0x80320006000D00054861707079000444617973, 0x01020304, 0x80320006000F000741415252474821000444617973, 6, 0x01050504, 0x80320006000F000741415252474821000444617973 -198 int 4 0x80320006000D00054861707079000444617973, 0x01020304, 0x80320006000F000741415252474821000444617973, 6, 0x01050504, 0x80320006000F000741415252474821000444617973, 4 -199 extract_uint16 0x80320006000D00054861707079000444617973, 0x01020304, 0x80320006000F000741415252474821000444617973, 6, 0x01050504, 15 -200 uncover 3 0x80320006000D00054861707079000444617973, 0x01020304, 6, 0x01050504, 15, 0x80320006000F000741415252474821000444617973 -202 uncover 3 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 15, 0x80320006000F000741415252474821000444617973, 6 -204 uncover 2 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x80320006000F000741415252474821000444617973, 6, 15 -206 substring3 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x000741415252474821 -207 byte "AARRGH!" 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x000741415252474821, "AARRGH!" -208 len 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x000741415252474821, 7 -209 itob 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x000741415252474821, 0x0000000000000007 -210 extract 6 2 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x000741415252474821, 0x0007 -213 byte "AARRGH!" 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x000741415252474821, 0x0007, "AARRGH!" -214 concat 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x000741415252474821, 0x000741415252474821 -215 == 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 1 -216 assert 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504 -217 dig 1 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x01020304 -219 dig 3 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x01020304, 0x80320006000D00054861707079000444617973 -221 callsub other_routine 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x01020304, 0x80320006000D00054861707079000444617973 -310 proto 2 4 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x01020304, 0x80320006000D00054861707079000444617973 -313 frame_dig -2 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x01020304, 0x80320006000D00054861707079000444617973, 0x01020304 -315 int 1 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x01020304, 0x80320006000D00054861707079000444617973, 0x01020304, 1 -316 byte 0x05 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x01020304, 0x80320006000D00054861707079000444617973, 0x01020304, 1, 0x05 -317 replace3 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x01020304, 0x80320006000D00054861707079000444617973, 0x01050304 -318 frame_bury -2 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973 -320 byte "AARRGH!" 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973, "AARRGH!" -321 len 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973, 7 -322 itob 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973, 0x0000000000000007 -323 extract 6 2 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973, 0x0007 -326 byte "AARRGH!" 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973, 0x0007, "AARRGH!" -327 concat 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973, 0x000741415252474821 -328 frame_dig -1 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973, 0x000741415252474821, 0x80320006000D00054861707079000444617973 -330 int 2 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973, 0x000741415252474821, 0x80320006000D00054861707079000444617973, 2 -331 extract_uint16 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973, 0x000741415252474821, 6 -332 frame_dig -1 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973, 0x000741415252474821, 6, 0x80320006000D00054861707079000444617973 -334 int 0 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973, 0x000741415252474821, 6, 0x80320006000D00054861707079000444617973, 0 -335 dig 2 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973, 0x000741415252474821, 6, 0x80320006000D00054861707079000444617973, 0, 6 -337 extract3 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973, 0x000741415252474821, 6, 0x80320006000D -338 frame_dig -1 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973, 0x000741415252474821, 6, 0x80320006000D, 0x80320006000D00054861707079000444617973 -340 int 4 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973, 0x000741415252474821, 6, 0x80320006000D, 0x80320006000D00054861707079000444617973, 4 -341 extract_uint16 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973, 0x000741415252474821, 6, 0x80320006000D, 13 -342 frame_dig -1 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973, 0x000741415252474821, 6, 0x80320006000D, 13, 0x80320006000D00054861707079000444617973 -344 len 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973, 0x000741415252474821, 6, 0x80320006000D, 13, 19 -345 frame_dig -1 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973, 0x000741415252474821, 6, 0x80320006000D, 13, 19, 0x80320006000D00054861707079000444617973 -347 dig 2 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973, 0x000741415252474821, 6, 0x80320006000D, 13, 19, 0x80320006000D00054861707079000444617973, 13 -349 uncover 2 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973, 0x000741415252474821, 6, 0x80320006000D, 13, 0x80320006000D00054861707079000444617973, 13, 19 -351 substring3 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973, 0x000741415252474821, 6, 0x80320006000D, 13, 0x000444617973 -352 uncover 2 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973, 0x000741415252474821, 6, 13, 0x000444617973, 0x80320006000D -354 dig 4 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973, 0x000741415252474821, 6, 13, 0x000444617973, 0x80320006000D, 0x000741415252474821 -356 concat 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973, 0x000741415252474821, 6, 13, 0x000444617973, 0x80320006000D000741415252474821 -357 uncover 1 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973, 0x000741415252474821, 6, 13, 0x80320006000D000741415252474821, 0x000444617973 -359 concat 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973, 0x000741415252474821, 6, 13, 0x80320006000D000741415252474821000444617973 -360 uncover 1 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973, 0x000741415252474821, 6, 0x80320006000D000741415252474821000444617973, 13 -362 uncover 2 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973, 0x000741415252474821, 0x80320006000D000741415252474821000444617973, 13, 6 -364 - 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973, 0x000741415252474821, 0x80320006000D000741415252474821000444617973, 7 -365 cover 2 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973, 7, 0x000741415252474821, 0x80320006000D000741415252474821000444617973 -367 uncover 1 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973, 7, 0x80320006000D000741415252474821000444617973, 0x000741415252474821 -369 len 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973, 7, 0x80320006000D000741415252474821000444617973, 9 -370 dig 1 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973, 7, 0x80320006000D000741415252474821000444617973, 9, 0x80320006000D000741415252474821000444617973 -372 int 4 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973, 7, 0x80320006000D000741415252474821000444617973, 9, 0x80320006000D000741415252474821000444617973, 4 -373 extract_uint16 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973, 7, 0x80320006000D000741415252474821000444617973, 9, 13 -374 uncover 1 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973, 7, 0x80320006000D000741415252474821000444617973, 13, 9 -376 + 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973, 7, 0x80320006000D000741415252474821000444617973, 22 -377 uncover 2 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973, 0x80320006000D000741415252474821000444617973, 22, 7 -379 - 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973, 0x80320006000D000741415252474821000444617973, 15 -380 itob 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973, 0x80320006000D000741415252474821000444617973, 0x000000000000000F -381 extract 6 2 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973, 0x80320006000D000741415252474821000444617973, 0x000F -384 uncover 1 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973, 0x000F, 0x80320006000D000741415252474821000444617973 -386 int 4 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973, 0x000F, 0x80320006000D000741415252474821000444617973, 4 -387 uncover 2 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973, 0x80320006000D000741415252474821000444617973, 4, 0x000F -389 replace3 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973, 0x80320006000F000741415252474821000444617973 -390 frame_bury -1 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x01050304, 0x80320006000F000741415252474821000444617973 -392 int 1 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x01050304, 0x80320006000F000741415252474821000444617973, 1 -393 int 0 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x01050304, 0x80320006000F000741415252474821000444617973, 1, 0 -394 frame_dig -2 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x01050304, 0x80320006000F000741415252474821000444617973, 1, 0, 0x01050304 -396 frame_dig -1 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x01050304, 0x80320006000F000741415252474821000444617973, 1, 0, 0x01050304, 0x80320006000F000741415252474821000444617973 -398 retsub 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 1, 0, 0x01050304, 0x80320006000F000741415252474821000444617973 -224 pop 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 1, 0, 0x01050304 -225 pop 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 1, 0 -226 pop 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 1 -227 pop 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504 -228 dig 1 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x01020304 -230 int 1 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x01020304, 1 -231 int 1 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x01020304, 1, 1 -232 * 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x01020304, 1 -233 int 1 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x01020304, 1, 1 -234 extract3 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x02 -235 byte 0x02 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x02, 0x02 -237 b== 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 1 -238 assert 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504 -239 dig 2 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x80320006000D00054861707079000444617973 -241 int 2 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x80320006000D00054861707079000444617973, 2 -242 extract_uint16 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 6 -243 cover 1 0x80320006000D00054861707079000444617973, 0x01020304, 6, 0x01050504 -245 dig 3 0x80320006000D00054861707079000444617973, 0x01020304, 6, 0x01050504, 0x80320006000D00054861707079000444617973 -247 int 4 0x80320006000D00054861707079000444617973, 0x01020304, 6, 0x01050504, 0x80320006000D00054861707079000444617973, 4 -248 extract_uint16 0x80320006000D00054861707079000444617973, 0x01020304, 6, 0x01050504, 13 -249 uncover 4 0x01020304, 6, 0x01050504, 13, 0x80320006000D00054861707079000444617973 -251 uncover 3 0x01020304, 0x01050504, 13, 0x80320006000D00054861707079000444617973, 6 -253 uncover 2 0x01020304, 0x01050504, 0x80320006000D00054861707079000444617973, 6, 13 -255 substring3 0x01020304, 0x01050504, 0x00054861707079 -256 byte "Happy" 0x01020304, 0x01050504, 0x00054861707079, "Happy" -257 len 0x01020304, 0x01050504, 0x00054861707079, 5 -258 itob 0x01020304, 0x01050504, 0x00054861707079, 0x0000000000000005 -259 extract 6 2 0x01020304, 0x01050504, 0x00054861707079, 0x0005 -262 byte "Happy" 0x01020304, 0x01050504, 0x00054861707079, 0x0005, "Happy" -263 concat 0x01020304, 0x01050504, 0x00054861707079, 0x00054861707079 -264 == 0x01020304, 0x01050504, 1 -265 assert 0x01020304, 0x01050504 -266 uncover 1 0x01050504, 0x01020304 -268 callsub other_routine_2 0x01050504, 0x01020304 -399 proto 1 2 0x01050504, 0x01020304 -402 frame_dig -1 0x01050504, 0x01020304, 0x01020304 -404 frame_dig -1 0x01050504, 0x01020304, 0x01020304, 0x01020304 -406 int 0 0x01050504, 0x01020304, 0x01020304, 0x01020304, 0 -407 byte 0x0a 0x01050504, 0x01020304, 0x01020304, 0x01020304, 0, 0x0A -409 replace3 0x01050504, 0x01020304, 0x01020304, 0x0A020304 -410 dup 0x01050504, 0x01020304, 0x01020304, 0x0A020304, 0x0A020304 -411 frame_bury -1 0x01050504, 0x0A020304, 0x01020304, 0x0A020304 -413 retsub 0x01050504, 0x01020304, 0x0A020304 -271 pop 0x01050504, 0x01020304 -272 dup 0x01050504, 0x01020304, 0x01020304 -273 int 0 0x01050504, 0x01020304, 0x01020304, 0 -274 int 1 0x01050504, 0x01020304, 0x01020304, 0, 1 -275 * 0x01050504, 0x01020304, 0x01020304, 0 -276 int 1 0x01050504, 0x01020304, 0x01020304, 0, 1 -277 extract3 0x01050504, 0x01020304, 0x01 -278 byte 0x01 0x01050504, 0x01020304, 0x01, 0x01 -280 b== 0x01050504, 0x01020304, 1 -281 assert 0x01050504, 0x01020304 -282 callsub other_routine_2 0x01050504, 0x01020304 -399 proto 1 2 0x01050504, 0x01020304 -402 frame_dig -1 0x01050504, 0x01020304, 0x01020304 -404 frame_dig -1 0x01050504, 0x01020304, 0x01020304, 0x01020304 -406 int 0 0x01050504, 0x01020304, 0x01020304, 0x01020304, 0 -407 byte 0x0a 0x01050504, 0x01020304, 0x01020304, 0x01020304, 0, 0x0A -409 replace3 0x01050504, 0x01020304, 0x01020304, 0x0A020304 -410 dup 0x01050504, 0x01020304, 0x01020304, 0x0A020304, 0x0A020304 -411 frame_bury -1 0x01050504, 0x0A020304, 0x01020304, 0x0A020304 -413 retsub 0x01050504, 0x01020304, 0x0A020304 -285 cover 1 0x01050504, 0x0A020304, 0x01020304 -287 pop 0x01050504, 0x0A020304 -288 int 0 0x01050504, 0x0A020304, 0 -289 int 1 0x01050504, 0x0A020304, 0, 1 -290 * 0x01050504, 0x0A020304, 0 -291 int 1 0x01050504, 0x0A020304, 0, 1 -292 extract3 0x01050504, 0x0A -293 byte 0x0a 0x01050504, 0x0A, 0x0A -295 b== 0x01050504, 1 -296 assert 0x01050504 -297 byte 0x 0x01050504, 0x -298 uncover 1 0x, 0x01050504 -300 concat 0x01050504 -301 int 0 0x01050504, 0 -302 int 4 0x01050504, 0, 4 -303 extract3 0x01050504 -304 callsub other_routine_2 0x01050504 -399 proto 1 2 0x01050504 -402 frame_dig -1 0x01050504, 0x01050504 -404 frame_dig -1 0x01050504, 0x01050504, 0x01050504 -406 int 0 0x01050504, 0x01050504, 0x01050504, 0 -407 byte 0x0a 0x01050504, 0x01050504, 0x01050504, 0, 0x0A -409 replace3 0x01050504, 0x01050504, 0x0A050504 -410 dup 0x01050504, 0x01050504, 0x0A050504, 0x0A050504 -411 frame_bury -1 0x0A050504, 0x01050504, 0x0A050504 -413 retsub 0x01050504, 0x0A050504 -307 pop 0x01050504 -308 pop -309 retsub -43 int 1 1 -44 return 1 \ No newline at end of file +PC Teal Stack +1 +8 +42 callsub mutating_copies +47 proto 0 0 +50 byte 0x 0x +51 byte 0x01 0x, 0x01 +53 concat 0x01 +54 byte 0x02 0x01, 0x02 +56 concat 0x0102 +57 byte 0x03 0x0102, 0x03 +59 concat 0x010203 +60 byte 0x04 0x010203, 0x04 +63 concat 0x01020304 +64 byte 0x 0x01020304, 0x +65 uncover 1 0x, 0x01020304 +67 concat 0x01020304 +68 byte 0x00 0x01020304, 0x00 +71 int 0 0x01020304, 0x00, 0 +72 int 1 0x01020304, 0x00, 0, 1 +73 setbit 0x01020304, 0x80 +74 byte "Happy" 0x01020304, 0x80, "Happy" +75 len 0x01020304, 0x80, 5 +76 itob 0x01020304, 0x80, 0x0000000000000005 +77 extract 6 2 0x01020304, 0x80, 0x0005 +80 byte "Happy" 0x01020304, 0x80, 0x0005, "Happy" +81 concat 0x01020304, 0x80, 0x00054861707079 +82 cover 1 0x01020304, 0x00054861707079, 0x80 +84 byte "Days" 0x01020304, 0x00054861707079, 0x80, "Days" +86 len 0x01020304, 0x00054861707079, 0x80, 4 +87 itob 0x01020304, 0x00054861707079, 0x80, 0x0000000000000004 +88 extract 6 2 0x01020304, 0x00054861707079, 0x80, 0x0004 +91 byte "Days" 0x01020304, 0x00054861707079, 0x80, 0x0004, "Days" +93 concat 0x01020304, 0x00054861707079, 0x80, 0x000444617973 +94 cover 2 0x01020304, 0x000444617973, 0x00054861707079, 0x80 +96 byte 0x 0x01020304, 0x000444617973, 0x00054861707079, 0x80, 0x +97 uncover 1 0x01020304, 0x000444617973, 0x00054861707079, 0x, 0x80 +99 concat 0x01020304, 0x000444617973, 0x00054861707079, 0x80 +100 byte 0x32 0x01020304, 0x000444617973, 0x00054861707079, 0x80, "2" +103 concat 0x01020304, 0x000444617973, 0x00054861707079, 0x8032 +104 int 6 0x01020304, 0x000444617973, 0x00054861707079, 0x8032, 6 +106 itob 0x01020304, 0x000444617973, 0x00054861707079, 0x8032, 0x0000000000000006 +107 extract 6 2 0x01020304, 0x000444617973, 0x00054861707079, 0x8032, 0x0006 +110 concat 0x01020304, 0x000444617973, 0x00054861707079, 0x80320006 +111 dig 1 0x01020304, 0x000444617973, 0x00054861707079, 0x80320006, 0x00054861707079 +113 len 0x01020304, 0x000444617973, 0x00054861707079, 0x80320006, 7 +114 int 6 0x01020304, 0x000444617973, 0x00054861707079, 0x80320006, 7, 6 +116 uncover 1 0x01020304, 0x000444617973, 0x00054861707079, 0x80320006, 6, 7 +118 + 0x01020304, 0x000444617973, 0x00054861707079, 0x80320006, 13 +119 itob 0x01020304, 0x000444617973, 0x00054861707079, 0x80320006, 0x000000000000000D +120 extract 6 2 0x01020304, 0x000444617973, 0x00054861707079, 0x80320006, 0x000D +123 concat 0x01020304, 0x000444617973, 0x00054861707079, 0x80320006000D +124 uncover 1 0x01020304, 0x000444617973, 0x80320006000D, 0x00054861707079 +126 concat 0x01020304, 0x000444617973, 0x80320006000D00054861707079 +127 uncover 1 0x01020304, 0x80320006000D00054861707079, 0x000444617973 +129 concat 0x01020304, 0x80320006000D00054861707079000444617973 +130 dig 1 0x01020304, 0x80320006000D00054861707079000444617973, 0x01020304 +132 cover 2 0x01020304, 0x01020304, 0x80320006000D00054861707079000444617973 +134 dup 0x01020304, 0x01020304, 0x80320006000D00054861707079000444617973, 0x80320006000D00054861707079000444617973 +135 cover 3 0x80320006000D00054861707079000444617973, 0x01020304, 0x01020304, 0x80320006000D00054861707079000444617973 +137 uncover 1 0x80320006000D00054861707079000444617973, 0x01020304, 0x80320006000D00054861707079000444617973, 0x01020304 +139 int 2 0x80320006000D00054861707079000444617973, 0x01020304, 0x80320006000D00054861707079000444617973, 0x01020304, 2 +140 byte 0x05 0x80320006000D00054861707079000444617973, 0x01020304, 0x80320006000D00054861707079000444617973, 0x01020304, 2, 0x05 +141 replace3 0x80320006000D00054861707079000444617973, 0x01020304, 0x80320006000D00054861707079000444617973, 0x01020504 +142 cover 1 0x80320006000D00054861707079000444617973, 0x01020304, 0x01020504, 0x80320006000D00054861707079000444617973 +144 dig 2 0x80320006000D00054861707079000444617973, 0x01020304, 0x01020504, 0x80320006000D00054861707079000444617973, 0x01020304 +146 int 2 0x80320006000D00054861707079000444617973, 0x01020304, 0x01020504, 0x80320006000D00054861707079000444617973, 0x01020304, 2 +147 int 1 0x80320006000D00054861707079000444617973, 0x01020304, 0x01020504, 0x80320006000D00054861707079000444617973, 0x01020304, 2, 1 +148 * 0x80320006000D00054861707079000444617973, 0x01020304, 0x01020504, 0x80320006000D00054861707079000444617973, 0x01020304, 2 +149 int 1 0x80320006000D00054861707079000444617973, 0x01020304, 0x01020504, 0x80320006000D00054861707079000444617973, 0x01020304, 2, 1 +150 extract3 0x80320006000D00054861707079000444617973, 0x01020304, 0x01020504, 0x80320006000D00054861707079000444617973, 0x03 +151 byte 0x03 0x80320006000D00054861707079000444617973, 0x01020304, 0x01020504, 0x80320006000D00054861707079000444617973, 0x03, 0x03 +153 b== 0x80320006000D00054861707079000444617973, 0x01020304, 0x01020504, 0x80320006000D00054861707079000444617973, 1 +154 assert 0x80320006000D00054861707079000444617973, 0x01020304, 0x01020504, 0x80320006000D00054861707079000444617973 +155 dig 1 0x80320006000D00054861707079000444617973, 0x01020304, 0x01020504, 0x80320006000D00054861707079000444617973, 0x01020504 +157 int 2 0x80320006000D00054861707079000444617973, 0x01020304, 0x01020504, 0x80320006000D00054861707079000444617973, 0x01020504, 2 +158 int 1 0x80320006000D00054861707079000444617973, 0x01020304, 0x01020504, 0x80320006000D00054861707079000444617973, 0x01020504, 2, 1 +159 * 0x80320006000D00054861707079000444617973, 0x01020304, 0x01020504, 0x80320006000D00054861707079000444617973, 0x01020504, 2 +160 int 1 0x80320006000D00054861707079000444617973, 0x01020304, 0x01020504, 0x80320006000D00054861707079000444617973, 0x01020504, 2, 1 +161 extract3 0x80320006000D00054861707079000444617973, 0x01020304, 0x01020504, 0x80320006000D00054861707079000444617973, 0x05 +162 byte 0x05 0x80320006000D00054861707079000444617973, 0x01020304, 0x01020504, 0x80320006000D00054861707079000444617973, 0x05, 0x05 +163 b== 0x80320006000D00054861707079000444617973, 0x01020304, 0x01020504, 0x80320006000D00054861707079000444617973, 1 +164 assert 0x80320006000D00054861707079000444617973, 0x01020304, 0x01020504, 0x80320006000D00054861707079000444617973 +165 callsub other_routine 0x80320006000D00054861707079000444617973, 0x01020304, 0x01020504, 0x80320006000D00054861707079000444617973 +333 proto 2 4 0x80320006000D00054861707079000444617973, 0x01020304, 0x01020504, 0x80320006000D00054861707079000444617973 +336 frame_dig -2 0x80320006000D00054861707079000444617973, 0x01020304, 0x01020504, 0x80320006000D00054861707079000444617973, 0x01020504 +338 int 1 0x80320006000D00054861707079000444617973, 0x01020304, 0x01020504, 0x80320006000D00054861707079000444617973, 0x01020504, 1 +339 byte 0x05 0x80320006000D00054861707079000444617973, 0x01020304, 0x01020504, 0x80320006000D00054861707079000444617973, 0x01020504, 1, 0x05 +340 replace3 0x80320006000D00054861707079000444617973, 0x01020304, 0x01020504, 0x80320006000D00054861707079000444617973, 0x01050504 +341 frame_bury -2 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x80320006000D00054861707079000444617973 +343 byte "AARRGH!" 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x80320006000D00054861707079000444617973, "AARRGH!" +344 len 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x80320006000D00054861707079000444617973, 7 +345 itob 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x80320006000D00054861707079000444617973, 0x0000000000000007 +346 extract 6 2 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x80320006000D00054861707079000444617973, 0x0007 +349 byte "AARRGH!" 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x80320006000D00054861707079000444617973, 0x0007, "AARRGH!" +350 concat 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x80320006000D00054861707079000444617973, 0x000741415252474821 +351 frame_dig -1 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x80320006000D00054861707079000444617973, 0x000741415252474821, 0x80320006000D00054861707079000444617973 +353 int 2 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x80320006000D00054861707079000444617973, 0x000741415252474821, 0x80320006000D00054861707079000444617973, 2 +354 extract_uint16 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x80320006000D00054861707079000444617973, 0x000741415252474821, 6 +355 frame_dig -1 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x80320006000D00054861707079000444617973, 0x000741415252474821, 6, 0x80320006000D00054861707079000444617973 +357 int 0 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x80320006000D00054861707079000444617973, 0x000741415252474821, 6, 0x80320006000D00054861707079000444617973, 0 +358 dig 2 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x80320006000D00054861707079000444617973, 0x000741415252474821, 6, 0x80320006000D00054861707079000444617973, 0, 6 +360 extract3 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x80320006000D00054861707079000444617973, 0x000741415252474821, 6, 0x80320006000D +361 frame_dig -1 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x80320006000D00054861707079000444617973, 0x000741415252474821, 6, 0x80320006000D, 0x80320006000D00054861707079000444617973 +363 int 4 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x80320006000D00054861707079000444617973, 0x000741415252474821, 6, 0x80320006000D, 0x80320006000D00054861707079000444617973, 4 +364 extract_uint16 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x80320006000D00054861707079000444617973, 0x000741415252474821, 6, 0x80320006000D, 13 +365 frame_dig -1 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x80320006000D00054861707079000444617973, 0x000741415252474821, 6, 0x80320006000D, 13, 0x80320006000D00054861707079000444617973 +367 len 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x80320006000D00054861707079000444617973, 0x000741415252474821, 6, 0x80320006000D, 13, 19 +368 frame_dig -1 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x80320006000D00054861707079000444617973, 0x000741415252474821, 6, 0x80320006000D, 13, 19, 0x80320006000D00054861707079000444617973 +370 dig 2 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x80320006000D00054861707079000444617973, 0x000741415252474821, 6, 0x80320006000D, 13, 19, 0x80320006000D00054861707079000444617973, 13 +372 uncover 2 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x80320006000D00054861707079000444617973, 0x000741415252474821, 6, 0x80320006000D, 13, 0x80320006000D00054861707079000444617973, 13, 19 +374 substring3 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x80320006000D00054861707079000444617973, 0x000741415252474821, 6, 0x80320006000D, 13, 0x000444617973 +375 uncover 2 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x80320006000D00054861707079000444617973, 0x000741415252474821, 6, 13, 0x000444617973, 0x80320006000D +377 dig 4 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x80320006000D00054861707079000444617973, 0x000741415252474821, 6, 13, 0x000444617973, 0x80320006000D, 0x000741415252474821 +379 concat 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x80320006000D00054861707079000444617973, 0x000741415252474821, 6, 13, 0x000444617973, 0x80320006000D000741415252474821 +380 uncover 1 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x80320006000D00054861707079000444617973, 0x000741415252474821, 6, 13, 0x80320006000D000741415252474821, 0x000444617973 +382 concat 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x80320006000D00054861707079000444617973, 0x000741415252474821, 6, 13, 0x80320006000D000741415252474821000444617973 +383 uncover 1 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x80320006000D00054861707079000444617973, 0x000741415252474821, 6, 0x80320006000D000741415252474821000444617973, 13 +385 uncover 2 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x80320006000D00054861707079000444617973, 0x000741415252474821, 0x80320006000D000741415252474821000444617973, 13, 6 +387 - 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x80320006000D00054861707079000444617973, 0x000741415252474821, 0x80320006000D000741415252474821000444617973, 7 +388 cover 2 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x80320006000D00054861707079000444617973, 7, 0x000741415252474821, 0x80320006000D000741415252474821000444617973 +390 uncover 1 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x80320006000D00054861707079000444617973, 7, 0x80320006000D000741415252474821000444617973, 0x000741415252474821 +392 len 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x80320006000D00054861707079000444617973, 7, 0x80320006000D000741415252474821000444617973, 9 +393 dig 1 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x80320006000D00054861707079000444617973, 7, 0x80320006000D000741415252474821000444617973, 9, 0x80320006000D000741415252474821000444617973 +395 int 4 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x80320006000D00054861707079000444617973, 7, 0x80320006000D000741415252474821000444617973, 9, 0x80320006000D000741415252474821000444617973, 4 +396 extract_uint16 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x80320006000D00054861707079000444617973, 7, 0x80320006000D000741415252474821000444617973, 9, 13 +397 uncover 1 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x80320006000D00054861707079000444617973, 7, 0x80320006000D000741415252474821000444617973, 13, 9 +399 + 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x80320006000D00054861707079000444617973, 7, 0x80320006000D000741415252474821000444617973, 22 +400 uncover 2 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x80320006000D00054861707079000444617973, 0x80320006000D000741415252474821000444617973, 22, 7 +402 - 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x80320006000D00054861707079000444617973, 0x80320006000D000741415252474821000444617973, 15 +403 itob 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x80320006000D00054861707079000444617973, 0x80320006000D000741415252474821000444617973, 0x000000000000000F +404 extract 6 2 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x80320006000D00054861707079000444617973, 0x80320006000D000741415252474821000444617973, 0x000F +407 uncover 1 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x80320006000D00054861707079000444617973, 0x000F, 0x80320006000D000741415252474821000444617973 +409 int 4 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x80320006000D00054861707079000444617973, 0x000F, 0x80320006000D000741415252474821000444617973, 4 +410 uncover 2 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x80320006000D00054861707079000444617973, 0x80320006000D000741415252474821000444617973, 4, 0x000F +412 replace3 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x80320006000D00054861707079000444617973, 0x80320006000F000741415252474821000444617973 +413 frame_bury -1 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x80320006000F000741415252474821000444617973 +415 int 1 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x80320006000F000741415252474821000444617973, 1 +416 int 0 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x80320006000F000741415252474821000444617973, 1, 0 +417 frame_dig -2 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x80320006000F000741415252474821000444617973, 1, 0, 0x01050504 +419 frame_dig -1 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x80320006000F000741415252474821000444617973, 1, 0, 0x01050504, 0x80320006000F000741415252474821000444617973 +421 retsub 0x80320006000D00054861707079000444617973, 0x01020304, 1, 0, 0x01050504, 0x80320006000F000741415252474821000444617973 +168 cover 3 0x80320006000D00054861707079000444617973, 0x01020304, 0x80320006000F000741415252474821000444617973, 1, 0, 0x01050504 +170 cover 3 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x80320006000F000741415252474821000444617973, 1, 0 +172 cover 3 0x80320006000D00054861707079000444617973, 0x01020304, 0, 0x01050504, 0x80320006000F000741415252474821000444617973, 1 +174 cover 2 0x80320006000D00054861707079000444617973, 0x01020304, 0, 1, 0x01050504, 0x80320006000F000741415252474821000444617973 +176 cover 3 0x80320006000D00054861707079000444617973, 0x01020304, 0x80320006000F000741415252474821000444617973, 0, 1, 0x01050504 +178 cover 2 0x80320006000D00054861707079000444617973, 0x01020304, 0x80320006000F000741415252474821000444617973, 0x01050504, 0, 1 +180 assert 0x80320006000D00054861707079000444617973, 0x01020304, 0x80320006000F000741415252474821000444617973, 0x01050504, 0 +181 ! 0x80320006000D00054861707079000444617973, 0x01020304, 0x80320006000F000741415252474821000444617973, 0x01050504, 1 +182 assert 0x80320006000D00054861707079000444617973, 0x01020304, 0x80320006000F000741415252474821000444617973, 0x01050504 +183 dup 0x80320006000D00054861707079000444617973, 0x01020304, 0x80320006000F000741415252474821000444617973, 0x01050504, 0x01050504 +184 int 1 0x80320006000D00054861707079000444617973, 0x01020304, 0x80320006000F000741415252474821000444617973, 0x01050504, 0x01050504, 1 +185 int 1 0x80320006000D00054861707079000444617973, 0x01020304, 0x80320006000F000741415252474821000444617973, 0x01050504, 0x01050504, 1, 1 +186 * 0x80320006000D00054861707079000444617973, 0x01020304, 0x80320006000F000741415252474821000444617973, 0x01050504, 0x01050504, 1 +187 int 1 0x80320006000D00054861707079000444617973, 0x01020304, 0x80320006000F000741415252474821000444617973, 0x01050504, 0x01050504, 1, 1 +188 extract3 0x80320006000D00054861707079000444617973, 0x01020304, 0x80320006000F000741415252474821000444617973, 0x01050504, 0x05 +189 byte 0x05 0x80320006000D00054861707079000444617973, 0x01020304, 0x80320006000F000741415252474821000444617973, 0x01050504, 0x05, 0x05 +190 b== 0x80320006000D00054861707079000444617973, 0x01020304, 0x80320006000F000741415252474821000444617973, 0x01050504, 1 +191 assert 0x80320006000D00054861707079000444617973, 0x01020304, 0x80320006000F000741415252474821000444617973, 0x01050504 +192 dig 1 0x80320006000D00054861707079000444617973, 0x01020304, 0x80320006000F000741415252474821000444617973, 0x01050504, 0x80320006000F000741415252474821000444617973 +194 int 2 0x80320006000D00054861707079000444617973, 0x01020304, 0x80320006000F000741415252474821000444617973, 0x01050504, 0x80320006000F000741415252474821000444617973, 2 +195 extract_uint16 0x80320006000D00054861707079000444617973, 0x01020304, 0x80320006000F000741415252474821000444617973, 0x01050504, 6 +196 cover 1 0x80320006000D00054861707079000444617973, 0x01020304, 0x80320006000F000741415252474821000444617973, 6, 0x01050504 +198 dig 2 0x80320006000D00054861707079000444617973, 0x01020304, 0x80320006000F000741415252474821000444617973, 6, 0x01050504, 0x80320006000F000741415252474821000444617973 +200 int 4 0x80320006000D00054861707079000444617973, 0x01020304, 0x80320006000F000741415252474821000444617973, 6, 0x01050504, 0x80320006000F000741415252474821000444617973, 4 +201 extract_uint16 0x80320006000D00054861707079000444617973, 0x01020304, 0x80320006000F000741415252474821000444617973, 6, 0x01050504, 15 +202 uncover 3 0x80320006000D00054861707079000444617973, 0x01020304, 6, 0x01050504, 15, 0x80320006000F000741415252474821000444617973 +204 uncover 3 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 15, 0x80320006000F000741415252474821000444617973, 6 +206 uncover 2 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x80320006000F000741415252474821000444617973, 6, 15 +208 substring3 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x000741415252474821 +209 byte "AARRGH!" 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x000741415252474821, "AARRGH!" +210 len 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x000741415252474821, 7 +211 itob 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x000741415252474821, 0x0000000000000007 +212 extract 6 2 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x000741415252474821, 0x0007 +215 byte "AARRGH!" 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x000741415252474821, 0x0007, "AARRGH!" +216 concat 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x000741415252474821, 0x000741415252474821 +217 == 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 1 +218 assert 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504 +219 dig 1 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x01020304 +221 dig 3 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x01020304, 0x80320006000D00054861707079000444617973 +223 callsub other_routine 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x01020304, 0x80320006000D00054861707079000444617973 +333 proto 2 4 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x01020304, 0x80320006000D00054861707079000444617973 +336 frame_dig -2 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x01020304, 0x80320006000D00054861707079000444617973, 0x01020304 +338 int 1 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x01020304, 0x80320006000D00054861707079000444617973, 0x01020304, 1 +339 byte 0x05 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x01020304, 0x80320006000D00054861707079000444617973, 0x01020304, 1, 0x05 +340 replace3 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x01020304, 0x80320006000D00054861707079000444617973, 0x01050304 +341 frame_bury -2 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973 +343 byte "AARRGH!" 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973, "AARRGH!" +344 len 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973, 7 +345 itob 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973, 0x0000000000000007 +346 extract 6 2 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973, 0x0007 +349 byte "AARRGH!" 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973, 0x0007, "AARRGH!" +350 concat 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973, 0x000741415252474821 +351 frame_dig -1 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973, 0x000741415252474821, 0x80320006000D00054861707079000444617973 +353 int 2 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973, 0x000741415252474821, 0x80320006000D00054861707079000444617973, 2 +354 extract_uint16 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973, 0x000741415252474821, 6 +355 frame_dig -1 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973, 0x000741415252474821, 6, 0x80320006000D00054861707079000444617973 +357 int 0 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973, 0x000741415252474821, 6, 0x80320006000D00054861707079000444617973, 0 +358 dig 2 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973, 0x000741415252474821, 6, 0x80320006000D00054861707079000444617973, 0, 6 +360 extract3 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973, 0x000741415252474821, 6, 0x80320006000D +361 frame_dig -1 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973, 0x000741415252474821, 6, 0x80320006000D, 0x80320006000D00054861707079000444617973 +363 int 4 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973, 0x000741415252474821, 6, 0x80320006000D, 0x80320006000D00054861707079000444617973, 4 +364 extract_uint16 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973, 0x000741415252474821, 6, 0x80320006000D, 13 +365 frame_dig -1 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973, 0x000741415252474821, 6, 0x80320006000D, 13, 0x80320006000D00054861707079000444617973 +367 len 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973, 0x000741415252474821, 6, 0x80320006000D, 13, 19 +368 frame_dig -1 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973, 0x000741415252474821, 6, 0x80320006000D, 13, 19, 0x80320006000D00054861707079000444617973 +370 dig 2 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973, 0x000741415252474821, 6, 0x80320006000D, 13, 19, 0x80320006000D00054861707079000444617973, 13 +372 uncover 2 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973, 0x000741415252474821, 6, 0x80320006000D, 13, 0x80320006000D00054861707079000444617973, 13, 19 +374 substring3 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973, 0x000741415252474821, 6, 0x80320006000D, 13, 0x000444617973 +375 uncover 2 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973, 0x000741415252474821, 6, 13, 0x000444617973, 0x80320006000D +377 dig 4 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973, 0x000741415252474821, 6, 13, 0x000444617973, 0x80320006000D, 0x000741415252474821 +379 concat 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973, 0x000741415252474821, 6, 13, 0x000444617973, 0x80320006000D000741415252474821 +380 uncover 1 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973, 0x000741415252474821, 6, 13, 0x80320006000D000741415252474821, 0x000444617973 +382 concat 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973, 0x000741415252474821, 6, 13, 0x80320006000D000741415252474821000444617973 +383 uncover 1 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973, 0x000741415252474821, 6, 0x80320006000D000741415252474821000444617973, 13 +385 uncover 2 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973, 0x000741415252474821, 0x80320006000D000741415252474821000444617973, 13, 6 +387 - 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973, 0x000741415252474821, 0x80320006000D000741415252474821000444617973, 7 +388 cover 2 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973, 7, 0x000741415252474821, 0x80320006000D000741415252474821000444617973 +390 uncover 1 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973, 7, 0x80320006000D000741415252474821000444617973, 0x000741415252474821 +392 len 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973, 7, 0x80320006000D000741415252474821000444617973, 9 +393 dig 1 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973, 7, 0x80320006000D000741415252474821000444617973, 9, 0x80320006000D000741415252474821000444617973 +395 int 4 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973, 7, 0x80320006000D000741415252474821000444617973, 9, 0x80320006000D000741415252474821000444617973, 4 +396 extract_uint16 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973, 7, 0x80320006000D000741415252474821000444617973, 9, 13 +397 uncover 1 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973, 7, 0x80320006000D000741415252474821000444617973, 13, 9 +399 + 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973, 7, 0x80320006000D000741415252474821000444617973, 22 +400 uncover 2 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973, 0x80320006000D000741415252474821000444617973, 22, 7 +402 - 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973, 0x80320006000D000741415252474821000444617973, 15 +403 itob 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973, 0x80320006000D000741415252474821000444617973, 0x000000000000000F +404 extract 6 2 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973, 0x80320006000D000741415252474821000444617973, 0x000F +407 uncover 1 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973, 0x000F, 0x80320006000D000741415252474821000444617973 +409 int 4 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973, 0x000F, 0x80320006000D000741415252474821000444617973, 4 +410 uncover 2 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973, 0x80320006000D000741415252474821000444617973, 4, 0x000F +412 replace3 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973, 0x80320006000F000741415252474821000444617973 +413 frame_bury -1 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x01050304, 0x80320006000F000741415252474821000444617973 +415 int 1 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x01050304, 0x80320006000F000741415252474821000444617973, 1 +416 int 0 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x01050304, 0x80320006000F000741415252474821000444617973, 1, 0 +417 frame_dig -2 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x01050304, 0x80320006000F000741415252474821000444617973, 1, 0, 0x01050304 +419 frame_dig -1 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x01050304, 0x80320006000F000741415252474821000444617973, 1, 0, 0x01050304, 0x80320006000F000741415252474821000444617973 +421 retsub 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 1, 0, 0x01050304, 0x80320006000F000741415252474821000444617973 +226 pop 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 1, 0, 0x01050304 +227 pop 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 1, 0 +228 pop 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 1 +229 pop 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504 +230 dig 1 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x01020304 +232 int 1 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x01020304, 1 +233 int 1 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x01020304, 1, 1 +234 * 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x01020304, 1 +235 int 1 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x01020304, 1, 1 +236 extract3 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x02 +237 byte 0x02 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x02, 0x02 +239 b== 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 1 +240 assert 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504 +241 dig 2 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x80320006000D00054861707079000444617973 +243 int 2 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 0x80320006000D00054861707079000444617973, 2 +244 extract_uint16 0x80320006000D00054861707079000444617973, 0x01020304, 0x01050504, 6 +245 cover 1 0x80320006000D00054861707079000444617973, 0x01020304, 6, 0x01050504 +247 dig 3 0x80320006000D00054861707079000444617973, 0x01020304, 6, 0x01050504, 0x80320006000D00054861707079000444617973 +249 int 4 0x80320006000D00054861707079000444617973, 0x01020304, 6, 0x01050504, 0x80320006000D00054861707079000444617973, 4 +250 extract_uint16 0x80320006000D00054861707079000444617973, 0x01020304, 6, 0x01050504, 13 +251 uncover 4 0x01020304, 6, 0x01050504, 13, 0x80320006000D00054861707079000444617973 +253 uncover 3 0x01020304, 0x01050504, 13, 0x80320006000D00054861707079000444617973, 6 +255 uncover 2 0x01020304, 0x01050504, 0x80320006000D00054861707079000444617973, 6, 13 +257 substring3 0x01020304, 0x01050504, 0x00054861707079 +258 byte "Happy" 0x01020304, 0x01050504, 0x00054861707079, "Happy" +259 len 0x01020304, 0x01050504, 0x00054861707079, 5 +260 itob 0x01020304, 0x01050504, 0x00054861707079, 0x0000000000000005 +261 extract 6 2 0x01020304, 0x01050504, 0x00054861707079, 0x0005 +264 byte "Happy" 0x01020304, 0x01050504, 0x00054861707079, 0x0005, "Happy" +265 concat 0x01020304, 0x01050504, 0x00054861707079, 0x00054861707079 +266 == 0x01020304, 0x01050504, 1 +267 assert 0x01020304, 0x01050504 +268 uncover 1 0x01050504, 0x01020304 +270 callsub other_routine_2 0x01050504, 0x01020304 +422 proto 1 2 0x01050504, 0x01020304 +425 frame_dig -1 0x01050504, 0x01020304, 0x01020304 +427 frame_dig -1 0x01050504, 0x01020304, 0x01020304, 0x01020304 +429 int 0 0x01050504, 0x01020304, 0x01020304, 0x01020304, 0 +430 byte 0x0a 0x01050504, 0x01020304, 0x01020304, 0x01020304, 0, 0x0A +432 replace3 0x01050504, 0x01020304, 0x01020304, 0x0A020304 +433 dup 0x01050504, 0x01020304, 0x01020304, 0x0A020304, 0x0A020304 +434 frame_bury -1 0x01050504, 0x0A020304, 0x01020304, 0x0A020304 +436 retsub 0x01050504, 0x01020304, 0x0A020304 +273 pop 0x01050504, 0x01020304 +274 dup 0x01050504, 0x01020304, 0x01020304 +275 int 0 0x01050504, 0x01020304, 0x01020304, 0 +276 int 1 0x01050504, 0x01020304, 0x01020304, 0, 1 +277 * 0x01050504, 0x01020304, 0x01020304, 0 +278 int 1 0x01050504, 0x01020304, 0x01020304, 0, 1 +279 extract3 0x01050504, 0x01020304, 0x01 +280 byte 0x01 0x01050504, 0x01020304, 0x01, 0x01 +282 b== 0x01050504, 0x01020304, 1 +283 assert 0x01050504, 0x01020304 +284 callsub other_routine_2 0x01050504, 0x01020304 +422 proto 1 2 0x01050504, 0x01020304 +425 frame_dig -1 0x01050504, 0x01020304, 0x01020304 +427 frame_dig -1 0x01050504, 0x01020304, 0x01020304, 0x01020304 +429 int 0 0x01050504, 0x01020304, 0x01020304, 0x01020304, 0 +430 byte 0x0a 0x01050504, 0x01020304, 0x01020304, 0x01020304, 0, 0x0A +432 replace3 0x01050504, 0x01020304, 0x01020304, 0x0A020304 +433 dup 0x01050504, 0x01020304, 0x01020304, 0x0A020304, 0x0A020304 +434 frame_bury -1 0x01050504, 0x0A020304, 0x01020304, 0x0A020304 +436 retsub 0x01050504, 0x01020304, 0x0A020304 +287 cover 1 0x01050504, 0x0A020304, 0x01020304 +289 pop 0x01050504, 0x0A020304 +290 dup 0x01050504, 0x0A020304, 0x0A020304 +291 int 0 0x01050504, 0x0A020304, 0x0A020304, 0 +292 int 1 0x01050504, 0x0A020304, 0x0A020304, 0, 1 +293 * 0x01050504, 0x0A020304, 0x0A020304, 0 +294 int 1 0x01050504, 0x0A020304, 0x0A020304, 0, 1 +295 extract3 0x01050504, 0x0A020304, 0x0A +296 byte 0x0a 0x01050504, 0x0A020304, 0x0A, 0x0A +298 b== 0x01050504, 0x0A020304, 1 +299 assert 0x01050504, 0x0A020304 +300 dig 1 0x01050504, 0x0A020304, 0x01050504 +302 dig 1 0x01050504, 0x0A020304, 0x01050504, 0x0A020304 +304 cover 1 0x01050504, 0x0A020304, 0x0A020304, 0x01050504 +306 uncover 2 0x01050504, 0x0A020304, 0x01050504, 0x0A020304 +308 uncover 1 0x01050504, 0x0A020304, 0x0A020304, 0x01050504 +310 uncover 2 0x01050504, 0x0A020304, 0x01050504, 0x0A020304 +312 uncover 2 0x01050504, 0x01050504, 0x0A020304, 0x0A020304 +314 callsub other_routine_3 0x01050504, 0x01050504, 0x0A020304, 0x0A020304 +437 proto 3 3 0x01050504, 0x01050504, 0x0A020304, 0x0A020304 +440 byte "" 0x01050504, 0x01050504, 0x0A020304, 0x0A020304, 0x +441 dup 0x01050504, 0x01050504, 0x0A020304, 0x0A020304, 0x, 0x +442 int 0 0x01050504, 0x01050504, 0x0A020304, 0x0A020304, 0x, 0x, 0 +443 frame_bury 0 0x01050504, 0x01050504, 0x0A020304, 0x0A020304, 0, 0x +445 b other_routine_3_for_body@4 0x01050504, 0x01050504, 0x0A020304, 0x0A020304, 0, 0x +459 frame_dig 0 0x01050504, 0x01050504, 0x0A020304, 0x0A020304, 0, 0x, 0 +461 dup 0x01050504, 0x01050504, 0x0A020304, 0x0A020304, 0, 0x, 0, 0 +462 int 1 0x01050504, 0x01050504, 0x0A020304, 0x0A020304, 0, 0x, 0, 0, 1 +463 + 0x01050504, 0x01050504, 0x0A020304, 0x0A020304, 0, 0x, 0, 1 +464 frame_bury 1 0x01050504, 0x01050504, 0x0A020304, 0x0A020304, 0, 1, 0 +466 switch other_routine_3_for_header_1@2 other_routine_3_for_header_2@3 0x01050504, 0x01050504, 0x0A020304, 0x0A020304, 0, 1 +448 frame_dig 1 0x01050504, 0x01050504, 0x0A020304, 0x0A020304, 0, 1, 1 +450 frame_bury 0 0x01050504, 0x01050504, 0x0A020304, 0x0A020304, 1, 1 +452 b other_routine_3_for_body@4 0x01050504, 0x01050504, 0x0A020304, 0x0A020304, 1, 1 +459 frame_dig 0 0x01050504, 0x01050504, 0x0A020304, 0x0A020304, 1, 1, 1 +461 dup 0x01050504, 0x01050504, 0x0A020304, 0x0A020304, 1, 1, 1, 1 +462 int 1 0x01050504, 0x01050504, 0x0A020304, 0x0A020304, 1, 1, 1, 1, 1 +463 + 0x01050504, 0x01050504, 0x0A020304, 0x0A020304, 1, 1, 1, 2 +464 frame_bury 1 0x01050504, 0x01050504, 0x0A020304, 0x0A020304, 1, 2, 1 +466 switch other_routine_3_for_header_1@2 other_routine_3_for_header_2@3 0x01050504, 0x01050504, 0x0A020304, 0x0A020304, 1, 2 +455 frame_dig 1 0x01050504, 0x01050504, 0x0A020304, 0x0A020304, 1, 2, 2 +457 frame_bury 0 0x01050504, 0x01050504, 0x0A020304, 0x0A020304, 2, 2 +459 frame_dig 0 0x01050504, 0x01050504, 0x0A020304, 0x0A020304, 2, 2, 2 +461 dup 0x01050504, 0x01050504, 0x0A020304, 0x0A020304, 2, 2, 2, 2 +462 int 1 0x01050504, 0x01050504, 0x0A020304, 0x0A020304, 2, 2, 2, 2, 1 +463 + 0x01050504, 0x01050504, 0x0A020304, 0x0A020304, 2, 2, 2, 3 +464 frame_bury 1 0x01050504, 0x01050504, 0x0A020304, 0x0A020304, 2, 3, 2 +466 switch other_routine_3_for_header_1@2 other_routine_3_for_header_2@3 0x01050504, 0x01050504, 0x0A020304, 0x0A020304, 2, 3 +472 frame_dig -3 0x01050504, 0x01050504, 0x0A020304, 0x0A020304, 2, 3, 0x01050504 +474 int 0 0x01050504, 0x01050504, 0x0A020304, 0x0A020304, 2, 3, 0x01050504, 0 +475 byte 0x63 0x01050504, 0x01050504, 0x0A020304, 0x0A020304, 2, 3, 0x01050504, 0, "c" +477 replace3 0x01050504, 0x01050504, 0x0A020304, 0x0A020304, 2, 3, 0x63050504 +478 frame_bury -3 0x01050504, 0x63050504, 0x0A020304, 0x0A020304, 2, 3 +480 frame_dig -2 0x01050504, 0x63050504, 0x0A020304, 0x0A020304, 2, 3, 0x0A020304 +482 int 0 0x01050504, 0x63050504, 0x0A020304, 0x0A020304, 2, 3, 0x0A020304, 0 +483 byte 0x63 0x01050504, 0x63050504, 0x0A020304, 0x0A020304, 2, 3, 0x0A020304, 0, "c" +485 replace3 0x01050504, 0x63050504, 0x0A020304, 0x0A020304, 2, 3, 0x63020304 +486 frame_bury -2 0x01050504, 0x63050504, 0x63020304, 0x0A020304, 2, 3 +488 frame_dig -1 0x01050504, 0x63050504, 0x63020304, 0x0A020304, 2, 3, 0x0A020304 +490 int 0 0x01050504, 0x63050504, 0x63020304, 0x0A020304, 2, 3, 0x0A020304, 0 +491 byte 0x63 0x01050504, 0x63050504, 0x63020304, 0x0A020304, 2, 3, 0x0A020304, 0, "c" +493 replace3 0x01050504, 0x63050504, 0x63020304, 0x0A020304, 2, 3, 0x63020304 +494 frame_bury -1 0x01050504, 0x63050504, 0x63020304, 0x63020304, 2, 3 +496 frame_dig -3 0x01050504, 0x63050504, 0x63020304, 0x63020304, 2, 3, 0x63050504 +498 frame_dig -2 0x01050504, 0x63050504, 0x63020304, 0x63020304, 2, 3, 0x63050504, 0x63020304 +500 frame_dig -1 0x01050504, 0x63050504, 0x63020304, 0x63020304, 2, 3, 0x63050504, 0x63020304, 0x63020304 +502 uncover 4 0x01050504, 0x63050504, 0x63020304, 0x63020304, 3, 0x63050504, 0x63020304, 0x63020304, 2 +504 uncover 4 0x01050504, 0x63050504, 0x63020304, 0x63020304, 0x63050504, 0x63020304, 0x63020304, 2, 3 +506 retsub 0x01050504, 0x63050504, 0x63020304, 0x63020304 +317 pop 0x01050504, 0x63050504, 0x63020304 +318 pop 0x01050504, 0x63050504 +319 pop 0x01050504 +320 byte 0x 0x01050504, 0x +321 uncover 1 0x, 0x01050504 +323 concat 0x01050504 +324 int 0 0x01050504, 0 +325 int 4 0x01050504, 0, 4 +326 extract3 0x01050504 +327 callsub other_routine_2 0x01050504 +422 proto 1 2 0x01050504 +425 frame_dig -1 0x01050504, 0x01050504 +427 frame_dig -1 0x01050504, 0x01050504, 0x01050504 +429 int 0 0x01050504, 0x01050504, 0x01050504, 0 +430 byte 0x0a 0x01050504, 0x01050504, 0x01050504, 0, 0x0A +432 replace3 0x01050504, 0x01050504, 0x0A050504 +433 dup 0x01050504, 0x01050504, 0x0A050504, 0x0A050504 +434 frame_bury -1 0x0A050504, 0x01050504, 0x0A050504 +436 retsub 0x01050504, 0x0A050504 +330 pop 0x01050504 +331 pop +332 retsub +45 int 1 1 +46 return 1 \ No newline at end of file diff --git a/test_cases/arc4_types/out/mutable_params.O1.log b/test_cases/arc4_types/out/mutable_params.O1.log index 33ada51f09..b8cd842e4f 100644 --- a/test_cases/arc4_types/out/mutable_params.O1.log +++ b/test_cases/arc4_types/out/mutable_params.O1.log @@ -1,177 +1,221 @@ -PC Teal Stack -1 -7 -48 callsub mutating_copies -53 proto 0 0 -56 byte 0x01020304 0x01020304 -57 byte 0x05 0x01020304, 0x05 -58 replace2 2 0x01020504 -60 dup 0x01020504, 0x01020504 -61 extract 2 1 0x01020504, 0x05 -64 byte 0x05 0x01020504, 0x05, 0x05 -65 b== 0x01020504, 1 -66 assert 0x01020504 -67 byte 0x80320006000d00054861707079000444617973 0x01020504, 0x80320006000D00054861707079000444617973 -68 callsub other_routine 0x01020504, 0x80320006000D00054861707079000444617973 -147 proto 2 4 0x01020504, 0x80320006000D00054861707079000444617973 -150 frame_dig -2 0x01020504, 0x80320006000D00054861707079000444617973, 0x01020504 -152 byte 0x05 0x01020504, 0x80320006000D00054861707079000444617973, 0x01020504, 0x05 -153 replace2 1 0x01020504, 0x80320006000D00054861707079000444617973, 0x01050504 -155 frame_bury -2 0x01050504, 0x80320006000D00054861707079000444617973 -157 frame_dig -1 0x01050504, 0x80320006000D00054861707079000444617973, 0x80320006000D00054861707079000444617973 -159 int 2 0x01050504, 0x80320006000D00054861707079000444617973, 0x80320006000D00054861707079000444617973, 2 -160 extract_uint16 0x01050504, 0x80320006000D00054861707079000444617973, 6 -161 frame_dig -1 0x01050504, 0x80320006000D00054861707079000444617973, 6, 0x80320006000D00054861707079000444617973 -163 int 0 0x01050504, 0x80320006000D00054861707079000444617973, 6, 0x80320006000D00054861707079000444617973, 0 -164 dig 2 0x01050504, 0x80320006000D00054861707079000444617973, 6, 0x80320006000D00054861707079000444617973, 0, 6 -166 extract3 0x01050504, 0x80320006000D00054861707079000444617973, 6, 0x80320006000D -167 frame_dig -1 0x01050504, 0x80320006000D00054861707079000444617973, 6, 0x80320006000D, 0x80320006000D00054861707079000444617973 -169 int 4 0x01050504, 0x80320006000D00054861707079000444617973, 6, 0x80320006000D, 0x80320006000D00054861707079000444617973, 4 -170 extract_uint16 0x01050504, 0x80320006000D00054861707079000444617973, 6, 0x80320006000D, 13 -171 frame_dig -1 0x01050504, 0x80320006000D00054861707079000444617973, 6, 0x80320006000D, 13, 0x80320006000D00054861707079000444617973 -173 len 0x01050504, 0x80320006000D00054861707079000444617973, 6, 0x80320006000D, 13, 19 -174 frame_dig -1 0x01050504, 0x80320006000D00054861707079000444617973, 6, 0x80320006000D, 13, 19, 0x80320006000D00054861707079000444617973 -176 dig 2 0x01050504, 0x80320006000D00054861707079000444617973, 6, 0x80320006000D, 13, 19, 0x80320006000D00054861707079000444617973, 13 -178 uncover 2 0x01050504, 0x80320006000D00054861707079000444617973, 6, 0x80320006000D, 13, 0x80320006000D00054861707079000444617973, 13, 19 -180 substring3 0x01050504, 0x80320006000D00054861707079000444617973, 6, 0x80320006000D, 13, 0x000444617973 -181 uncover 2 0x01050504, 0x80320006000D00054861707079000444617973, 6, 13, 0x000444617973, 0x80320006000D -183 byte 0x000741415252474821 0x01050504, 0x80320006000D00054861707079000444617973, 6, 13, 0x000444617973, 0x80320006000D, 0x000741415252474821 -184 concat 0x01050504, 0x80320006000D00054861707079000444617973, 6, 13, 0x000444617973, 0x80320006000D000741415252474821 -185 swap 0x01050504, 0x80320006000D00054861707079000444617973, 6, 13, 0x80320006000D000741415252474821, 0x000444617973 -186 concat 0x01050504, 0x80320006000D00054861707079000444617973, 6, 13, 0x80320006000D000741415252474821000444617973 -187 swap 0x01050504, 0x80320006000D00054861707079000444617973, 6, 0x80320006000D000741415252474821000444617973, 13 -188 uncover 2 0x01050504, 0x80320006000D00054861707079000444617973, 0x80320006000D000741415252474821000444617973, 13, 6 -190 - 0x01050504, 0x80320006000D00054861707079000444617973, 0x80320006000D000741415252474821000444617973, 7 -191 swap 0x01050504, 0x80320006000D00054861707079000444617973, 7, 0x80320006000D000741415252474821000444617973 -192 dup 0x01050504, 0x80320006000D00054861707079000444617973, 7, 0x80320006000D000741415252474821000444617973, 0x80320006000D000741415252474821000444617973 -193 int 4 0x01050504, 0x80320006000D00054861707079000444617973, 7, 0x80320006000D000741415252474821000444617973, 0x80320006000D000741415252474821000444617973, 4 -194 extract_uint16 0x01050504, 0x80320006000D00054861707079000444617973, 7, 0x80320006000D000741415252474821000444617973, 13 -195 int 9 0x01050504, 0x80320006000D00054861707079000444617973, 7, 0x80320006000D000741415252474821000444617973, 13, 9 -197 + 0x01050504, 0x80320006000D00054861707079000444617973, 7, 0x80320006000D000741415252474821000444617973, 22 -198 uncover 2 0x01050504, 0x80320006000D00054861707079000444617973, 0x80320006000D000741415252474821000444617973, 22, 7 -200 - 0x01050504, 0x80320006000D00054861707079000444617973, 0x80320006000D000741415252474821000444617973, 15 -201 itob 0x01050504, 0x80320006000D00054861707079000444617973, 0x80320006000D000741415252474821000444617973, 0x000000000000000F -202 extract 6 2 0x01050504, 0x80320006000D00054861707079000444617973, 0x80320006000D000741415252474821000444617973, 0x000F -205 replace2 4 0x01050504, 0x80320006000D00054861707079000444617973, 0x80320006000F000741415252474821000444617973 -207 frame_bury -1 0x01050504, 0x80320006000F000741415252474821000444617973 -209 int 1 0x01050504, 0x80320006000F000741415252474821000444617973, 1 -210 int 0 0x01050504, 0x80320006000F000741415252474821000444617973, 1, 0 -211 frame_dig -2 0x01050504, 0x80320006000F000741415252474821000444617973, 1, 0, 0x01050504 -213 frame_dig -1 0x01050504, 0x80320006000F000741415252474821000444617973, 1, 0, 0x01050504, 0x80320006000F000741415252474821000444617973 -215 retsub 1, 0, 0x01050504, 0x80320006000F000741415252474821000444617973 -71 cover 3 0x80320006000F000741415252474821000444617973, 1, 0, 0x01050504 -73 cover 2 0x80320006000F000741415252474821000444617973, 0x01050504, 1, 0 -75 swap 0x80320006000F000741415252474821000444617973, 0x01050504, 0, 1 -76 assert 0x80320006000F000741415252474821000444617973, 0x01050504, 0 -77 ! 0x80320006000F000741415252474821000444617973, 0x01050504, 1 -78 assert 0x80320006000F000741415252474821000444617973, 0x01050504 -79 dup 0x80320006000F000741415252474821000444617973, 0x01050504, 0x01050504 -80 extract 1 1 0x80320006000F000741415252474821000444617973, 0x01050504, 0x05 -83 byte 0x05 0x80320006000F000741415252474821000444617973, 0x01050504, 0x05, 0x05 -84 b== 0x80320006000F000741415252474821000444617973, 0x01050504, 1 -85 assert 0x80320006000F000741415252474821000444617973, 0x01050504 -86 dig 1 0x80320006000F000741415252474821000444617973, 0x01050504, 0x80320006000F000741415252474821000444617973 -88 int 2 0x80320006000F000741415252474821000444617973, 0x01050504, 0x80320006000F000741415252474821000444617973, 2 -89 extract_uint16 0x80320006000F000741415252474821000444617973, 0x01050504, 6 -90 swap 0x80320006000F000741415252474821000444617973, 6, 0x01050504 -91 dig 2 0x80320006000F000741415252474821000444617973, 6, 0x01050504, 0x80320006000F000741415252474821000444617973 -93 int 4 0x80320006000F000741415252474821000444617973, 6, 0x01050504, 0x80320006000F000741415252474821000444617973, 4 -94 extract_uint16 0x80320006000F000741415252474821000444617973, 6, 0x01050504, 15 -95 uncover 3 6, 0x01050504, 15, 0x80320006000F000741415252474821000444617973 -97 uncover 3 0x01050504, 15, 0x80320006000F000741415252474821000444617973, 6 -99 uncover 2 0x01050504, 0x80320006000F000741415252474821000444617973, 6, 15 -101 substring3 0x01050504, 0x000741415252474821 -102 byte 0x000741415252474821 0x01050504, 0x000741415252474821, 0x000741415252474821 -103 == 0x01050504, 1 -104 assert 0x01050504 -105 byte 0x01020304 0x01050504, 0x01020304 -106 byte 0x80320006000d00054861707079000444617973 0x01050504, 0x01020304, 0x80320006000D00054861707079000444617973 -107 callsub other_routine 0x01050504, 0x01020304, 0x80320006000D00054861707079000444617973 -147 proto 2 4 0x01050504, 0x01020304, 0x80320006000D00054861707079000444617973 -150 frame_dig -2 0x01050504, 0x01020304, 0x80320006000D00054861707079000444617973, 0x01020304 -152 byte 0x05 0x01050504, 0x01020304, 0x80320006000D00054861707079000444617973, 0x01020304, 0x05 -153 replace2 1 0x01050504, 0x01020304, 0x80320006000D00054861707079000444617973, 0x01050304 -155 frame_bury -2 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973 -157 frame_dig -1 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973, 0x80320006000D00054861707079000444617973 -159 int 2 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973, 0x80320006000D00054861707079000444617973, 2 -160 extract_uint16 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973, 6 -161 frame_dig -1 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973, 6, 0x80320006000D00054861707079000444617973 -163 int 0 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973, 6, 0x80320006000D00054861707079000444617973, 0 -164 dig 2 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973, 6, 0x80320006000D00054861707079000444617973, 0, 6 -166 extract3 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973, 6, 0x80320006000D -167 frame_dig -1 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973, 6, 0x80320006000D, 0x80320006000D00054861707079000444617973 -169 int 4 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973, 6, 0x80320006000D, 0x80320006000D00054861707079000444617973, 4 -170 extract_uint16 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973, 6, 0x80320006000D, 13 -171 frame_dig -1 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973, 6, 0x80320006000D, 13, 0x80320006000D00054861707079000444617973 -173 len 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973, 6, 0x80320006000D, 13, 19 -174 frame_dig -1 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973, 6, 0x80320006000D, 13, 19, 0x80320006000D00054861707079000444617973 -176 dig 2 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973, 6, 0x80320006000D, 13, 19, 0x80320006000D00054861707079000444617973, 13 -178 uncover 2 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973, 6, 0x80320006000D, 13, 0x80320006000D00054861707079000444617973, 13, 19 -180 substring3 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973, 6, 0x80320006000D, 13, 0x000444617973 -181 uncover 2 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973, 6, 13, 0x000444617973, 0x80320006000D -183 byte 0x000741415252474821 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973, 6, 13, 0x000444617973, 0x80320006000D, 0x000741415252474821 -184 concat 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973, 6, 13, 0x000444617973, 0x80320006000D000741415252474821 -185 swap 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973, 6, 13, 0x80320006000D000741415252474821, 0x000444617973 -186 concat 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973, 6, 13, 0x80320006000D000741415252474821000444617973 -187 swap 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973, 6, 0x80320006000D000741415252474821000444617973, 13 -188 uncover 2 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973, 0x80320006000D000741415252474821000444617973, 13, 6 -190 - 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973, 0x80320006000D000741415252474821000444617973, 7 -191 swap 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973, 7, 0x80320006000D000741415252474821000444617973 -192 dup 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973, 7, 0x80320006000D000741415252474821000444617973, 0x80320006000D000741415252474821000444617973 -193 int 4 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973, 7, 0x80320006000D000741415252474821000444617973, 0x80320006000D000741415252474821000444617973, 4 -194 extract_uint16 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973, 7, 0x80320006000D000741415252474821000444617973, 13 -195 int 9 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973, 7, 0x80320006000D000741415252474821000444617973, 13, 9 -197 + 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973, 7, 0x80320006000D000741415252474821000444617973, 22 -198 uncover 2 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973, 0x80320006000D000741415252474821000444617973, 22, 7 -200 - 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973, 0x80320006000D000741415252474821000444617973, 15 -201 itob 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973, 0x80320006000D000741415252474821000444617973, 0x000000000000000F -202 extract 6 2 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973, 0x80320006000D000741415252474821000444617973, 0x000F -205 replace2 4 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973, 0x80320006000F000741415252474821000444617973 -207 frame_bury -1 0x01050504, 0x01050304, 0x80320006000F000741415252474821000444617973 -209 int 1 0x01050504, 0x01050304, 0x80320006000F000741415252474821000444617973, 1 -210 int 0 0x01050504, 0x01050304, 0x80320006000F000741415252474821000444617973, 1, 0 -211 frame_dig -2 0x01050504, 0x01050304, 0x80320006000F000741415252474821000444617973, 1, 0, 0x01050304 -213 frame_dig -1 0x01050504, 0x01050304, 0x80320006000F000741415252474821000444617973, 1, 0, 0x01050304, 0x80320006000F000741415252474821000444617973 -215 retsub 0x01050504, 1, 0, 0x01050304, 0x80320006000F000741415252474821000444617973 -110 popn 4 0x01050504 -112 byte 0x01020304 0x01050504, 0x01020304 -113 callsub other_routine_2 0x01050504, 0x01020304 -216 proto 1 2 0x01050504, 0x01020304 -219 frame_dig -1 0x01050504, 0x01020304, 0x01020304 -221 byte 0x0a 0x01050504, 0x01020304, 0x01020304, 0x0A -223 replace2 0 0x01050504, 0x01020304, 0x0A020304 -225 frame_dig -1 0x01050504, 0x01020304, 0x0A020304, 0x01020304 -227 swap 0x01050504, 0x01020304, 0x01020304, 0x0A020304 -228 retsub 0x01050504, 0x01020304, 0x0A020304 -116 pop 0x01050504, 0x01020304 -117 dup 0x01050504, 0x01020304, 0x01020304 -118 extract 0 1 0x01050504, 0x01020304, 0x01 -121 byte 0x01 0x01050504, 0x01020304, 0x01, 0x01 -124 b== 0x01050504, 0x01020304, 1 -125 assert 0x01050504, 0x01020304 -126 callsub other_routine_2 0x01050504, 0x01020304 -216 proto 1 2 0x01050504, 0x01020304 -219 frame_dig -1 0x01050504, 0x01020304, 0x01020304 -221 byte 0x0a 0x01050504, 0x01020304, 0x01020304, 0x0A -223 replace2 0 0x01050504, 0x01020304, 0x0A020304 -225 frame_dig -1 0x01050504, 0x01020304, 0x0A020304, 0x01020304 -227 swap 0x01050504, 0x01020304, 0x01020304, 0x0A020304 -228 retsub 0x01050504, 0x01020304, 0x0A020304 -129 bury 1 0x01050504, 0x0A020304 -131 extract 0 1 0x01050504, 0x0A -134 byte 0x0a 0x01050504, 0x0A, 0x0A -136 b== 0x01050504, 1 -137 assert 0x01050504 -138 extract 0 4 0x01050504 -141 callsub other_routine_2 0x01050504 -216 proto 1 2 0x01050504 -219 frame_dig -1 0x01050504, 0x01050504 -221 byte 0x0a 0x01050504, 0x01050504, 0x0A -223 replace2 0 0x01050504, 0x0A050504 -225 frame_dig -1 0x01050504, 0x0A050504, 0x01050504 -227 swap 0x01050504, 0x01050504, 0x0A050504 -228 retsub 0x01050504, 0x0A050504 -144 popn 2 -146 retsub -51 int 1 1 -52 return 1 \ No newline at end of file +PC Teal Stack +1 +7 +50 callsub mutating_copies +55 proto 0 0 +58 byte 0x01020304 0x01020304 +59 byte 0x05 0x01020304, 0x05 +60 replace2 2 0x01020504 +62 dup 0x01020504, 0x01020504 +63 extract 2 1 0x01020504, 0x05 +66 byte 0x05 0x01020504, 0x05, 0x05 +67 b== 0x01020504, 1 +68 assert 0x01020504 +69 byte 0x80320006000d00054861707079000444617973 0x01020504, 0x80320006000D00054861707079000444617973 +70 callsub other_routine 0x01020504, 0x80320006000D00054861707079000444617973 +159 proto 2 4 0x01020504, 0x80320006000D00054861707079000444617973 +162 frame_dig -2 0x01020504, 0x80320006000D00054861707079000444617973, 0x01020504 +164 byte 0x05 0x01020504, 0x80320006000D00054861707079000444617973, 0x01020504, 0x05 +165 replace2 1 0x01020504, 0x80320006000D00054861707079000444617973, 0x01050504 +167 frame_bury -2 0x01050504, 0x80320006000D00054861707079000444617973 +169 frame_dig -1 0x01050504, 0x80320006000D00054861707079000444617973, 0x80320006000D00054861707079000444617973 +171 int 2 0x01050504, 0x80320006000D00054861707079000444617973, 0x80320006000D00054861707079000444617973, 2 +172 extract_uint16 0x01050504, 0x80320006000D00054861707079000444617973, 6 +173 frame_dig -1 0x01050504, 0x80320006000D00054861707079000444617973, 6, 0x80320006000D00054861707079000444617973 +175 int 0 0x01050504, 0x80320006000D00054861707079000444617973, 6, 0x80320006000D00054861707079000444617973, 0 +176 dig 2 0x01050504, 0x80320006000D00054861707079000444617973, 6, 0x80320006000D00054861707079000444617973, 0, 6 +178 extract3 0x01050504, 0x80320006000D00054861707079000444617973, 6, 0x80320006000D +179 frame_dig -1 0x01050504, 0x80320006000D00054861707079000444617973, 6, 0x80320006000D, 0x80320006000D00054861707079000444617973 +181 int 4 0x01050504, 0x80320006000D00054861707079000444617973, 6, 0x80320006000D, 0x80320006000D00054861707079000444617973, 4 +182 extract_uint16 0x01050504, 0x80320006000D00054861707079000444617973, 6, 0x80320006000D, 13 +183 frame_dig -1 0x01050504, 0x80320006000D00054861707079000444617973, 6, 0x80320006000D, 13, 0x80320006000D00054861707079000444617973 +185 len 0x01050504, 0x80320006000D00054861707079000444617973, 6, 0x80320006000D, 13, 19 +186 frame_dig -1 0x01050504, 0x80320006000D00054861707079000444617973, 6, 0x80320006000D, 13, 19, 0x80320006000D00054861707079000444617973 +188 dig 2 0x01050504, 0x80320006000D00054861707079000444617973, 6, 0x80320006000D, 13, 19, 0x80320006000D00054861707079000444617973, 13 +190 uncover 2 0x01050504, 0x80320006000D00054861707079000444617973, 6, 0x80320006000D, 13, 0x80320006000D00054861707079000444617973, 13, 19 +192 substring3 0x01050504, 0x80320006000D00054861707079000444617973, 6, 0x80320006000D, 13, 0x000444617973 +193 uncover 2 0x01050504, 0x80320006000D00054861707079000444617973, 6, 13, 0x000444617973, 0x80320006000D +195 byte 0x000741415252474821 0x01050504, 0x80320006000D00054861707079000444617973, 6, 13, 0x000444617973, 0x80320006000D, 0x000741415252474821 +197 concat 0x01050504, 0x80320006000D00054861707079000444617973, 6, 13, 0x000444617973, 0x80320006000D000741415252474821 +198 swap 0x01050504, 0x80320006000D00054861707079000444617973, 6, 13, 0x80320006000D000741415252474821, 0x000444617973 +199 concat 0x01050504, 0x80320006000D00054861707079000444617973, 6, 13, 0x80320006000D000741415252474821000444617973 +200 swap 0x01050504, 0x80320006000D00054861707079000444617973, 6, 0x80320006000D000741415252474821000444617973, 13 +201 uncover 2 0x01050504, 0x80320006000D00054861707079000444617973, 0x80320006000D000741415252474821000444617973, 13, 6 +203 - 0x01050504, 0x80320006000D00054861707079000444617973, 0x80320006000D000741415252474821000444617973, 7 +204 swap 0x01050504, 0x80320006000D00054861707079000444617973, 7, 0x80320006000D000741415252474821000444617973 +205 dup 0x01050504, 0x80320006000D00054861707079000444617973, 7, 0x80320006000D000741415252474821000444617973, 0x80320006000D000741415252474821000444617973 +206 int 4 0x01050504, 0x80320006000D00054861707079000444617973, 7, 0x80320006000D000741415252474821000444617973, 0x80320006000D000741415252474821000444617973, 4 +207 extract_uint16 0x01050504, 0x80320006000D00054861707079000444617973, 7, 0x80320006000D000741415252474821000444617973, 13 +208 int 9 0x01050504, 0x80320006000D00054861707079000444617973, 7, 0x80320006000D000741415252474821000444617973, 13, 9 +210 + 0x01050504, 0x80320006000D00054861707079000444617973, 7, 0x80320006000D000741415252474821000444617973, 22 +211 uncover 2 0x01050504, 0x80320006000D00054861707079000444617973, 0x80320006000D000741415252474821000444617973, 22, 7 +213 - 0x01050504, 0x80320006000D00054861707079000444617973, 0x80320006000D000741415252474821000444617973, 15 +214 itob 0x01050504, 0x80320006000D00054861707079000444617973, 0x80320006000D000741415252474821000444617973, 0x000000000000000F +215 extract 6 2 0x01050504, 0x80320006000D00054861707079000444617973, 0x80320006000D000741415252474821000444617973, 0x000F +218 replace2 4 0x01050504, 0x80320006000D00054861707079000444617973, 0x80320006000F000741415252474821000444617973 +220 frame_bury -1 0x01050504, 0x80320006000F000741415252474821000444617973 +222 int 1 0x01050504, 0x80320006000F000741415252474821000444617973, 1 +223 int 0 0x01050504, 0x80320006000F000741415252474821000444617973, 1, 0 +224 frame_dig -2 0x01050504, 0x80320006000F000741415252474821000444617973, 1, 0, 0x01050504 +226 frame_dig -1 0x01050504, 0x80320006000F000741415252474821000444617973, 1, 0, 0x01050504, 0x80320006000F000741415252474821000444617973 +228 retsub 1, 0, 0x01050504, 0x80320006000F000741415252474821000444617973 +73 cover 3 0x80320006000F000741415252474821000444617973, 1, 0, 0x01050504 +75 cover 2 0x80320006000F000741415252474821000444617973, 0x01050504, 1, 0 +77 swap 0x80320006000F000741415252474821000444617973, 0x01050504, 0, 1 +78 assert 0x80320006000F000741415252474821000444617973, 0x01050504, 0 +79 ! 0x80320006000F000741415252474821000444617973, 0x01050504, 1 +80 assert 0x80320006000F000741415252474821000444617973, 0x01050504 +81 dup 0x80320006000F000741415252474821000444617973, 0x01050504, 0x01050504 +82 extract 1 1 0x80320006000F000741415252474821000444617973, 0x01050504, 0x05 +85 byte 0x05 0x80320006000F000741415252474821000444617973, 0x01050504, 0x05, 0x05 +86 b== 0x80320006000F000741415252474821000444617973, 0x01050504, 1 +87 assert 0x80320006000F000741415252474821000444617973, 0x01050504 +88 dig 1 0x80320006000F000741415252474821000444617973, 0x01050504, 0x80320006000F000741415252474821000444617973 +90 int 2 0x80320006000F000741415252474821000444617973, 0x01050504, 0x80320006000F000741415252474821000444617973, 2 +91 extract_uint16 0x80320006000F000741415252474821000444617973, 0x01050504, 6 +92 swap 0x80320006000F000741415252474821000444617973, 6, 0x01050504 +93 dig 2 0x80320006000F000741415252474821000444617973, 6, 0x01050504, 0x80320006000F000741415252474821000444617973 +95 int 4 0x80320006000F000741415252474821000444617973, 6, 0x01050504, 0x80320006000F000741415252474821000444617973, 4 +96 extract_uint16 0x80320006000F000741415252474821000444617973, 6, 0x01050504, 15 +97 uncover 3 6, 0x01050504, 15, 0x80320006000F000741415252474821000444617973 +99 uncover 3 0x01050504, 15, 0x80320006000F000741415252474821000444617973, 6 +101 uncover 2 0x01050504, 0x80320006000F000741415252474821000444617973, 6, 15 +103 substring3 0x01050504, 0x000741415252474821 +104 byte 0x000741415252474821 0x01050504, 0x000741415252474821, 0x000741415252474821 +106 == 0x01050504, 1 +107 assert 0x01050504 +108 byte 0x01020304 0x01050504, 0x01020304 +109 byte 0x80320006000d00054861707079000444617973 0x01050504, 0x01020304, 0x80320006000D00054861707079000444617973 +110 callsub other_routine 0x01050504, 0x01020304, 0x80320006000D00054861707079000444617973 +159 proto 2 4 0x01050504, 0x01020304, 0x80320006000D00054861707079000444617973 +162 frame_dig -2 0x01050504, 0x01020304, 0x80320006000D00054861707079000444617973, 0x01020304 +164 byte 0x05 0x01050504, 0x01020304, 0x80320006000D00054861707079000444617973, 0x01020304, 0x05 +165 replace2 1 0x01050504, 0x01020304, 0x80320006000D00054861707079000444617973, 0x01050304 +167 frame_bury -2 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973 +169 frame_dig -1 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973, 0x80320006000D00054861707079000444617973 +171 int 2 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973, 0x80320006000D00054861707079000444617973, 2 +172 extract_uint16 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973, 6 +173 frame_dig -1 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973, 6, 0x80320006000D00054861707079000444617973 +175 int 0 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973, 6, 0x80320006000D00054861707079000444617973, 0 +176 dig 2 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973, 6, 0x80320006000D00054861707079000444617973, 0, 6 +178 extract3 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973, 6, 0x80320006000D +179 frame_dig -1 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973, 6, 0x80320006000D, 0x80320006000D00054861707079000444617973 +181 int 4 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973, 6, 0x80320006000D, 0x80320006000D00054861707079000444617973, 4 +182 extract_uint16 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973, 6, 0x80320006000D, 13 +183 frame_dig -1 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973, 6, 0x80320006000D, 13, 0x80320006000D00054861707079000444617973 +185 len 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973, 6, 0x80320006000D, 13, 19 +186 frame_dig -1 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973, 6, 0x80320006000D, 13, 19, 0x80320006000D00054861707079000444617973 +188 dig 2 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973, 6, 0x80320006000D, 13, 19, 0x80320006000D00054861707079000444617973, 13 +190 uncover 2 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973, 6, 0x80320006000D, 13, 0x80320006000D00054861707079000444617973, 13, 19 +192 substring3 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973, 6, 0x80320006000D, 13, 0x000444617973 +193 uncover 2 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973, 6, 13, 0x000444617973, 0x80320006000D +195 byte 0x000741415252474821 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973, 6, 13, 0x000444617973, 0x80320006000D, 0x000741415252474821 +197 concat 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973, 6, 13, 0x000444617973, 0x80320006000D000741415252474821 +198 swap 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973, 6, 13, 0x80320006000D000741415252474821, 0x000444617973 +199 concat 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973, 6, 13, 0x80320006000D000741415252474821000444617973 +200 swap 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973, 6, 0x80320006000D000741415252474821000444617973, 13 +201 uncover 2 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973, 0x80320006000D000741415252474821000444617973, 13, 6 +203 - 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973, 0x80320006000D000741415252474821000444617973, 7 +204 swap 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973, 7, 0x80320006000D000741415252474821000444617973 +205 dup 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973, 7, 0x80320006000D000741415252474821000444617973, 0x80320006000D000741415252474821000444617973 +206 int 4 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973, 7, 0x80320006000D000741415252474821000444617973, 0x80320006000D000741415252474821000444617973, 4 +207 extract_uint16 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973, 7, 0x80320006000D000741415252474821000444617973, 13 +208 int 9 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973, 7, 0x80320006000D000741415252474821000444617973, 13, 9 +210 + 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973, 7, 0x80320006000D000741415252474821000444617973, 22 +211 uncover 2 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973, 0x80320006000D000741415252474821000444617973, 22, 7 +213 - 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973, 0x80320006000D000741415252474821000444617973, 15 +214 itob 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973, 0x80320006000D000741415252474821000444617973, 0x000000000000000F +215 extract 6 2 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973, 0x80320006000D000741415252474821000444617973, 0x000F +218 replace2 4 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973, 0x80320006000F000741415252474821000444617973 +220 frame_bury -1 0x01050504, 0x01050304, 0x80320006000F000741415252474821000444617973 +222 int 1 0x01050504, 0x01050304, 0x80320006000F000741415252474821000444617973, 1 +223 int 0 0x01050504, 0x01050304, 0x80320006000F000741415252474821000444617973, 1, 0 +224 frame_dig -2 0x01050504, 0x01050304, 0x80320006000F000741415252474821000444617973, 1, 0, 0x01050304 +226 frame_dig -1 0x01050504, 0x01050304, 0x80320006000F000741415252474821000444617973, 1, 0, 0x01050304, 0x80320006000F000741415252474821000444617973 +228 retsub 0x01050504, 1, 0, 0x01050304, 0x80320006000F000741415252474821000444617973 +113 popn 4 0x01050504 +115 byte 0x01020304 0x01050504, 0x01020304 +116 callsub other_routine_2 0x01050504, 0x01020304 +229 proto 1 2 0x01050504, 0x01020304 +232 frame_dig -1 0x01050504, 0x01020304, 0x01020304 +234 byte 0x0a 0x01050504, 0x01020304, 0x01020304, 0x0A +236 replace2 0 0x01050504, 0x01020304, 0x0A020304 +238 frame_dig -1 0x01050504, 0x01020304, 0x0A020304, 0x01020304 +240 swap 0x01050504, 0x01020304, 0x01020304, 0x0A020304 +241 retsub 0x01050504, 0x01020304, 0x0A020304 +119 pop 0x01050504, 0x01020304 +120 dup 0x01050504, 0x01020304, 0x01020304 +121 extract 0 1 0x01050504, 0x01020304, 0x01 +124 byte 0x01 0x01050504, 0x01020304, 0x01, 0x01 +127 b== 0x01050504, 0x01020304, 1 +128 assert 0x01050504, 0x01020304 +129 callsub other_routine_2 0x01050504, 0x01020304 +229 proto 1 2 0x01050504, 0x01020304 +232 frame_dig -1 0x01050504, 0x01020304, 0x01020304 +234 byte 0x0a 0x01050504, 0x01020304, 0x01020304, 0x0A +236 replace2 0 0x01050504, 0x01020304, 0x0A020304 +238 frame_dig -1 0x01050504, 0x01020304, 0x0A020304, 0x01020304 +240 swap 0x01050504, 0x01020304, 0x01020304, 0x0A020304 +241 retsub 0x01050504, 0x01020304, 0x0A020304 +132 bury 1 0x01050504, 0x0A020304 +134 dup 0x01050504, 0x0A020304, 0x0A020304 +135 extract 0 1 0x01050504, 0x0A020304, 0x0A +138 byte 0x0a 0x01050504, 0x0A020304, 0x0A, 0x0A +140 b== 0x01050504, 0x0A020304, 1 +141 assert 0x01050504, 0x0A020304 +142 dup2 0x01050504, 0x0A020304, 0x01050504, 0x0A020304 +143 uncover 2 0x01050504, 0x01050504, 0x0A020304, 0x0A020304 +145 callsub other_routine_3 0x01050504, 0x01050504, 0x0A020304, 0x0A020304 +242 proto 3 3 0x01050504, 0x01050504, 0x0A020304, 0x0A020304 +245 byte "" 0x01050504, 0x01050504, 0x0A020304, 0x0A020304, 0x +247 int 0 0x01050504, 0x01050504, 0x0A020304, 0x0A020304, 0x, 0 +248 b other_routine_3_for_body@4 0x01050504, 0x01050504, 0x0A020304, 0x0A020304, 0x, 0 +258 dup 0x01050504, 0x01050504, 0x0A020304, 0x0A020304, 0x, 0, 0 +259 int 1 0x01050504, 0x01050504, 0x0A020304, 0x0A020304, 0x, 0, 0, 1 +260 + 0x01050504, 0x01050504, 0x0A020304, 0x0A020304, 0x, 0, 1 +261 frame_bury 0 0x01050504, 0x01050504, 0x0A020304, 0x0A020304, 1, 0 +263 switch other_routine_3_for_header_1@2 other_routine_3_for_header_2@3 0x01050504, 0x01050504, 0x0A020304, 0x0A020304, 1 +251 frame_dig 0 0x01050504, 0x01050504, 0x0A020304, 0x0A020304, 1, 1 +253 b other_routine_3_for_body@4 0x01050504, 0x01050504, 0x0A020304, 0x0A020304, 1, 1 +258 dup 0x01050504, 0x01050504, 0x0A020304, 0x0A020304, 1, 1, 1 +259 int 1 0x01050504, 0x01050504, 0x0A020304, 0x0A020304, 1, 1, 1, 1 +260 + 0x01050504, 0x01050504, 0x0A020304, 0x0A020304, 1, 1, 2 +261 frame_bury 0 0x01050504, 0x01050504, 0x0A020304, 0x0A020304, 2, 1 +263 switch other_routine_3_for_header_1@2 other_routine_3_for_header_2@3 0x01050504, 0x01050504, 0x0A020304, 0x0A020304, 2 +256 frame_dig 0 0x01050504, 0x01050504, 0x0A020304, 0x0A020304, 2, 2 +258 dup 0x01050504, 0x01050504, 0x0A020304, 0x0A020304, 2, 2, 2 +259 int 1 0x01050504, 0x01050504, 0x0A020304, 0x0A020304, 2, 2, 2, 1 +260 + 0x01050504, 0x01050504, 0x0A020304, 0x0A020304, 2, 2, 3 +261 frame_bury 0 0x01050504, 0x01050504, 0x0A020304, 0x0A020304, 3, 2 +263 switch other_routine_3_for_header_1@2 other_routine_3_for_header_2@3 0x01050504, 0x01050504, 0x0A020304, 0x0A020304, 3 +269 frame_dig -3 0x01050504, 0x01050504, 0x0A020304, 0x0A020304, 3, 0x01050504 +271 byte 0x63 0x01050504, 0x01050504, 0x0A020304, 0x0A020304, 3, 0x01050504, "c" +272 replace2 0 0x01050504, 0x01050504, 0x0A020304, 0x0A020304, 3, 0x63050504 +274 frame_bury -3 0x01050504, 0x63050504, 0x0A020304, 0x0A020304, 3 +276 frame_dig -2 0x01050504, 0x63050504, 0x0A020304, 0x0A020304, 3, 0x0A020304 +278 byte 0x63 0x01050504, 0x63050504, 0x0A020304, 0x0A020304, 3, 0x0A020304, "c" +279 replace2 0 0x01050504, 0x63050504, 0x0A020304, 0x0A020304, 3, 0x63020304 +281 frame_bury -2 0x01050504, 0x63050504, 0x63020304, 0x0A020304, 3 +283 frame_dig -1 0x01050504, 0x63050504, 0x63020304, 0x0A020304, 3, 0x0A020304 +285 byte 0x63 0x01050504, 0x63050504, 0x63020304, 0x0A020304, 3, 0x0A020304, "c" +286 replace2 0 0x01050504, 0x63050504, 0x63020304, 0x0A020304, 3, 0x63020304 +288 frame_bury -1 0x01050504, 0x63050504, 0x63020304, 0x63020304, 3 +290 frame_dig -3 0x01050504, 0x63050504, 0x63020304, 0x63020304, 3, 0x63050504 +292 frame_dig -2 0x01050504, 0x63050504, 0x63020304, 0x63020304, 3, 0x63050504, 0x63020304 +294 frame_dig -1 0x01050504, 0x63050504, 0x63020304, 0x63020304, 3, 0x63050504, 0x63020304, 0x63020304 +296 uncover 3 0x01050504, 0x63050504, 0x63020304, 0x63020304, 0x63050504, 0x63020304, 0x63020304, 3 +298 retsub 0x01050504, 0x63050504, 0x63020304, 0x63020304 +148 popn 3 0x01050504 +150 extract 0 4 0x01050504 +153 callsub other_routine_2 0x01050504 +229 proto 1 2 0x01050504 +232 frame_dig -1 0x01050504, 0x01050504 +234 byte 0x0a 0x01050504, 0x01050504, 0x0A +236 replace2 0 0x01050504, 0x0A050504 +238 frame_dig -1 0x01050504, 0x0A050504, 0x01050504 +240 swap 0x01050504, 0x01050504, 0x0A050504 +241 retsub 0x01050504, 0x0A050504 +156 popn 2 +158 retsub +53 int 1 1 +54 return 1 \ No newline at end of file diff --git a/test_cases/arc4_types/out/mutable_params.O2.log b/test_cases/arc4_types/out/mutable_params.O2.log index 8887fd7410..a76a94a5b8 100644 --- a/test_cases/arc4_types/out/mutable_params.O2.log +++ b/test_cases/arc4_types/out/mutable_params.O2.log @@ -1,176 +1,219 @@ -PC Teal Stack -1 -7 -48 callsub mutating_copies -53 proto 0 0 -56 byte 0x01020304 0x01020304 -57 byte 0x05 0x01020304, 0x05 -58 replace2 2 0x01020504 -60 dup 0x01020504, 0x01020504 -61 extract 2 1 0x01020504, 0x05 -64 byte 0x05 0x01020504, 0x05, 0x05 -65 b== 0x01020504, 1 -66 assert 0x01020504 -67 byte 0x80320006000d00054861707079000444617973 0x01020504, 0x80320006000D00054861707079000444617973 -68 callsub other_routine 0x01020504, 0x80320006000D00054861707079000444617973 -144 proto 2 4 0x01020504, 0x80320006000D00054861707079000444617973 -147 frame_dig -2 0x01020504, 0x80320006000D00054861707079000444617973, 0x01020504 -149 byte 0x05 0x01020504, 0x80320006000D00054861707079000444617973, 0x01020504, 0x05 -150 replace2 1 0x01020504, 0x80320006000D00054861707079000444617973, 0x01050504 -152 frame_bury -2 0x01050504, 0x80320006000D00054861707079000444617973 -154 frame_dig -1 0x01050504, 0x80320006000D00054861707079000444617973, 0x80320006000D00054861707079000444617973 -156 int 2 0x01050504, 0x80320006000D00054861707079000444617973, 0x80320006000D00054861707079000444617973, 2 -157 extract_uint16 0x01050504, 0x80320006000D00054861707079000444617973, 6 -158 frame_dig -1 0x01050504, 0x80320006000D00054861707079000444617973, 6, 0x80320006000D00054861707079000444617973 -160 int 0 0x01050504, 0x80320006000D00054861707079000444617973, 6, 0x80320006000D00054861707079000444617973, 0 -161 dig 2 0x01050504, 0x80320006000D00054861707079000444617973, 6, 0x80320006000D00054861707079000444617973, 0, 6 -163 extract3 0x01050504, 0x80320006000D00054861707079000444617973, 6, 0x80320006000D -164 frame_dig -1 0x01050504, 0x80320006000D00054861707079000444617973, 6, 0x80320006000D, 0x80320006000D00054861707079000444617973 -166 int 4 0x01050504, 0x80320006000D00054861707079000444617973, 6, 0x80320006000D, 0x80320006000D00054861707079000444617973, 4 -167 extract_uint16 0x01050504, 0x80320006000D00054861707079000444617973, 6, 0x80320006000D, 13 -168 frame_dig -1 0x01050504, 0x80320006000D00054861707079000444617973, 6, 0x80320006000D, 13, 0x80320006000D00054861707079000444617973 -170 len 0x01050504, 0x80320006000D00054861707079000444617973, 6, 0x80320006000D, 13, 19 -171 frame_dig -1 0x01050504, 0x80320006000D00054861707079000444617973, 6, 0x80320006000D, 13, 19, 0x80320006000D00054861707079000444617973 -173 dig 2 0x01050504, 0x80320006000D00054861707079000444617973, 6, 0x80320006000D, 13, 19, 0x80320006000D00054861707079000444617973, 13 -175 uncover 2 0x01050504, 0x80320006000D00054861707079000444617973, 6, 0x80320006000D, 13, 0x80320006000D00054861707079000444617973, 13, 19 -177 substring3 0x01050504, 0x80320006000D00054861707079000444617973, 6, 0x80320006000D, 13, 0x000444617973 -178 uncover 2 0x01050504, 0x80320006000D00054861707079000444617973, 6, 13, 0x000444617973, 0x80320006000D -180 byte 0x000741415252474821 0x01050504, 0x80320006000D00054861707079000444617973, 6, 13, 0x000444617973, 0x80320006000D, 0x000741415252474821 -181 concat 0x01050504, 0x80320006000D00054861707079000444617973, 6, 13, 0x000444617973, 0x80320006000D000741415252474821 -182 swap 0x01050504, 0x80320006000D00054861707079000444617973, 6, 13, 0x80320006000D000741415252474821, 0x000444617973 -183 concat 0x01050504, 0x80320006000D00054861707079000444617973, 6, 13, 0x80320006000D000741415252474821000444617973 -184 swap 0x01050504, 0x80320006000D00054861707079000444617973, 6, 0x80320006000D000741415252474821000444617973, 13 -185 uncover 2 0x01050504, 0x80320006000D00054861707079000444617973, 0x80320006000D000741415252474821000444617973, 13, 6 -187 - 0x01050504, 0x80320006000D00054861707079000444617973, 0x80320006000D000741415252474821000444617973, 7 -188 swap 0x01050504, 0x80320006000D00054861707079000444617973, 7, 0x80320006000D000741415252474821000444617973 -189 dup 0x01050504, 0x80320006000D00054861707079000444617973, 7, 0x80320006000D000741415252474821000444617973, 0x80320006000D000741415252474821000444617973 -190 int 4 0x01050504, 0x80320006000D00054861707079000444617973, 7, 0x80320006000D000741415252474821000444617973, 0x80320006000D000741415252474821000444617973, 4 -191 extract_uint16 0x01050504, 0x80320006000D00054861707079000444617973, 7, 0x80320006000D000741415252474821000444617973, 13 -192 int 9 0x01050504, 0x80320006000D00054861707079000444617973, 7, 0x80320006000D000741415252474821000444617973, 13, 9 -194 + 0x01050504, 0x80320006000D00054861707079000444617973, 7, 0x80320006000D000741415252474821000444617973, 22 -195 uncover 2 0x01050504, 0x80320006000D00054861707079000444617973, 0x80320006000D000741415252474821000444617973, 22, 7 -197 - 0x01050504, 0x80320006000D00054861707079000444617973, 0x80320006000D000741415252474821000444617973, 15 -198 itob 0x01050504, 0x80320006000D00054861707079000444617973, 0x80320006000D000741415252474821000444617973, 0x000000000000000F -199 extract 6 2 0x01050504, 0x80320006000D00054861707079000444617973, 0x80320006000D000741415252474821000444617973, 0x000F -202 replace2 4 0x01050504, 0x80320006000D00054861707079000444617973, 0x80320006000F000741415252474821000444617973 -204 frame_bury -1 0x01050504, 0x80320006000F000741415252474821000444617973 -206 int 1 0x01050504, 0x80320006000F000741415252474821000444617973, 1 -207 int 0 0x01050504, 0x80320006000F000741415252474821000444617973, 1, 0 -208 frame_dig -2 0x01050504, 0x80320006000F000741415252474821000444617973, 1, 0, 0x01050504 -210 frame_dig -1 0x01050504, 0x80320006000F000741415252474821000444617973, 1, 0, 0x01050504, 0x80320006000F000741415252474821000444617973 -212 retsub 1, 0, 0x01050504, 0x80320006000F000741415252474821000444617973 -71 cover 3 0x80320006000F000741415252474821000444617973, 1, 0, 0x01050504 -73 cover 2 0x80320006000F000741415252474821000444617973, 0x01050504, 1, 0 -75 swap 0x80320006000F000741415252474821000444617973, 0x01050504, 0, 1 -76 assert 0x80320006000F000741415252474821000444617973, 0x01050504, 0 -77 ! 0x80320006000F000741415252474821000444617973, 0x01050504, 1 -78 assert 0x80320006000F000741415252474821000444617973, 0x01050504 -79 dup 0x80320006000F000741415252474821000444617973, 0x01050504, 0x01050504 -80 extract 1 1 0x80320006000F000741415252474821000444617973, 0x01050504, 0x05 -83 byte 0x05 0x80320006000F000741415252474821000444617973, 0x01050504, 0x05, 0x05 -84 b== 0x80320006000F000741415252474821000444617973, 0x01050504, 1 -85 assert 0x80320006000F000741415252474821000444617973, 0x01050504 -86 dig 1 0x80320006000F000741415252474821000444617973, 0x01050504, 0x80320006000F000741415252474821000444617973 -88 int 2 0x80320006000F000741415252474821000444617973, 0x01050504, 0x80320006000F000741415252474821000444617973, 2 -89 extract_uint16 0x80320006000F000741415252474821000444617973, 0x01050504, 6 -90 swap 0x80320006000F000741415252474821000444617973, 6, 0x01050504 -91 dig 2 0x80320006000F000741415252474821000444617973, 6, 0x01050504, 0x80320006000F000741415252474821000444617973 -93 int 4 0x80320006000F000741415252474821000444617973, 6, 0x01050504, 0x80320006000F000741415252474821000444617973, 4 -94 extract_uint16 0x80320006000F000741415252474821000444617973, 6, 0x01050504, 15 -95 swap 0x80320006000F000741415252474821000444617973, 6, 15, 0x01050504 -96 cover 3 0x01050504, 0x80320006000F000741415252474821000444617973, 6, 15 -98 substring3 0x01050504, 0x000741415252474821 -99 byte 0x000741415252474821 0x01050504, 0x000741415252474821, 0x000741415252474821 -100 == 0x01050504, 1 -101 assert 0x01050504 -102 byte 0x01020304 0x01050504, 0x01020304 -103 byte 0x80320006000d00054861707079000444617973 0x01050504, 0x01020304, 0x80320006000D00054861707079000444617973 -104 callsub other_routine 0x01050504, 0x01020304, 0x80320006000D00054861707079000444617973 -144 proto 2 4 0x01050504, 0x01020304, 0x80320006000D00054861707079000444617973 -147 frame_dig -2 0x01050504, 0x01020304, 0x80320006000D00054861707079000444617973, 0x01020304 -149 byte 0x05 0x01050504, 0x01020304, 0x80320006000D00054861707079000444617973, 0x01020304, 0x05 -150 replace2 1 0x01050504, 0x01020304, 0x80320006000D00054861707079000444617973, 0x01050304 -152 frame_bury -2 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973 -154 frame_dig -1 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973, 0x80320006000D00054861707079000444617973 -156 int 2 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973, 0x80320006000D00054861707079000444617973, 2 -157 extract_uint16 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973, 6 -158 frame_dig -1 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973, 6, 0x80320006000D00054861707079000444617973 -160 int 0 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973, 6, 0x80320006000D00054861707079000444617973, 0 -161 dig 2 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973, 6, 0x80320006000D00054861707079000444617973, 0, 6 -163 extract3 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973, 6, 0x80320006000D -164 frame_dig -1 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973, 6, 0x80320006000D, 0x80320006000D00054861707079000444617973 -166 int 4 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973, 6, 0x80320006000D, 0x80320006000D00054861707079000444617973, 4 -167 extract_uint16 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973, 6, 0x80320006000D, 13 -168 frame_dig -1 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973, 6, 0x80320006000D, 13, 0x80320006000D00054861707079000444617973 -170 len 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973, 6, 0x80320006000D, 13, 19 -171 frame_dig -1 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973, 6, 0x80320006000D, 13, 19, 0x80320006000D00054861707079000444617973 -173 dig 2 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973, 6, 0x80320006000D, 13, 19, 0x80320006000D00054861707079000444617973, 13 -175 uncover 2 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973, 6, 0x80320006000D, 13, 0x80320006000D00054861707079000444617973, 13, 19 -177 substring3 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973, 6, 0x80320006000D, 13, 0x000444617973 -178 uncover 2 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973, 6, 13, 0x000444617973, 0x80320006000D -180 byte 0x000741415252474821 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973, 6, 13, 0x000444617973, 0x80320006000D, 0x000741415252474821 -181 concat 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973, 6, 13, 0x000444617973, 0x80320006000D000741415252474821 -182 swap 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973, 6, 13, 0x80320006000D000741415252474821, 0x000444617973 -183 concat 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973, 6, 13, 0x80320006000D000741415252474821000444617973 -184 swap 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973, 6, 0x80320006000D000741415252474821000444617973, 13 -185 uncover 2 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973, 0x80320006000D000741415252474821000444617973, 13, 6 -187 - 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973, 0x80320006000D000741415252474821000444617973, 7 -188 swap 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973, 7, 0x80320006000D000741415252474821000444617973 -189 dup 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973, 7, 0x80320006000D000741415252474821000444617973, 0x80320006000D000741415252474821000444617973 -190 int 4 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973, 7, 0x80320006000D000741415252474821000444617973, 0x80320006000D000741415252474821000444617973, 4 -191 extract_uint16 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973, 7, 0x80320006000D000741415252474821000444617973, 13 -192 int 9 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973, 7, 0x80320006000D000741415252474821000444617973, 13, 9 -194 + 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973, 7, 0x80320006000D000741415252474821000444617973, 22 -195 uncover 2 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973, 0x80320006000D000741415252474821000444617973, 22, 7 -197 - 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973, 0x80320006000D000741415252474821000444617973, 15 -198 itob 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973, 0x80320006000D000741415252474821000444617973, 0x000000000000000F -199 extract 6 2 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973, 0x80320006000D000741415252474821000444617973, 0x000F -202 replace2 4 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973, 0x80320006000F000741415252474821000444617973 -204 frame_bury -1 0x01050504, 0x01050304, 0x80320006000F000741415252474821000444617973 -206 int 1 0x01050504, 0x01050304, 0x80320006000F000741415252474821000444617973, 1 -207 int 0 0x01050504, 0x01050304, 0x80320006000F000741415252474821000444617973, 1, 0 -208 frame_dig -2 0x01050504, 0x01050304, 0x80320006000F000741415252474821000444617973, 1, 0, 0x01050304 -210 frame_dig -1 0x01050504, 0x01050304, 0x80320006000F000741415252474821000444617973, 1, 0, 0x01050304, 0x80320006000F000741415252474821000444617973 -212 retsub 0x01050504, 1, 0, 0x01050304, 0x80320006000F000741415252474821000444617973 -107 popn 4 0x01050504 -109 byte 0x01020304 0x01050504, 0x01020304 -110 callsub other_routine_2 0x01050504, 0x01020304 -213 proto 1 2 0x01050504, 0x01020304 -216 frame_dig -1 0x01050504, 0x01020304, 0x01020304 -218 byte 0x0a 0x01050504, 0x01020304, 0x01020304, 0x0A -220 replace2 0 0x01050504, 0x01020304, 0x0A020304 -222 frame_dig -1 0x01050504, 0x01020304, 0x0A020304, 0x01020304 -224 swap 0x01050504, 0x01020304, 0x01020304, 0x0A020304 -225 retsub 0x01050504, 0x01020304, 0x0A020304 -113 pop 0x01050504, 0x01020304 -114 dup 0x01050504, 0x01020304, 0x01020304 -115 extract 0 1 0x01050504, 0x01020304, 0x01 -118 byte 0x01 0x01050504, 0x01020304, 0x01, 0x01 -121 b== 0x01050504, 0x01020304, 1 -122 assert 0x01050504, 0x01020304 -123 callsub other_routine_2 0x01050504, 0x01020304 -213 proto 1 2 0x01050504, 0x01020304 -216 frame_dig -1 0x01050504, 0x01020304, 0x01020304 -218 byte 0x0a 0x01050504, 0x01020304, 0x01020304, 0x0A -220 replace2 0 0x01050504, 0x01020304, 0x0A020304 -222 frame_dig -1 0x01050504, 0x01020304, 0x0A020304, 0x01020304 -224 swap 0x01050504, 0x01020304, 0x01020304, 0x0A020304 -225 retsub 0x01050504, 0x01020304, 0x0A020304 -126 bury 1 0x01050504, 0x0A020304 -128 extract 0 1 0x01050504, 0x0A -131 byte 0x0a 0x01050504, 0x0A, 0x0A -133 b== 0x01050504, 1 -134 assert 0x01050504 -135 extract 0 4 0x01050504 -138 callsub other_routine_2 0x01050504 -213 proto 1 2 0x01050504 -216 frame_dig -1 0x01050504, 0x01050504 -218 byte 0x0a 0x01050504, 0x01050504, 0x0A -220 replace2 0 0x01050504, 0x0A050504 -222 frame_dig -1 0x01050504, 0x0A050504, 0x01050504 -224 swap 0x01050504, 0x01050504, 0x0A050504 -225 retsub 0x01050504, 0x0A050504 -141 popn 2 -143 retsub -51 int 1 1 -52 return 1 \ No newline at end of file +PC Teal Stack +1 +7 +50 callsub mutating_copies +55 proto 0 0 +58 byte 0x01020304 0x01020304 +59 byte 0x05 0x01020304, 0x05 +60 replace2 2 0x01020504 +62 dup 0x01020504, 0x01020504 +63 extract 2 1 0x01020504, 0x05 +66 byte 0x05 0x01020504, 0x05, 0x05 +67 b== 0x01020504, 1 +68 assert 0x01020504 +69 byte 0x80320006000d00054861707079000444617973 0x01020504, 0x80320006000D00054861707079000444617973 +70 callsub other_routine 0x01020504, 0x80320006000D00054861707079000444617973 +156 proto 2 4 0x01020504, 0x80320006000D00054861707079000444617973 +159 frame_dig -2 0x01020504, 0x80320006000D00054861707079000444617973, 0x01020504 +161 byte 0x05 0x01020504, 0x80320006000D00054861707079000444617973, 0x01020504, 0x05 +162 replace2 1 0x01020504, 0x80320006000D00054861707079000444617973, 0x01050504 +164 frame_bury -2 0x01050504, 0x80320006000D00054861707079000444617973 +166 frame_dig -1 0x01050504, 0x80320006000D00054861707079000444617973, 0x80320006000D00054861707079000444617973 +168 int 2 0x01050504, 0x80320006000D00054861707079000444617973, 0x80320006000D00054861707079000444617973, 2 +169 extract_uint16 0x01050504, 0x80320006000D00054861707079000444617973, 6 +170 frame_dig -1 0x01050504, 0x80320006000D00054861707079000444617973, 6, 0x80320006000D00054861707079000444617973 +172 int 0 0x01050504, 0x80320006000D00054861707079000444617973, 6, 0x80320006000D00054861707079000444617973, 0 +173 dig 2 0x01050504, 0x80320006000D00054861707079000444617973, 6, 0x80320006000D00054861707079000444617973, 0, 6 +175 extract3 0x01050504, 0x80320006000D00054861707079000444617973, 6, 0x80320006000D +176 frame_dig -1 0x01050504, 0x80320006000D00054861707079000444617973, 6, 0x80320006000D, 0x80320006000D00054861707079000444617973 +178 int 4 0x01050504, 0x80320006000D00054861707079000444617973, 6, 0x80320006000D, 0x80320006000D00054861707079000444617973, 4 +179 extract_uint16 0x01050504, 0x80320006000D00054861707079000444617973, 6, 0x80320006000D, 13 +180 frame_dig -1 0x01050504, 0x80320006000D00054861707079000444617973, 6, 0x80320006000D, 13, 0x80320006000D00054861707079000444617973 +182 len 0x01050504, 0x80320006000D00054861707079000444617973, 6, 0x80320006000D, 13, 19 +183 frame_dig -1 0x01050504, 0x80320006000D00054861707079000444617973, 6, 0x80320006000D, 13, 19, 0x80320006000D00054861707079000444617973 +185 dig 2 0x01050504, 0x80320006000D00054861707079000444617973, 6, 0x80320006000D, 13, 19, 0x80320006000D00054861707079000444617973, 13 +187 uncover 2 0x01050504, 0x80320006000D00054861707079000444617973, 6, 0x80320006000D, 13, 0x80320006000D00054861707079000444617973, 13, 19 +189 substring3 0x01050504, 0x80320006000D00054861707079000444617973, 6, 0x80320006000D, 13, 0x000444617973 +190 uncover 2 0x01050504, 0x80320006000D00054861707079000444617973, 6, 13, 0x000444617973, 0x80320006000D +192 byte 0x000741415252474821 0x01050504, 0x80320006000D00054861707079000444617973, 6, 13, 0x000444617973, 0x80320006000D, 0x000741415252474821 +194 concat 0x01050504, 0x80320006000D00054861707079000444617973, 6, 13, 0x000444617973, 0x80320006000D000741415252474821 +195 swap 0x01050504, 0x80320006000D00054861707079000444617973, 6, 13, 0x80320006000D000741415252474821, 0x000444617973 +196 concat 0x01050504, 0x80320006000D00054861707079000444617973, 6, 13, 0x80320006000D000741415252474821000444617973 +197 swap 0x01050504, 0x80320006000D00054861707079000444617973, 6, 0x80320006000D000741415252474821000444617973, 13 +198 uncover 2 0x01050504, 0x80320006000D00054861707079000444617973, 0x80320006000D000741415252474821000444617973, 13, 6 +200 - 0x01050504, 0x80320006000D00054861707079000444617973, 0x80320006000D000741415252474821000444617973, 7 +201 swap 0x01050504, 0x80320006000D00054861707079000444617973, 7, 0x80320006000D000741415252474821000444617973 +202 dup 0x01050504, 0x80320006000D00054861707079000444617973, 7, 0x80320006000D000741415252474821000444617973, 0x80320006000D000741415252474821000444617973 +203 int 4 0x01050504, 0x80320006000D00054861707079000444617973, 7, 0x80320006000D000741415252474821000444617973, 0x80320006000D000741415252474821000444617973, 4 +204 extract_uint16 0x01050504, 0x80320006000D00054861707079000444617973, 7, 0x80320006000D000741415252474821000444617973, 13 +205 int 9 0x01050504, 0x80320006000D00054861707079000444617973, 7, 0x80320006000D000741415252474821000444617973, 13, 9 +207 + 0x01050504, 0x80320006000D00054861707079000444617973, 7, 0x80320006000D000741415252474821000444617973, 22 +208 uncover 2 0x01050504, 0x80320006000D00054861707079000444617973, 0x80320006000D000741415252474821000444617973, 22, 7 +210 - 0x01050504, 0x80320006000D00054861707079000444617973, 0x80320006000D000741415252474821000444617973, 15 +211 itob 0x01050504, 0x80320006000D00054861707079000444617973, 0x80320006000D000741415252474821000444617973, 0x000000000000000F +212 extract 6 2 0x01050504, 0x80320006000D00054861707079000444617973, 0x80320006000D000741415252474821000444617973, 0x000F +215 replace2 4 0x01050504, 0x80320006000D00054861707079000444617973, 0x80320006000F000741415252474821000444617973 +217 frame_bury -1 0x01050504, 0x80320006000F000741415252474821000444617973 +219 int 1 0x01050504, 0x80320006000F000741415252474821000444617973, 1 +220 int 0 0x01050504, 0x80320006000F000741415252474821000444617973, 1, 0 +221 frame_dig -2 0x01050504, 0x80320006000F000741415252474821000444617973, 1, 0, 0x01050504 +223 frame_dig -1 0x01050504, 0x80320006000F000741415252474821000444617973, 1, 0, 0x01050504, 0x80320006000F000741415252474821000444617973 +225 retsub 1, 0, 0x01050504, 0x80320006000F000741415252474821000444617973 +73 cover 3 0x80320006000F000741415252474821000444617973, 1, 0, 0x01050504 +75 cover 2 0x80320006000F000741415252474821000444617973, 0x01050504, 1, 0 +77 swap 0x80320006000F000741415252474821000444617973, 0x01050504, 0, 1 +78 assert 0x80320006000F000741415252474821000444617973, 0x01050504, 0 +79 ! 0x80320006000F000741415252474821000444617973, 0x01050504, 1 +80 assert 0x80320006000F000741415252474821000444617973, 0x01050504 +81 dup 0x80320006000F000741415252474821000444617973, 0x01050504, 0x01050504 +82 extract 1 1 0x80320006000F000741415252474821000444617973, 0x01050504, 0x05 +85 byte 0x05 0x80320006000F000741415252474821000444617973, 0x01050504, 0x05, 0x05 +86 b== 0x80320006000F000741415252474821000444617973, 0x01050504, 1 +87 assert 0x80320006000F000741415252474821000444617973, 0x01050504 +88 dig 1 0x80320006000F000741415252474821000444617973, 0x01050504, 0x80320006000F000741415252474821000444617973 +90 int 2 0x80320006000F000741415252474821000444617973, 0x01050504, 0x80320006000F000741415252474821000444617973, 2 +91 extract_uint16 0x80320006000F000741415252474821000444617973, 0x01050504, 6 +92 swap 0x80320006000F000741415252474821000444617973, 6, 0x01050504 +93 dig 2 0x80320006000F000741415252474821000444617973, 6, 0x01050504, 0x80320006000F000741415252474821000444617973 +95 int 4 0x80320006000F000741415252474821000444617973, 6, 0x01050504, 0x80320006000F000741415252474821000444617973, 4 +96 extract_uint16 0x80320006000F000741415252474821000444617973, 6, 0x01050504, 15 +97 swap 0x80320006000F000741415252474821000444617973, 6, 15, 0x01050504 +98 cover 3 0x01050504, 0x80320006000F000741415252474821000444617973, 6, 15 +100 substring3 0x01050504, 0x000741415252474821 +101 byte 0x000741415252474821 0x01050504, 0x000741415252474821, 0x000741415252474821 +103 == 0x01050504, 1 +104 assert 0x01050504 +105 byte 0x01020304 0x01050504, 0x01020304 +106 byte 0x80320006000d00054861707079000444617973 0x01050504, 0x01020304, 0x80320006000D00054861707079000444617973 +107 callsub other_routine 0x01050504, 0x01020304, 0x80320006000D00054861707079000444617973 +156 proto 2 4 0x01050504, 0x01020304, 0x80320006000D00054861707079000444617973 +159 frame_dig -2 0x01050504, 0x01020304, 0x80320006000D00054861707079000444617973, 0x01020304 +161 byte 0x05 0x01050504, 0x01020304, 0x80320006000D00054861707079000444617973, 0x01020304, 0x05 +162 replace2 1 0x01050504, 0x01020304, 0x80320006000D00054861707079000444617973, 0x01050304 +164 frame_bury -2 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973 +166 frame_dig -1 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973, 0x80320006000D00054861707079000444617973 +168 int 2 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973, 0x80320006000D00054861707079000444617973, 2 +169 extract_uint16 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973, 6 +170 frame_dig -1 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973, 6, 0x80320006000D00054861707079000444617973 +172 int 0 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973, 6, 0x80320006000D00054861707079000444617973, 0 +173 dig 2 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973, 6, 0x80320006000D00054861707079000444617973, 0, 6 +175 extract3 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973, 6, 0x80320006000D +176 frame_dig -1 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973, 6, 0x80320006000D, 0x80320006000D00054861707079000444617973 +178 int 4 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973, 6, 0x80320006000D, 0x80320006000D00054861707079000444617973, 4 +179 extract_uint16 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973, 6, 0x80320006000D, 13 +180 frame_dig -1 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973, 6, 0x80320006000D, 13, 0x80320006000D00054861707079000444617973 +182 len 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973, 6, 0x80320006000D, 13, 19 +183 frame_dig -1 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973, 6, 0x80320006000D, 13, 19, 0x80320006000D00054861707079000444617973 +185 dig 2 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973, 6, 0x80320006000D, 13, 19, 0x80320006000D00054861707079000444617973, 13 +187 uncover 2 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973, 6, 0x80320006000D, 13, 0x80320006000D00054861707079000444617973, 13, 19 +189 substring3 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973, 6, 0x80320006000D, 13, 0x000444617973 +190 uncover 2 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973, 6, 13, 0x000444617973, 0x80320006000D +192 byte 0x000741415252474821 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973, 6, 13, 0x000444617973, 0x80320006000D, 0x000741415252474821 +194 concat 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973, 6, 13, 0x000444617973, 0x80320006000D000741415252474821 +195 swap 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973, 6, 13, 0x80320006000D000741415252474821, 0x000444617973 +196 concat 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973, 6, 13, 0x80320006000D000741415252474821000444617973 +197 swap 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973, 6, 0x80320006000D000741415252474821000444617973, 13 +198 uncover 2 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973, 0x80320006000D000741415252474821000444617973, 13, 6 +200 - 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973, 0x80320006000D000741415252474821000444617973, 7 +201 swap 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973, 7, 0x80320006000D000741415252474821000444617973 +202 dup 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973, 7, 0x80320006000D000741415252474821000444617973, 0x80320006000D000741415252474821000444617973 +203 int 4 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973, 7, 0x80320006000D000741415252474821000444617973, 0x80320006000D000741415252474821000444617973, 4 +204 extract_uint16 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973, 7, 0x80320006000D000741415252474821000444617973, 13 +205 int 9 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973, 7, 0x80320006000D000741415252474821000444617973, 13, 9 +207 + 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973, 7, 0x80320006000D000741415252474821000444617973, 22 +208 uncover 2 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973, 0x80320006000D000741415252474821000444617973, 22, 7 +210 - 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973, 0x80320006000D000741415252474821000444617973, 15 +211 itob 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973, 0x80320006000D000741415252474821000444617973, 0x000000000000000F +212 extract 6 2 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973, 0x80320006000D000741415252474821000444617973, 0x000F +215 replace2 4 0x01050504, 0x01050304, 0x80320006000D00054861707079000444617973, 0x80320006000F000741415252474821000444617973 +217 frame_bury -1 0x01050504, 0x01050304, 0x80320006000F000741415252474821000444617973 +219 int 1 0x01050504, 0x01050304, 0x80320006000F000741415252474821000444617973, 1 +220 int 0 0x01050504, 0x01050304, 0x80320006000F000741415252474821000444617973, 1, 0 +221 frame_dig -2 0x01050504, 0x01050304, 0x80320006000F000741415252474821000444617973, 1, 0, 0x01050304 +223 frame_dig -1 0x01050504, 0x01050304, 0x80320006000F000741415252474821000444617973, 1, 0, 0x01050304, 0x80320006000F000741415252474821000444617973 +225 retsub 0x01050504, 1, 0, 0x01050304, 0x80320006000F000741415252474821000444617973 +110 popn 4 0x01050504 +112 byte 0x01020304 0x01050504, 0x01020304 +113 callsub other_routine_2 0x01050504, 0x01020304 +226 proto 1 2 0x01050504, 0x01020304 +229 frame_dig -1 0x01050504, 0x01020304, 0x01020304 +231 byte 0x0a 0x01050504, 0x01020304, 0x01020304, 0x0A +233 replace2 0 0x01050504, 0x01020304, 0x0A020304 +235 frame_dig -1 0x01050504, 0x01020304, 0x0A020304, 0x01020304 +237 swap 0x01050504, 0x01020304, 0x01020304, 0x0A020304 +238 retsub 0x01050504, 0x01020304, 0x0A020304 +116 pop 0x01050504, 0x01020304 +117 dup 0x01050504, 0x01020304, 0x01020304 +118 extract 0 1 0x01050504, 0x01020304, 0x01 +121 byte 0x01 0x01050504, 0x01020304, 0x01, 0x01 +124 b== 0x01050504, 0x01020304, 1 +125 assert 0x01050504, 0x01020304 +126 callsub other_routine_2 0x01050504, 0x01020304 +226 proto 1 2 0x01050504, 0x01020304 +229 frame_dig -1 0x01050504, 0x01020304, 0x01020304 +231 byte 0x0a 0x01050504, 0x01020304, 0x01020304, 0x0A +233 replace2 0 0x01050504, 0x01020304, 0x0A020304 +235 frame_dig -1 0x01050504, 0x01020304, 0x0A020304, 0x01020304 +237 swap 0x01050504, 0x01020304, 0x01020304, 0x0A020304 +238 retsub 0x01050504, 0x01020304, 0x0A020304 +129 bury 1 0x01050504, 0x0A020304 +131 dup 0x01050504, 0x0A020304, 0x0A020304 +132 extract 0 1 0x01050504, 0x0A020304, 0x0A +135 byte 0x0a 0x01050504, 0x0A020304, 0x0A, 0x0A +137 b== 0x01050504, 0x0A020304, 1 +138 assert 0x01050504, 0x0A020304 +139 dup2 0x01050504, 0x0A020304, 0x01050504, 0x0A020304 +140 uncover 2 0x01050504, 0x01050504, 0x0A020304, 0x0A020304 +142 callsub other_routine_3 0x01050504, 0x01050504, 0x0A020304, 0x0A020304 +239 proto 3 3 0x01050504, 0x01050504, 0x0A020304, 0x0A020304 +242 byte "" 0x01050504, 0x01050504, 0x0A020304, 0x0A020304, 0x +244 int 0 0x01050504, 0x01050504, 0x0A020304, 0x0A020304, 0x, 0 +245 b other_routine_3_for_body@4 0x01050504, 0x01050504, 0x0A020304, 0x0A020304, 0x, 0 +250 dup 0x01050504, 0x01050504, 0x0A020304, 0x0A020304, 0x, 0, 0 +251 int 1 0x01050504, 0x01050504, 0x0A020304, 0x0A020304, 0x, 0, 0, 1 +252 + 0x01050504, 0x01050504, 0x0A020304, 0x0A020304, 0x, 0, 1 +253 frame_bury 0 0x01050504, 0x01050504, 0x0A020304, 0x0A020304, 1, 0 +255 switch other_routine_3_for_header_1@2 other_routine_3_for_header_1@2 0x01050504, 0x01050504, 0x0A020304, 0x0A020304, 1 +248 frame_dig 0 0x01050504, 0x01050504, 0x0A020304, 0x0A020304, 1, 1 +250 dup 0x01050504, 0x01050504, 0x0A020304, 0x0A020304, 1, 1, 1 +251 int 1 0x01050504, 0x01050504, 0x0A020304, 0x0A020304, 1, 1, 1, 1 +252 + 0x01050504, 0x01050504, 0x0A020304, 0x0A020304, 1, 1, 2 +253 frame_bury 0 0x01050504, 0x01050504, 0x0A020304, 0x0A020304, 2, 1 +255 switch other_routine_3_for_header_1@2 other_routine_3_for_header_1@2 0x01050504, 0x01050504, 0x0A020304, 0x0A020304, 2 +248 frame_dig 0 0x01050504, 0x01050504, 0x0A020304, 0x0A020304, 2, 2 +250 dup 0x01050504, 0x01050504, 0x0A020304, 0x0A020304, 2, 2, 2 +251 int 1 0x01050504, 0x01050504, 0x0A020304, 0x0A020304, 2, 2, 2, 1 +252 + 0x01050504, 0x01050504, 0x0A020304, 0x0A020304, 2, 2, 3 +253 frame_bury 0 0x01050504, 0x01050504, 0x0A020304, 0x0A020304, 3, 2 +255 switch other_routine_3_for_header_1@2 other_routine_3_for_header_1@2 0x01050504, 0x01050504, 0x0A020304, 0x0A020304, 3 +261 frame_dig -3 0x01050504, 0x01050504, 0x0A020304, 0x0A020304, 3, 0x01050504 +263 byte 0x63 0x01050504, 0x01050504, 0x0A020304, 0x0A020304, 3, 0x01050504, "c" +264 replace2 0 0x01050504, 0x01050504, 0x0A020304, 0x0A020304, 3, 0x63050504 +266 frame_bury -3 0x01050504, 0x63050504, 0x0A020304, 0x0A020304, 3 +268 frame_dig -2 0x01050504, 0x63050504, 0x0A020304, 0x0A020304, 3, 0x0A020304 +270 byte 0x63 0x01050504, 0x63050504, 0x0A020304, 0x0A020304, 3, 0x0A020304, "c" +271 replace2 0 0x01050504, 0x63050504, 0x0A020304, 0x0A020304, 3, 0x63020304 +273 frame_bury -2 0x01050504, 0x63050504, 0x63020304, 0x0A020304, 3 +275 frame_dig -1 0x01050504, 0x63050504, 0x63020304, 0x0A020304, 3, 0x0A020304 +277 byte 0x63 0x01050504, 0x63050504, 0x63020304, 0x0A020304, 3, 0x0A020304, "c" +278 replace2 0 0x01050504, 0x63050504, 0x63020304, 0x0A020304, 3, 0x63020304 +280 frame_bury -1 0x01050504, 0x63050504, 0x63020304, 0x63020304, 3 +282 frame_dig -3 0x01050504, 0x63050504, 0x63020304, 0x63020304, 3, 0x63050504 +284 frame_dig -2 0x01050504, 0x63050504, 0x63020304, 0x63020304, 3, 0x63050504, 0x63020304 +286 frame_dig -1 0x01050504, 0x63050504, 0x63020304, 0x63020304, 3, 0x63050504, 0x63020304, 0x63020304 +288 uncover 3 0x01050504, 0x63050504, 0x63020304, 0x63020304, 0x63050504, 0x63020304, 0x63020304, 3 +290 retsub 0x01050504, 0x63050504, 0x63020304, 0x63020304 +145 popn 3 0x01050504 +147 extract 0 4 0x01050504 +150 callsub other_routine_2 0x01050504 +226 proto 1 2 0x01050504 +229 frame_dig -1 0x01050504, 0x01050504 +231 byte 0x0a 0x01050504, 0x01050504, 0x0A +233 replace2 0 0x01050504, 0x0A050504 +235 frame_dig -1 0x01050504, 0x0A050504, 0x01050504 +237 swap 0x01050504, 0x01050504, 0x0A050504 +238 retsub 0x01050504, 0x0A050504 +153 popn 2 +155 retsub +53 int 1 1 +54 return 1 \ No newline at end of file diff --git a/test_cases/arc4_types/out/mutable_params.awst b/test_cases/arc4_types/out/mutable_params.awst index 592cf5ed49..770752c51b 100644 --- a/test_cases/arc4_types/out/mutable_params.awst +++ b/test_cases/arc4_types/out/mutable_params.awst @@ -44,6 +44,7 @@ contract Arc4MutableParamsContract assert(reinterpret_cast(my_array_copy_2[0u]) == reinterpret_cast(1arc4u8), comment="my_array_copy_2 should have original value") this::other_routine_2(my_array_copy_2) assert(reinterpret_cast(my_array_copy_2[0u]) == reinterpret_cast(10arc4u8), comment="my_array_copy_2 should have mutated value") + this::other_routine_3((my_array.copy(), my_array_copy_2.copy(), my_array_copy_2.copy())) nested: test_cases.arc4_types.mutable_params.StructWithArray = new test_cases.arc4_types.mutable_params.StructWithArray(test_array=my_array.copy()) this::other_routine_2(nested.test_array.copy()) } diff --git a/test_cases/arc4_types/out_O2/Arc4MutableParamsContract.approval.teal b/test_cases/arc4_types/out_O2/Arc4MutableParamsContract.approval.teal index 0aa854d6c5..c2d0de592c 100644 --- a/test_cases/arc4_types/out_O2/Arc4MutableParamsContract.approval.teal +++ b/test_cases/arc4_types/out_O2/Arc4MutableParamsContract.approval.teal @@ -57,10 +57,15 @@ mutating_copies: assert // my_array_copy_2 should have original value callsub other_routine_2 bury 1 + dup extract 0 1 // on error: Index access is out of bounds byte 0x0a b== assert // my_array_copy_2 should have mutated value + dup2 + uncover 2 + callsub other_routine_3 + popn 3 extract 0 4 // on error: Index access is out of bounds callsub other_routine_2 popn 2 @@ -126,3 +131,38 @@ other_routine_2: frame_dig -1 swap retsub + + +// test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.other_routine_3(arrays.0: bytes, arrays.1: bytes, arrays.2: bytes) -> bytes, bytes, bytes: +other_routine_3: + proto 3 3 + byte "" + int 0 + b other_routine_3_for_body@4 + +other_routine_3_for_header_1@2: + frame_dig 0 + +other_routine_3_for_body@4: + dup + int 1 + + + frame_bury 0 + switch other_routine_3_for_header_1@2 other_routine_3_for_header_1@2 + frame_dig -3 + byte 0x63 + replace2 0 + frame_bury -3 + frame_dig -2 + byte 0x63 + replace2 0 + frame_bury -2 + frame_dig -1 + byte 0x63 + replace2 0 + frame_bury -1 + frame_dig -3 + frame_dig -2 + frame_dig -1 + uncover 3 + retsub diff --git a/test_cases/arc4_types/out_O2/Arc4MutableParamsContract.destructured.ir b/test_cases/arc4_types/out_O2/Arc4MutableParamsContract.destructured.ir index f1f680f987..6bc9a24703 100644 --- a/test_cases/arc4_types/out_O2/Arc4MutableParamsContract.destructured.ir +++ b/test_cases/arc4_types/out_O2/Arc4MutableParamsContract.destructured.ir @@ -32,12 +32,13 @@ contract test_cases.arc4_types.mutable_params.Arc4MutableParamsContract: let reinterpret_biguint%10#0: biguint = ((extract 0 1) my_array_copy_2#2) // on error: Index access is out of bounds let tmp%10#0: bool = (b== reinterpret_biguint%10#0 0x0a) (assert tmp%10#0) // my_array_copy_2 should have mutated value + let (other_routine_3%0#0: bytes, other_routine_3%1#0: bytes, other_routine_3%2#0: bytes) = test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.other_routine_3(my_array#1, my_array_copy_2#2, my_array_copy_2#2) let tmp%11#0: bytes = ((extract 0 4) my_array#1) // on error: Index access is out of bounds let (other_routine_2%4#0: bytes, other_routine_2%5#0: bytes) = test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.other_routine_2(tmp%11#0) return subroutine test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.other_routine(array: bytes, struct: bytes) -> : - block@0: // L92 + block@0: // L89 let array#0: bytes = ((replace2 1) array#0 0x05) let item_offset%0#0: uint64 = (extract_uint16 struct#0 2u) let data_up_to_item%0#0: bytes = (extract3 struct#0 0u item_offset%0#0) @@ -56,11 +57,27 @@ contract test_cases.arc4_types.mutable_params.Arc4MutableParamsContract: return 1u 0u array#0 struct#0 subroutine test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.other_routine_2(array: bytes) -> : - block@0: // L98 + block@0: // L95 let array#1: bytes = ((replace2 0) array#0 0x0a) return array#0 array#1 + + subroutine test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.other_routine_3(arrays.0: bytes, arrays.1: bytes, arrays.2: bytes) -> : + block@0: // L101 + let tuple_index%0#0: uint64 = 0u + goto block@4 + block@2: // for_header_1_L103 + let tuple_index%0#0: uint64 = tuple_index%0#4 + goto block@4 + block@4: // for_body_L103 + let tuple_index%0#4: uint64 = (+ tuple_index%0#0 1u) + goto_nth [block@2, block@2][tuple_index%0#0] else goto block@6 + block@6: // after_for_L103 + let arrays.0#0: bytes = ((replace2 0) arrays.0#0 0x63) + let arrays.1#0: bytes = ((replace2 0) arrays.1#0 0x63) + let arrays.2#0: bytes = ((replace2 0) arrays.2#0 0x63) + return arrays.0#0 arrays.1#0 arrays.2#0 program clear-state: subroutine test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.clear_state_program() -> bool: - block@0: // L115 + block@0: // L111 return 1u \ No newline at end of file diff --git a/test_cases/arc4_types/out_unoptimized/Arc4MutableParamsContract.approval.teal b/test_cases/arc4_types/out_unoptimized/Arc4MutableParamsContract.approval.teal index 04b205d9bf..7e017e024b 100644 --- a/test_cases/arc4_types/out_unoptimized/Arc4MutableParamsContract.approval.teal +++ b/test_cases/arc4_types/out_unoptimized/Arc4MutableParamsContract.approval.teal @@ -256,6 +256,7 @@ mutating_copies: pop // arc4_types/mutable_params.py:80 // assert my_array_copy_2[0] == UInt8(10), "my_array_copy_2 should have mutated value" + dup int 0 int 1 * @@ -264,13 +265,27 @@ mutating_copies: byte 0x0a b== assert // my_array_copy_2 should have mutated value - // arc4_types/mutable_params.py:88-89 + // arc4_types/mutable_params.py:82-83 + // # tuples of mutable types only work with a .copy() + // self.other_routine_3((my_array.copy(), my_array_copy_2.copy(), my_array_copy_2.copy())) + dig 1 + dig 1 + cover 1 + uncover 2 + uncover 1 + uncover 2 + uncover 2 + callsub other_routine_3 + pop + pop + pop + // arc4_types/mutable_params.py:85-86 // # Nested array items should still require a copy // nested = StructWithArray(test_array=my_array.copy()) byte 0x uncover 1 concat - // arc4_types/mutable_params.py:90 + // arc4_types/mutable_params.py:87 // self.other_routine_2(nested.test_array.copy()) int 0 int 4 @@ -283,18 +298,18 @@ mutating_copies: // test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.other_routine(array: bytes, struct: bytes) -> uint64, uint64, bytes, bytes: other_routine: - // arc4_types/mutable_params.py:92-93 + // arc4_types/mutable_params.py:89-90 // @subroutine // def other_routine(self, array: TestArray, struct: TestStruct) -> tuple[bool, bool]: proto 2 4 - // arc4_types/mutable_params.py:94 + // arc4_types/mutable_params.py:91 // array[1] = UInt8(5) frame_dig -2 int 1 byte 0x05 replace3 frame_bury -2 - // arc4_types/mutable_params.py:95 + // arc4_types/mutable_params.py:92 // struct.s_val_1 = String("AARRGH!") byte "AARRGH!" len @@ -343,7 +358,7 @@ other_routine: uncover 2 replace3 frame_bury -1 - // arc4_types/mutable_params.py:96 + // arc4_types/mutable_params.py:93 // return True, False int 1 int 0 @@ -354,14 +369,14 @@ other_routine: // test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.other_routine_2(array: bytes) -> bytes, bytes: other_routine_2: - // arc4_types/mutable_params.py:98-99 + // arc4_types/mutable_params.py:95-96 // @subroutine // def other_routine_2(self, array: TestArray) -> TestArray: proto 1 2 - // arc4_types/mutable_params.py:100 + // arc4_types/mutable_params.py:97 // copy = array.copy() frame_dig -1 - // arc4_types/mutable_params.py:101 + // arc4_types/mutable_params.py:98 // array[0] = UInt8(10) frame_dig -1 int 0 @@ -369,6 +384,66 @@ other_routine_2: replace3 dup frame_bury -1 - // arc4_types/mutable_params.py:102 + // arc4_types/mutable_params.py:99 // return copy retsub + + +// test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.other_routine_3(arrays.0: bytes, arrays.1: bytes, arrays.2: bytes) -> bytes, bytes, bytes: +other_routine_3: + // arc4_types/mutable_params.py:101-102 + // @subroutine + // def other_routine_3(self, arrays: tuple[TestArray, TestArray, TestArray]) -> None: + proto 3 3 + byte "" + dup + int 0 + frame_bury 0 + b other_routine_3_for_body@4 + +other_routine_3_for_header_1@2: + frame_dig 1 + frame_bury 0 + b other_routine_3_for_body@4 + +other_routine_3_for_header_2@3: + frame_dig 1 + frame_bury 0 + +other_routine_3_for_body@4: + frame_dig 0 + dup + int 1 + + + frame_bury 1 + // arc4_types/mutable_params.py:103-104 + // # this modifies the local copy + // for array in arrays: + switch other_routine_3_for_header_1@2 other_routine_3_for_header_2@3 + // arc4_types/mutable_params.py:107 + // arrays[0][0] = UInt8(99) + frame_dig -3 + int 0 + byte 0x63 + replace3 + frame_bury -3 + // arc4_types/mutable_params.py:108 + // arrays[1][0] = UInt8(99) + frame_dig -2 + int 0 + byte 0x63 + replace3 + frame_bury -2 + // arc4_types/mutable_params.py:109 + // arrays[2][0] = UInt8(99) + frame_dig -1 + int 0 + byte 0x63 + replace3 + frame_bury -1 + frame_dig -3 + frame_dig -2 + frame_dig -1 + uncover 4 + uncover 4 + retsub diff --git a/test_cases/arc4_types/out_unoptimized/Arc4MutableParamsContract.clear.teal b/test_cases/arc4_types/out_unoptimized/Arc4MutableParamsContract.clear.teal index bf19312e21..3c6fb7a505 100644 --- a/test_cases/arc4_types/out_unoptimized/Arc4MutableParamsContract.clear.teal +++ b/test_cases/arc4_types/out_unoptimized/Arc4MutableParamsContract.clear.teal @@ -1,7 +1,7 @@ #pragma version 10 test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.clear_state_program: - // arc4_types/mutable_params.py:116 + // arc4_types/mutable_params.py:112 // return True int 1 return diff --git a/test_cases/arc4_types/out_unoptimized/Arc4MutableParamsContract.destructured.ir b/test_cases/arc4_types/out_unoptimized/Arc4MutableParamsContract.destructured.ir index 5b401a24ed..a9b39cde43 100644 --- a/test_cases/arc4_types/out_unoptimized/Arc4MutableParamsContract.destructured.ir +++ b/test_cases/arc4_types/out_unoptimized/Arc4MutableParamsContract.destructured.ir @@ -107,15 +107,19 @@ contract test_cases.arc4_types.mutable_params.Arc4MutableParamsContract: let tmp%10#0: bool = (b== reinterpret_biguint%10#0 0x0a) (assert tmp%10#0) // my_array_copy_2 should have mutated value let copy%5#0: bytes = my_array#0 - let encoded_tuple_buffer%8#0: bytes = (concat 0x copy%5#0) + let copy%6#0: bytes = my_array_copy_2#0 + let copy%7#0: bytes = my_array_copy_2#0 + let (other_routine_3%0#0: bytes, other_routine_3%1#0: bytes, other_routine_3%2#0: bytes) = test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.other_routine_3(copy%5#0, copy%6#0, copy%7#0) + let copy%8#0: bytes = my_array#0 + let encoded_tuple_buffer%8#0: bytes = (concat 0x copy%8#0) let nested#0: bytes = encoded_tuple_buffer%8#0 let tmp%11#0: bytes = (extract3 nested#0 0u 4u) // on error: Index access is out of bounds - let copy%6#0: bytes = tmp%11#0 - let (other_routine_2%4#0: bytes, other_routine_2%5#0: bytes) = test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.other_routine_2(copy%6#0) + let copy%9#0: bytes = tmp%11#0 + let (other_routine_2%4#0: bytes, other_routine_2%5#0: bytes) = test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.other_routine_2(copy%9#0) return subroutine test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.other_routine(array: bytes, struct: bytes) -> : - block@0: // L92 + block@0: // L89 let updated_target%0#0: bytes = (replace3 array#0 1u 0x05) let array#0: bytes = updated_target%0#0 let length%0#0: uint64 = (len "AARRGH!") @@ -142,14 +146,40 @@ contract test_cases.arc4_types.mutable_params.Arc4MutableParamsContract: return 1u 0u array#0 struct#0 subroutine test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.other_routine_2(array: bytes) -> : - block@0: // L98 + block@0: // L95 let copy%0#0: bytes = array#0 let copy#0: bytes = copy%0#0 let updated_target%0#0: bytes = (replace3 array#0 0u 0x0a) let array#0: bytes = updated_target%0#0 return copy#0 array#0 + + subroutine test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.other_routine_3(arrays.0: bytes, arrays.1: bytes, arrays.2: bytes) -> : + block@0: // L101 + goto block@1 + block@1: // for_header_0_L103 + let tuple_index%0#0: uint64 = 0u + goto block@4 + block@2: // for_header_1_L103 + let tuple_index%0#0: uint64 = tuple_index%0#4 + goto block@4 + block@3: // for_header_2_L103 + let tuple_index%0#0: uint64 = tuple_index%0#4 + goto block@4 + block@4: // for_body_L103 + goto block@5 + block@5: // for_footer_L103 + let tuple_index%0#4: uint64 = (+ tuple_index%0#0 1u) + goto_nth [block@2, block@3][tuple_index%0#0] else goto block@6 + block@6: // after_for_L103 + let updated_target%1#0: bytes = (replace3 arrays.0#0 0u 0x63) + let arrays.0#0: bytes = updated_target%1#0 + let updated_target%2#0: bytes = (replace3 arrays.1#0 0u 0x63) + let arrays.1#0: bytes = updated_target%2#0 + let updated_target%3#0: bytes = (replace3 arrays.2#0 0u 0x63) + let arrays.2#0: bytes = updated_target%3#0 + return arrays.0#0 arrays.1#0 arrays.2#0 program clear-state: subroutine test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.clear_state_program() -> bool: - block@0: // L115 + block@0: // L111 return 1u \ No newline at end of file diff --git a/test_cases/arc4_types/puya.log b/test_cases/arc4_types/puya.log index add64dbf4b..519d79ad33 100644 --- a/test_cases/arc4_types/puya.log +++ b/test_cases/arc4_types/puya.log @@ -2,7 +2,7 @@ debug: PuyaOptions(paths=['arc4_types'], output_teal=True, output_arc32=True, ou info: Found python prefix: /.venv arc4_types/mutable_params.py:62:9 warning: expression result is ignored arc4_types/mutable_params.py:79:9 warning: expression result is ignored -arc4_types/mutable_params.py:90:9 warning: expression result is ignored +arc4_types/mutable_params.py:87:9 warning: expression result is ignored arc4_types/bool_eval.py:55:16 warning: expression is always True arc4_types/bool_eval.py:56:16 warning: expression is always True arc4_types/bool_eval.py:58:16 warning: expression is always True @@ -790,14 +790,69 @@ debug: Sealing block@0: // L4 debug: Terminated block@0: // L4 debug: Sealing block@0: // L33 debug: Terminated block@0: // L33 -debug: Sealing block@0: // L92 -debug: Terminated block@0: // L92 -debug: Sealing block@0: // L98 -debug: Terminated block@0: // L98 +debug: Sealing block@0: // L89 +debug: Terminated block@0: // L89 +debug: Sealing block@0: // L95 +debug: Terminated block@0: // L95 +debug: Sealing block@0: // L101 +debug: Terminated block@0: // L101 +debug: Sealing block@1: // for_header_0_L103 +debug: Terminated block@1: // for_header_0_L103 +debug: Terminated block@2: // for_header_1_L103 +debug: Terminated block@3: // for_header_2_L103 +debug: Sealing block@None: // for_body_L103 +debug: Created Phi assignment: let array#3: bytes = undefined while trying to resolve 'array' in block@4: // for_body_L103 +debug: Added array#0 to Phi node: let array#3: bytes = φ(array#0 <- block@1) in block@1: // for_header_0_L103 +debug: Added array#1 to Phi node: let array#3: bytes = φ(array#0 <- block@1, array#1 <- block@2) in block@2: // for_header_1_L103 +debug: Added array#2 to Phi node: let array#3: bytes = φ(array#0 <- block@1, array#1 <- block@2, array#2 <- block@3) in block@3: // for_header_2_L103 +debug: Terminated block@4: // for_body_L103 +debug: Sealing block@5: // for_footer_L103 +debug: Created Phi assignment: let tuple_index%0#1: uint64 = undefined while trying to resolve 'tuple_index%0' in block@4: // for_body_L103 +debug: Added tuple_index%0#0 to Phi node: let tuple_index%0#1: uint64 = φ(tuple_index%0#0 <- block@1) in block@1: // for_header_0_L103 +debug: Looking for 'tuple_index%0' in an unsealed block creating an incomplete Phi: block@2: // for_header_1_L103 +debug: Created Phi assignment: let tuple_index%0#2: uint64 = undefined while trying to resolve 'tuple_index%0' in block@2: // for_header_1_L103 +debug: Added tuple_index%0#2 to Phi node: let tuple_index%0#1: uint64 = φ(tuple_index%0#0 <- block@1, tuple_index%0#2 <- block@2) in block@2: // for_header_1_L103 +debug: Looking for 'tuple_index%0' in an unsealed block creating an incomplete Phi: block@3: // for_header_2_L103 +debug: Created Phi assignment: let tuple_index%0#3: uint64 = undefined while trying to resolve 'tuple_index%0' in block@3: // for_header_2_L103 +debug: Added tuple_index%0#3 to Phi node: let tuple_index%0#1: uint64 = φ(tuple_index%0#0 <- block@1, tuple_index%0#2 <- block@2, tuple_index%0#3 <- block@3) in block@3: // for_header_2_L103 +debug: Terminated block@5: // for_footer_L103 +debug: Sealing block@2: // for_header_1_L103 +debug: Added tuple_index%0#4 to Phi node: let tuple_index%0#2: uint64 = φ(tuple_index%0#4 <- block@5) in block@5: // for_footer_L103 +debug: Replacing trivial Phi node: let tuple_index%0#2: uint64 = φ(tuple_index%0#4 <- block@5) (tuple_index%0#2) with tuple_index%0#4 +debug: Deleting Phi assignment: let tuple_index%0#2: uint64 = φ(tuple_index%0#4 <- block@5) +debug: Replaced trivial Phi node: let tuple_index%0#2: uint64 = φ(tuple_index%0#4 <- block@5) (tuple_index%0#2) with tuple_index%0#4 in current definition for 1 blocks +debug: Sealing block@3: // for_header_2_L103 +debug: Added tuple_index%0#4 to Phi node: let tuple_index%0#3: uint64 = φ(tuple_index%0#4 <- block@5) in block@5: // for_footer_L103 +debug: Replacing trivial Phi node: let tuple_index%0#3: uint64 = φ(tuple_index%0#4 <- block@5) (tuple_index%0#3) with tuple_index%0#4 +debug: Deleting Phi assignment: let tuple_index%0#3: uint64 = φ(tuple_index%0#4 <- block@5) +debug: Replaced trivial Phi node: let tuple_index%0#3: uint64 = φ(tuple_index%0#4 <- block@5) (tuple_index%0#3) with tuple_index%0#4 in current definition for 1 blocks +debug: Sealing block@None: // after_for_L103 +debug: Created Phi assignment: let arrays.0#1: bytes = undefined while trying to resolve 'arrays.0' in block@4: // for_body_L103 +debug: Added arrays.0#0 to Phi node: let arrays.0#1: bytes = φ(arrays.0#0 <- block@1) in block@1: // for_header_0_L103 +debug: Added arrays.0#1 to Phi node: let arrays.0#1: bytes = φ(arrays.0#0 <- block@1, arrays.0#1 <- block@2) in block@2: // for_header_1_L103 +debug: Added arrays.0#1 to Phi node: let arrays.0#1: bytes = φ(arrays.0#0 <- block@1, arrays.0#1 <- block@2, arrays.0#1 <- block@3) in block@3: // for_header_2_L103 +debug: Replacing trivial Phi node: let arrays.0#1: bytes = φ(arrays.0#0 <- block@1, arrays.0#1 <- block@2, arrays.0#1 <- block@3) (arrays.0#1) with arrays.0#0 +debug: Deleting Phi assignment: let arrays.0#1: bytes = φ(arrays.0#0 <- block@1, arrays.0#1 <- block@2, arrays.0#1 <- block@3) +debug: Replaced trivial Phi node: let arrays.0#1: bytes = φ(arrays.0#0 <- block@1, arrays.0#1 <- block@2, arrays.0#1 <- block@3) (arrays.0#1) with arrays.0#0 in current definition for 4 blocks +debug: Created Phi assignment: let arrays.1#1: bytes = undefined while trying to resolve 'arrays.1' in block@4: // for_body_L103 +debug: Added arrays.1#0 to Phi node: let arrays.1#1: bytes = φ(arrays.1#0 <- block@1) in block@1: // for_header_0_L103 +debug: Added arrays.1#1 to Phi node: let arrays.1#1: bytes = φ(arrays.1#0 <- block@1, arrays.1#1 <- block@2) in block@2: // for_header_1_L103 +debug: Added arrays.1#1 to Phi node: let arrays.1#1: bytes = φ(arrays.1#0 <- block@1, arrays.1#1 <- block@2, arrays.1#1 <- block@3) in block@3: // for_header_2_L103 +debug: Replacing trivial Phi node: let arrays.1#1: bytes = φ(arrays.1#0 <- block@1, arrays.1#1 <- block@2, arrays.1#1 <- block@3) (arrays.1#1) with arrays.1#0 +debug: Deleting Phi assignment: let arrays.1#1: bytes = φ(arrays.1#0 <- block@1, arrays.1#1 <- block@2, arrays.1#1 <- block@3) +debug: Replaced trivial Phi node: let arrays.1#1: bytes = φ(arrays.1#0 <- block@1, arrays.1#1 <- block@2, arrays.1#1 <- block@3) (arrays.1#1) with arrays.1#0 in current definition for 4 blocks +debug: Created Phi assignment: let arrays.2#1: bytes = undefined while trying to resolve 'arrays.2' in block@4: // for_body_L103 +debug: Added arrays.2#0 to Phi node: let arrays.2#1: bytes = φ(arrays.2#0 <- block@1) in block@1: // for_header_0_L103 +debug: Added arrays.2#1 to Phi node: let arrays.2#1: bytes = φ(arrays.2#0 <- block@1, arrays.2#1 <- block@2) in block@2: // for_header_1_L103 +debug: Added arrays.2#1 to Phi node: let arrays.2#1: bytes = φ(arrays.2#0 <- block@1, arrays.2#1 <- block@2, arrays.2#1 <- block@3) in block@3: // for_header_2_L103 +debug: Replacing trivial Phi node: let arrays.2#1: bytes = φ(arrays.2#0 <- block@1, arrays.2#1 <- block@2, arrays.2#1 <- block@3) (arrays.2#1) with arrays.2#0 +debug: Deleting Phi assignment: let arrays.2#1: bytes = φ(arrays.2#0 <- block@1, arrays.2#1 <- block@2, arrays.2#1 <- block@3) +debug: Replaced trivial Phi node: let arrays.2#1: bytes = φ(arrays.2#0 <- block@1, arrays.2#1 <- block@2, arrays.2#1 <- block@3) (arrays.2#1) with arrays.2#0 in current definition for 4 blocks +debug: Terminated block@6: // after_for_L103 debug: Sealing block@0: // L28 debug: Terminated block@0: // L28 -debug: Sealing block@0: // L115 -debug: Terminated block@0: // L115 +debug: Sealing block@0: // L111 +debug: Terminated block@0: // L111 debug: Sealing block@0: // L143 debug: Terminated block@0: // L143 debug: Sealing block@0: // L166 @@ -4857,8 +4912,8 @@ debug: Found equivalence set: updated_target%0#0, my_array#1, array_head_and_tai debug: Replacing {updated_target%0#0, array_head_and_tail%1#0} with my_array#1 made 2 modifications debug: Found equivalence set: other_routine%3#0, my_struct#1 debug: Replacing {other_routine%3#0} with my_struct#1 made 1 modifications -debug: Found equivalence set: other_routine%2#0, my_array#2, array_head_and_tail%2#0, copy%5#0 -debug: Replacing {other_routine%2#0, array_head_and_tail%2#0, copy%5#0} with my_array#2 made 3 modifications +debug: Found equivalence set: other_routine%2#0, my_array#2, array_head_and_tail%2#0, copy%5#0, copy%8#0 +debug: Replacing {other_routine%2#0, array_head_and_tail%2#0, copy%5#0, copy%8#0} with my_array#2 made 4 modifications debug: Found equivalence set: other_routine%0#0, t#0 debug: Replacing {other_routine%0#0} with t#0 made 1 modifications debug: Found equivalence set: other_routine%1#0, f#0 @@ -4869,13 +4924,16 @@ debug: Found equivalence set: other_routine_2%1#0, my_array_copy_2#1 debug: Replacing {other_routine_2%1#0} with my_array_copy_2#1 made 1 modifications debug: Found equivalence set: other_routine_2%0#0, my_array_copy_2#2, array_head_and_tail%4#0 debug: Replacing {other_routine_2%0#0, array_head_and_tail%4#0} with my_array_copy_2#2 made 2 modifications -debug: Found equivalence set: other_routine_2%3#0, my_array_copy_2#3, array_head_and_tail%5#0 -debug: Replacing {other_routine_2%3#0, array_head_and_tail%5#0} with my_array_copy_2#3 made 2 modifications +debug: Found equivalence set: other_routine_2%3#0, my_array_copy_2#3, array_head_and_tail%5#0, copy%6#0, copy%7#0 +debug: Replacing {other_routine_2%3#0, array_head_and_tail%5#0, copy%6#0, copy%7#0} with my_array_copy_2#3 made 4 modifications +debug: Found equivalence set: other_routine_3%2#0, copy%7#1 +debug: Found equivalence set: other_routine_3%1#0, copy%6#1 +debug: Found equivalence set: other_routine_3%0#0, copy%5#1 debug: Found equivalence set: encoded_tuple_buffer%8#0, nested#0 debug: Replacing {encoded_tuple_buffer%8#0} with nested#0 made 1 modifications -debug: Found equivalence set: tmp%11#0, copy%6#0 -debug: Replacing {copy%6#0} with tmp%11#0 made 1 modifications -debug: Found equivalence set: other_routine_2%5#0, copy%6#1 +debug: Found equivalence set: tmp%11#0, copy%9#0 +debug: Replacing {copy%9#0} with tmp%11#0 made 1 modifications +debug: Found equivalence set: other_routine_2%5#0, copy%9#1 debug: Optimizer: Intrinsic Simplifier debug: Simplified (concat 0x 0x01) to 0x01 debug: Simplified (concat 0x result%3#0) to result%3#0 @@ -4908,6 +4966,7 @@ debug: Not removing unused assignment since source is not marked as pure: let (o debug: Removing unused variable reinterpret_biguint%7#0 debug: Removing unused variable reinterpret_biguint%9#0 debug: Removing unused variable reinterpret_biguint%11#0 +debug: Not removing unused assignment since source is not marked as pure: let (other_routine_3%0#0: bytes, other_routine_3%1#0: bytes, other_routine_3%2#0: bytes) = test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.other_routine_3(my_array#2, my_array_copy_2#3, my_array_copy_2#3) debug: Removing unused variable current_tail_offset%3#0 debug: Removing unused variable encoded_tuple_buffer%7#0 debug: Not removing unused assignment since source is not marked as pure: let (other_routine_2%4#0: bytes, other_routine_2%5#0: bytes) = test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.other_routine_2(tmp%11#0) @@ -4957,6 +5016,49 @@ debug: Optimizer: Remove Linear Jump debug: Optimizer: Remove Empty Blocks debug: Optimizer: Remove Unreachable Blocks debug: Optimizer: Repeated Expression Elimination +debug: Optimizing subroutine test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.other_routine_3 +debug: Splitting parallel copies prior to optimization +debug: Optimizer: Constant Replacer +debug: Optimizer: Copy Propagation +debug: Found equivalence set: arrays.0#0, array#0 +debug: Replacing {array#0} with arrays.0#0 made 1 modifications +debug: Found equivalence set: updated_target%0#0, array#4 +debug: Replacing {updated_target%0#0} with array#4 made 1 modifications +debug: Found equivalence set: arrays.1#0, array#1 +debug: Replacing {array#1} with arrays.1#0 made 1 modifications +debug: Found equivalence set: arrays.2#0, array#2 +debug: Replacing {array#2} with arrays.2#0 made 1 modifications +debug: Found equivalence set: updated_target%1#0, arrays.0#2 +debug: Replacing {updated_target%1#0} with arrays.0#2 made 1 modifications +debug: Found equivalence set: updated_target%2#0, arrays.1#2 +debug: Replacing {updated_target%2#0} with arrays.1#2 made 1 modifications +debug: Found equivalence set: updated_target%3#0, arrays.2#2 +debug: Replacing {updated_target%3#0} with arrays.2#2 made 1 modifications +debug: Optimizer: Intrinsic Simplifier +debug: Simplified (replace3 array#3 0u 0x63) to ((replace2 0) array#3 0x63) +debug: Simplified (replace3 arrays.0#0 0u 0x63) to ((replace2 0) arrays.0#0 0x63) +debug: Simplified (replace3 arrays.1#0 0u 0x63) to ((replace2 0) arrays.1#0 0x63) +debug: Simplified (replace3 arrays.2#0 0u 0x63) to ((replace2 0) arrays.2#0 0x63) +debug: Optimizer: Remove Unused Variables +debug: Removing unused variable assigned_value%0#0 +debug: Removing unused variable array#4 +debug: Removing unused variable assigned_value%1#0 +debug: Removing unused variable assigned_value%2#0 +debug: Removing unused variable assigned_value%3#0 +debug: Optimizer: Inner Txn Field Replacer +debug: Optimizer: Simplify Control Ops +debug: Optimizer: Remove Linear Jump +debug: Replaced predecessor block@1: // for_header_0_L103 with block@0: // L101 in block@4: // for_body_L103 +debug: Merged linear block@1: // for_header_0_L103 into block@0: // L101 +debug: Replaced predecessor block@5: // for_footer_L103 with block@4: // for_body_L103 in block@2: // for_header_1_L103 +debug: Replaced predecessor block@5: // for_footer_L103 with block@4: // for_body_L103 in block@3: // for_header_2_L103 +debug: Replaced predecessor block@5: // for_footer_L103 with block@4: // for_body_L103 in block@6: // after_for_L103 +debug: Merged linear block@5: // for_footer_L103 into block@4: // for_body_L103 +debug: Optimizer: Remove Empty Blocks +debug: Not removing empty block block@2: // for_header_1_L103 because it's used by phi nodes +debug: Not removing empty block block@3: // for_header_2_L103 because it's used by phi nodes +debug: Optimizer: Remove Unreachable Blocks +debug: Optimizer: Repeated Expression Elimination debug: Optimizing subroutine test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.clear_state_program debug: Splitting parallel copies prior to optimization debug: Optimizer: Constant Replacer @@ -5023,6 +5125,7 @@ debug: Removing unused variable length%3#0 debug: Removing unused variable as_bytes%5#0 debug: Removing unused variable item_offset%4#0 debug: Removing unused variable item_offset%5#0 +debug: Not removing unused assignment since source is not marked as pure: let (other_routine_3%0#0: bytes, other_routine_3%1#0: bytes, other_routine_3%2#0: bytes) = test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.other_routine_3(my_array#2, my_array_copy_2#3, my_array_copy_2#3) debug: Not removing unused assignment since source is not marked as pure: let (other_routine_2%4#0: bytes, other_routine_2%5#0: bytes) = test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.other_routine_2(tmp%11#0) debug: Optimizer: Inner Txn Field Replacer debug: Optimizer: Simplify Control Ops @@ -5055,6 +5158,20 @@ debug: Optimizer: Remove Linear Jump debug: Optimizer: Remove Empty Blocks debug: Optimizer: Remove Unreachable Blocks debug: Optimizer: Repeated Expression Elimination +debug: Optimizing subroutine test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.other_routine_3 +debug: Optimizer: Constant Replacer +debug: Optimizer: Copy Propagation +debug: Optimizer: Intrinsic Simplifier +debug: Optimizer: Remove Unused Variables +debug: Removing unused variable array#3 +debug: Optimizer: Inner Txn Field Replacer +debug: Optimizer: Simplify Control Ops +debug: Optimizer: Remove Linear Jump +debug: Optimizer: Remove Empty Blocks +debug: Not removing empty block block@2: // for_header_1_L103 because it's used by phi nodes +debug: Not removing empty block block@3: // for_header_2_L103 because it's used by phi nodes +debug: Optimizer: Remove Unreachable Blocks +debug: Optimizer: Repeated Expression Elimination debug: Optimizing subroutine test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.clear_state_program debug: Optimizer: Constant Replacer debug: Optimizer: Copy Propagation @@ -5097,6 +5214,7 @@ debug: Removing unused variable encoded_tuple_buffer%2#0 debug: Removing unused variable length_uint16%2#0 debug: Not removing unused assignment since source is not marked as pure: let (other_routine%4#0: bool, other_routine%5#0: bool, other_routine%6#0: bytes, other_routine%7#0: bytes) = test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.other_routine(my_array#0, my_struct#0) debug: Removing unused variable length_uint16%3#0 +debug: Not removing unused assignment since source is not marked as pure: let (other_routine_3%0#0: bytes, other_routine_3%1#0: bytes, other_routine_3%2#0: bytes) = test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.other_routine_3(my_array#2, my_array_copy_2#3, my_array_copy_2#3) debug: Not removing unused assignment since source is not marked as pure: let (other_routine_2%4#0: bytes, other_routine_2%5#0: bytes) = test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.other_routine_2(tmp%11#0) debug: Optimizer: Inner Txn Field Replacer debug: Optimizer: Simplify Control Ops @@ -5128,6 +5246,19 @@ debug: Optimizer: Remove Linear Jump debug: Optimizer: Remove Empty Blocks debug: Optimizer: Remove Unreachable Blocks debug: Optimizer: Repeated Expression Elimination +debug: Optimizing subroutine test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.other_routine_3 +debug: Optimizer: Constant Replacer +debug: Optimizer: Copy Propagation +debug: Optimizer: Intrinsic Simplifier +debug: Optimizer: Remove Unused Variables +debug: Optimizer: Inner Txn Field Replacer +debug: Optimizer: Simplify Control Ops +debug: Optimizer: Remove Linear Jump +debug: Optimizer: Remove Empty Blocks +debug: Not removing empty block block@2: // for_header_1_L103 because it's used by phi nodes +debug: Not removing empty block block@3: // for_header_2_L103 because it's used by phi nodes +debug: Optimizer: Remove Unreachable Blocks +debug: Optimizer: Repeated Expression Elimination debug: Optimizing subroutine test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.clear_state_program debug: Optimizer: Constant Replacer debug: Optimizer: Copy Propagation @@ -5166,6 +5297,7 @@ debug: Removing unused variable encoded_tuple_buffer%3#0 debug: Removing unused variable encoded_value%2#0 debug: Not removing unused assignment since source is not marked as pure: let (other_routine%4#0: bool, other_routine%5#0: bool, other_routine%6#0: bytes, other_routine%7#0: bytes) = test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.other_routine(my_array#0, my_struct#0) debug: Removing unused variable encoded_value%3#0 +debug: Not removing unused assignment since source is not marked as pure: let (other_routine_3%0#0: bytes, other_routine_3%1#0: bytes, other_routine_3%2#0: bytes) = test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.other_routine_3(my_array#2, my_array_copy_2#3, my_array_copy_2#3) debug: Not removing unused assignment since source is not marked as pure: let (other_routine_2%4#0: bytes, other_routine_2%5#0: bytes) = test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.other_routine_2(tmp%11#0) debug: Optimizer: Inner Txn Field Replacer debug: Optimizer: Simplify Control Ops @@ -5197,6 +5329,19 @@ debug: Optimizer: Remove Linear Jump debug: Optimizer: Remove Empty Blocks debug: Optimizer: Remove Unreachable Blocks debug: Optimizer: Repeated Expression Elimination +debug: Optimizing subroutine test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.other_routine_3 +debug: Optimizer: Constant Replacer +debug: Optimizer: Copy Propagation +debug: Optimizer: Intrinsic Simplifier +debug: Optimizer: Remove Unused Variables +debug: Optimizer: Inner Txn Field Replacer +debug: Optimizer: Simplify Control Ops +debug: Optimizer: Remove Linear Jump +debug: Optimizer: Remove Empty Blocks +debug: Not removing empty block block@2: // for_header_1_L103 because it's used by phi nodes +debug: Not removing empty block block@3: // for_header_2_L103 because it's used by phi nodes +debug: Optimizer: Remove Unreachable Blocks +debug: Optimizer: Repeated Expression Elimination debug: Optimizing subroutine test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.clear_state_program debug: Optimizer: Constant Replacer debug: Optimizer: Copy Propagation @@ -5232,6 +5377,7 @@ debug: Optimizer: Remove Unused Variables debug: Removing unused variable my_array#0 debug: Removing unused variable data_length%0#0 debug: Not removing unused assignment since source is not marked as pure: let (other_routine%4#0: bool, other_routine%5#0: bool, other_routine%6#0: bytes, other_routine%7#0: bytes) = test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.other_routine(0x01020304, my_struct#0) +debug: Not removing unused assignment since source is not marked as pure: let (other_routine_3%0#0: bytes, other_routine_3%1#0: bytes, other_routine_3%2#0: bytes) = test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.other_routine_3(my_array#2, my_array_copy_2#3, my_array_copy_2#3) debug: Not removing unused assignment since source is not marked as pure: let (other_routine_2%4#0: bytes, other_routine_2%5#0: bytes) = test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.other_routine_2(tmp%11#0) debug: Optimizer: Inner Txn Field Replacer debug: Optimizer: Simplify Control Ops @@ -5262,6 +5408,19 @@ debug: Optimizer: Remove Linear Jump debug: Optimizer: Remove Empty Blocks debug: Optimizer: Remove Unreachable Blocks debug: Optimizer: Repeated Expression Elimination +debug: Optimizing subroutine test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.other_routine_3 +debug: Optimizer: Constant Replacer +debug: Optimizer: Copy Propagation +debug: Optimizer: Intrinsic Simplifier +debug: Optimizer: Remove Unused Variables +debug: Optimizer: Inner Txn Field Replacer +debug: Optimizer: Simplify Control Ops +debug: Optimizer: Remove Linear Jump +debug: Optimizer: Remove Empty Blocks +debug: Not removing empty block block@2: // for_header_1_L103 because it's used by phi nodes +debug: Not removing empty block block@3: // for_header_2_L103 because it's used by phi nodes +debug: Optimizer: Remove Unreachable Blocks +debug: Optimizer: Repeated Expression Elimination debug: Optimizing subroutine test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.clear_state_program debug: Optimizer: Constant Replacer debug: Optimizer: Copy Propagation @@ -5299,6 +5458,7 @@ debug: Removing unused variable as_bytes%3#0 debug: Removing unused variable reinterpret_biguint%0#0 debug: Not removing unused assignment since source is not marked as pure: let (other_routine%4#0: bool, other_routine%5#0: bool, other_routine%6#0: bytes, other_routine%7#0: bytes) = test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.other_routine(0x01020304, my_struct#0) debug: Removing unused variable reinterpret_biguint%6#0 +debug: Not removing unused assignment since source is not marked as pure: let (other_routine_3%0#0: bytes, other_routine_3%1#0: bytes, other_routine_3%2#0: bytes) = test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.other_routine_3(my_array#2, my_array_copy_2#3, my_array_copy_2#3) debug: Not removing unused assignment since source is not marked as pure: let (other_routine_2%4#0: bytes, other_routine_2%5#0: bytes) = test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.other_routine_2(tmp%11#0) debug: Optimizer: Inner Txn Field Replacer debug: Optimizer: Simplify Control Ops @@ -5328,6 +5488,19 @@ debug: Optimizer: Remove Linear Jump debug: Optimizer: Remove Empty Blocks debug: Optimizer: Remove Unreachable Blocks debug: Optimizer: Repeated Expression Elimination +debug: Optimizing subroutine test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.other_routine_3 +debug: Optimizer: Constant Replacer +debug: Optimizer: Copy Propagation +debug: Optimizer: Intrinsic Simplifier +debug: Optimizer: Remove Unused Variables +debug: Optimizer: Inner Txn Field Replacer +debug: Optimizer: Simplify Control Ops +debug: Optimizer: Remove Linear Jump +debug: Optimizer: Remove Empty Blocks +debug: Not removing empty block block@2: // for_header_1_L103 because it's used by phi nodes +debug: Not removing empty block block@3: // for_header_2_L103 because it's used by phi nodes +debug: Optimizer: Remove Unreachable Blocks +debug: Optimizer: Repeated Expression Elimination debug: Optimizing subroutine test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.clear_state_program debug: Optimizer: Constant Replacer debug: Optimizer: Copy Propagation @@ -5362,6 +5535,7 @@ debug: Removing unused variable offset_as_uint16%1#0 debug: Removing unused variable tmp%0#0 debug: Not removing unused assignment since source is not marked as pure: let (other_routine%4#0: bool, other_routine%5#0: bool, other_routine%6#0: bytes, other_routine%7#0: bytes) = test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.other_routine(0x01020304, my_struct#0) debug: Removing unused variable tmp%6#0 +debug: Not removing unused assignment since source is not marked as pure: let (other_routine_3%0#0: bytes, other_routine_3%1#0: bytes, other_routine_3%2#0: bytes) = test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.other_routine_3(my_array#2, my_array_copy_2#3, my_array_copy_2#3) debug: Not removing unused assignment since source is not marked as pure: let (other_routine_2%4#0: bytes, other_routine_2%5#0: bytes) = test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.other_routine_2(tmp%11#0) debug: Optimizer: Inner Txn Field Replacer debug: Optimizer: Simplify Control Ops @@ -5391,6 +5565,19 @@ debug: Optimizer: Remove Linear Jump debug: Optimizer: Remove Empty Blocks debug: Optimizer: Remove Unreachable Blocks debug: Optimizer: Repeated Expression Elimination +debug: Optimizing subroutine test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.other_routine_3 +debug: Optimizer: Constant Replacer +debug: Optimizer: Copy Propagation +debug: Optimizer: Intrinsic Simplifier +debug: Optimizer: Remove Unused Variables +debug: Optimizer: Inner Txn Field Replacer +debug: Optimizer: Simplify Control Ops +debug: Optimizer: Remove Linear Jump +debug: Optimizer: Remove Empty Blocks +debug: Not removing empty block block@2: // for_header_1_L103 because it's used by phi nodes +debug: Not removing empty block block@3: // for_header_2_L103 because it's used by phi nodes +debug: Optimizer: Remove Unreachable Blocks +debug: Optimizer: Repeated Expression Elimination debug: Optimizing subroutine test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.clear_state_program debug: Optimizer: Constant Replacer debug: Optimizer: Copy Propagation @@ -5423,6 +5610,7 @@ debug: Simplified (concat 0x80320006000d 0x00054861707079) to 0x80320006000d0005 debug: Optimizer: Remove Unused Variables debug: Removing unused variable encoded_tuple_buffer%4#0 debug: Not removing unused assignment since source is not marked as pure: let (other_routine%4#0: bool, other_routine%5#0: bool, other_routine%6#0: bytes, other_routine%7#0: bytes) = test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.other_routine(0x01020304, my_struct#0) +debug: Not removing unused assignment since source is not marked as pure: let (other_routine_3%0#0: bytes, other_routine_3%1#0: bytes, other_routine_3%2#0: bytes) = test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.other_routine_3(my_array#2, my_array_copy_2#3, my_array_copy_2#3) debug: Not removing unused assignment since source is not marked as pure: let (other_routine_2%4#0: bytes, other_routine_2%5#0: bytes) = test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.other_routine_2(tmp%11#0) debug: Optimizer: Inner Txn Field Replacer debug: Optimizer: Simplify Control Ops @@ -5452,6 +5640,19 @@ debug: Optimizer: Remove Linear Jump debug: Optimizer: Remove Empty Blocks debug: Optimizer: Remove Unreachable Blocks debug: Optimizer: Repeated Expression Elimination +debug: Optimizing subroutine test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.other_routine_3 +debug: Optimizer: Constant Replacer +debug: Optimizer: Copy Propagation +debug: Optimizer: Intrinsic Simplifier +debug: Optimizer: Remove Unused Variables +debug: Optimizer: Inner Txn Field Replacer +debug: Optimizer: Simplify Control Ops +debug: Optimizer: Remove Linear Jump +debug: Optimizer: Remove Empty Blocks +debug: Not removing empty block block@2: // for_header_1_L103 because it's used by phi nodes +debug: Not removing empty block block@3: // for_header_2_L103 because it's used by phi nodes +debug: Optimizer: Remove Unreachable Blocks +debug: Optimizer: Repeated Expression Elimination debug: Optimizing subroutine test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.clear_state_program debug: Optimizer: Constant Replacer debug: Optimizer: Copy Propagation @@ -5484,6 +5685,7 @@ debug: Simplified (concat 0x80320006000d00054861707079 0x000444617973) to 0x8032 debug: Optimizer: Remove Unused Variables debug: Removing unused variable encoded_tuple_buffer%5#0 debug: Not removing unused assignment since source is not marked as pure: let (other_routine%4#0: bool, other_routine%5#0: bool, other_routine%6#0: bytes, other_routine%7#0: bytes) = test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.other_routine(0x01020304, my_struct#0) +debug: Not removing unused assignment since source is not marked as pure: let (other_routine_3%0#0: bytes, other_routine_3%1#0: bytes, other_routine_3%2#0: bytes) = test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.other_routine_3(my_array#2, my_array_copy_2#3, my_array_copy_2#3) debug: Not removing unused assignment since source is not marked as pure: let (other_routine_2%4#0: bytes, other_routine_2%5#0: bytes) = test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.other_routine_2(tmp%11#0) debug: Optimizer: Inner Txn Field Replacer debug: Optimizer: Simplify Control Ops @@ -5513,6 +5715,19 @@ debug: Optimizer: Remove Linear Jump debug: Optimizer: Remove Empty Blocks debug: Optimizer: Remove Unreachable Blocks debug: Optimizer: Repeated Expression Elimination +debug: Optimizing subroutine test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.other_routine_3 +debug: Optimizer: Constant Replacer +debug: Optimizer: Copy Propagation +debug: Optimizer: Intrinsic Simplifier +debug: Optimizer: Remove Unused Variables +debug: Optimizer: Inner Txn Field Replacer +debug: Optimizer: Simplify Control Ops +debug: Optimizer: Remove Linear Jump +debug: Optimizer: Remove Empty Blocks +debug: Not removing empty block block@2: // for_header_1_L103 because it's used by phi nodes +debug: Not removing empty block block@3: // for_header_2_L103 because it's used by phi nodes +debug: Optimizer: Remove Unreachable Blocks +debug: Optimizer: Repeated Expression Elimination debug: Optimizing subroutine test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.clear_state_program debug: Optimizer: Constant Replacer debug: Optimizer: Copy Propagation @@ -5546,6 +5761,7 @@ debug: Simplified (extract_uint16 0x80320006000d00054861707079000444617973 4u) t debug: Optimizer: Remove Unused Variables debug: Removing unused variable my_struct#0 debug: Not removing unused assignment since source is not marked as pure: let (other_routine%4#0: bool, other_routine%5#0: bool, other_routine%6#0: bytes, other_routine%7#0: bytes) = test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.other_routine(0x01020304, 0x80320006000d00054861707079000444617973) +debug: Not removing unused assignment since source is not marked as pure: let (other_routine_3%0#0: bytes, other_routine_3%1#0: bytes, other_routine_3%2#0: bytes) = test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.other_routine_3(my_array#2, my_array_copy_2#3, my_array_copy_2#3) debug: Not removing unused assignment since source is not marked as pure: let (other_routine_2%4#0: bytes, other_routine_2%5#0: bytes) = test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.other_routine_2(tmp%11#0) debug: Optimizer: Inner Txn Field Replacer debug: Optimizer: Simplify Control Ops @@ -5575,6 +5791,19 @@ debug: Optimizer: Remove Linear Jump debug: Optimizer: Remove Empty Blocks debug: Optimizer: Remove Unreachable Blocks debug: Optimizer: Repeated Expression Elimination +debug: Optimizing subroutine test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.other_routine_3 +debug: Optimizer: Constant Replacer +debug: Optimizer: Copy Propagation +debug: Optimizer: Intrinsic Simplifier +debug: Optimizer: Remove Unused Variables +debug: Optimizer: Inner Txn Field Replacer +debug: Optimizer: Simplify Control Ops +debug: Optimizer: Remove Linear Jump +debug: Optimizer: Remove Empty Blocks +debug: Not removing empty block block@2: // for_header_1_L103 because it's used by phi nodes +debug: Not removing empty block block@3: // for_header_2_L103 because it's used by phi nodes +debug: Optimizer: Remove Unreachable Blocks +debug: Optimizer: Repeated Expression Elimination debug: Optimizing subroutine test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.clear_state_program debug: Optimizer: Constant Replacer debug: Optimizer: Copy Propagation @@ -5608,6 +5837,7 @@ debug: Optimizer: Remove Unused Variables debug: Not removing unused assignment since source is not marked as pure: let (other_routine%4#0: bool, other_routine%5#0: bool, other_routine%6#0: bytes, other_routine%7#0: bytes) = test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.other_routine(0x01020304, 0x80320006000d00054861707079000444617973) debug: Removing unused variable item_start_offset%1#0 debug: Removing unused variable item_end_offset%1#0 +debug: Not removing unused assignment since source is not marked as pure: let (other_routine_3%0#0: bytes, other_routine_3%1#0: bytes, other_routine_3%2#0: bytes) = test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.other_routine_3(my_array#2, my_array_copy_2#3, my_array_copy_2#3) debug: Not removing unused assignment since source is not marked as pure: let (other_routine_2%4#0: bytes, other_routine_2%5#0: bytes) = test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.other_routine_2(tmp%11#0) debug: Optimizer: Inner Txn Field Replacer debug: Optimizer: Simplify Control Ops @@ -5637,6 +5867,19 @@ debug: Optimizer: Remove Linear Jump debug: Optimizer: Remove Empty Blocks debug: Optimizer: Remove Unreachable Blocks debug: Optimizer: Repeated Expression Elimination +debug: Optimizing subroutine test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.other_routine_3 +debug: Optimizer: Constant Replacer +debug: Optimizer: Copy Propagation +debug: Optimizer: Intrinsic Simplifier +debug: Optimizer: Remove Unused Variables +debug: Optimizer: Inner Txn Field Replacer +debug: Optimizer: Simplify Control Ops +debug: Optimizer: Remove Linear Jump +debug: Optimizer: Remove Empty Blocks +debug: Not removing empty block block@2: // for_header_1_L103 because it's used by phi nodes +debug: Not removing empty block block@3: // for_header_2_L103 because it's used by phi nodes +debug: Optimizer: Remove Unreachable Blocks +debug: Optimizer: Repeated Expression Elimination debug: Optimizing subroutine test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.clear_state_program debug: Optimizer: Constant Replacer debug: Optimizer: Copy Propagation @@ -5669,6 +5912,7 @@ debug: Simplified (== 0x00054861707079 0x00054861707079) to 1u debug: Optimizer: Remove Unused Variables debug: Not removing unused assignment since source is not marked as pure: let (other_routine%4#0: bool, other_routine%5#0: bool, other_routine%6#0: bytes, other_routine%7#0: bytes) = test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.other_routine(0x01020304, 0x80320006000d00054861707079000444617973) debug: Removing unused variable tmp%7#0 +debug: Not removing unused assignment since source is not marked as pure: let (other_routine_3%0#0: bytes, other_routine_3%1#0: bytes, other_routine_3%2#0: bytes) = test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.other_routine_3(my_array#2, my_array_copy_2#3, my_array_copy_2#3) debug: Not removing unused assignment since source is not marked as pure: let (other_routine_2%4#0: bytes, other_routine_2%5#0: bytes) = test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.other_routine_2(tmp%11#0) debug: Optimizer: Inner Txn Field Replacer debug: Optimizer: Simplify Control Ops @@ -5698,6 +5942,19 @@ debug: Optimizer: Remove Linear Jump debug: Optimizer: Remove Empty Blocks debug: Optimizer: Remove Unreachable Blocks debug: Optimizer: Repeated Expression Elimination +debug: Optimizing subroutine test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.other_routine_3 +debug: Optimizer: Constant Replacer +debug: Optimizer: Copy Propagation +debug: Optimizer: Intrinsic Simplifier +debug: Optimizer: Remove Unused Variables +debug: Optimizer: Inner Txn Field Replacer +debug: Optimizer: Simplify Control Ops +debug: Optimizer: Remove Linear Jump +debug: Optimizer: Remove Empty Blocks +debug: Not removing empty block block@2: // for_header_1_L103 because it's used by phi nodes +debug: Not removing empty block block@3: // for_header_2_L103 because it's used by phi nodes +debug: Optimizer: Remove Unreachable Blocks +debug: Optimizer: Repeated Expression Elimination debug: Optimizing subroutine test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.clear_state_program debug: Optimizer: Constant Replacer debug: Optimizer: Copy Propagation @@ -5729,6 +5986,7 @@ debug: Optimizer: Intrinsic Simplifier debug: Optimizer: Remove Unused Variables debug: Not removing unused assignment since source is not marked as pure: let (other_routine%4#0: bool, other_routine%5#0: bool, other_routine%6#0: bytes, other_routine%7#0: bytes) = test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.other_routine(0x01020304, 0x80320006000d00054861707079000444617973) debug: Removing unused variable tmp%8#0 +debug: Not removing unused assignment since source is not marked as pure: let (other_routine_3%0#0: bytes, other_routine_3%1#0: bytes, other_routine_3%2#0: bytes) = test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.other_routine_3(my_array#2, my_array_copy_2#3, my_array_copy_2#3) debug: Not removing unused assignment since source is not marked as pure: let (other_routine_2%4#0: bytes, other_routine_2%5#0: bytes) = test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.other_routine_2(tmp%11#0) debug: Optimizer: Inner Txn Field Replacer debug: Optimizer: Simplify Control Ops @@ -5758,6 +6016,19 @@ debug: Optimizer: Remove Linear Jump debug: Optimizer: Remove Empty Blocks debug: Optimizer: Remove Unreachable Blocks debug: Optimizer: Repeated Expression Elimination +debug: Optimizing subroutine test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.other_routine_3 +debug: Optimizer: Constant Replacer +debug: Optimizer: Copy Propagation +debug: Optimizer: Intrinsic Simplifier +debug: Optimizer: Remove Unused Variables +debug: Optimizer: Inner Txn Field Replacer +debug: Optimizer: Simplify Control Ops +debug: Optimizer: Remove Linear Jump +debug: Optimizer: Remove Empty Blocks +debug: Not removing empty block block@2: // for_header_1_L103 because it's used by phi nodes +debug: Not removing empty block block@3: // for_header_2_L103 because it's used by phi nodes +debug: Optimizer: Remove Unreachable Blocks +debug: Optimizer: Repeated Expression Elimination debug: Optimizing subroutine test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.clear_state_program debug: Optimizer: Constant Replacer debug: Optimizer: Copy Propagation @@ -5788,6 +6059,7 @@ debug: Optimizer: Copy Propagation debug: Optimizer: Intrinsic Simplifier debug: Optimizer: Remove Unused Variables debug: Not removing unused assignment since source is not marked as pure: let (other_routine%4#0: bool, other_routine%5#0: bool, other_routine%6#0: bytes, other_routine%7#0: bytes) = test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.other_routine(0x01020304, 0x80320006000d00054861707079000444617973) +debug: Not removing unused assignment since source is not marked as pure: let (other_routine_3%0#0: bytes, other_routine_3%1#0: bytes, other_routine_3%2#0: bytes) = test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.other_routine_3(my_array#2, my_array_copy_2#3, my_array_copy_2#3) debug: Not removing unused assignment since source is not marked as pure: let (other_routine_2%4#0: bytes, other_routine_2%5#0: bytes) = test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.other_routine_2(tmp%11#0) debug: Optimizer: Inner Txn Field Replacer debug: Optimizer: Simplify Control Ops @@ -5817,6 +6089,19 @@ debug: Optimizer: Remove Linear Jump debug: Optimizer: Remove Empty Blocks debug: Optimizer: Remove Unreachable Blocks debug: Optimizer: Repeated Expression Elimination +debug: Optimizing subroutine test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.other_routine_3 +debug: Optimizer: Constant Replacer +debug: Optimizer: Copy Propagation +debug: Optimizer: Intrinsic Simplifier +debug: Optimizer: Remove Unused Variables +debug: Optimizer: Inner Txn Field Replacer +debug: Optimizer: Simplify Control Ops +debug: Optimizer: Remove Linear Jump +debug: Optimizer: Remove Empty Blocks +debug: Not removing empty block block@2: // for_header_1_L103 because it's used by phi nodes +debug: Not removing empty block block@3: // for_header_2_L103 because it's used by phi nodes +debug: Optimizer: Remove Unreachable Blocks +debug: Optimizer: Repeated Expression Elimination debug: Optimizing subroutine test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.clear_state_program debug: Optimizer: Constant Replacer debug: Optimizer: Copy Propagation @@ -5833,25 +6118,33 @@ debug: Removing Phis from test_cases.arc4_types.mutable_params.Arc4MutableParams debug: Removing Phis from test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.mutating_copies debug: Removing Phis from test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.other_routine debug: Removing Phis from test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.other_routine_2 +debug: Removing Phis from test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.other_routine_3 debug: Removing Phis from test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.clear_state_program debug: Coalescing local variables in test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.approval_program using strategy RootOperandGrouping debug: Coalescing resulted in 0 replacement/s debug: Coalescing local variables in test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.mutating_copies using strategy RootOperandGrouping debug: Coalescing my_array#1 with [my_array#2] debug: Coalescing my_array_copy_2#2 with [my_array_copy_2#3] -debug: Coalescing resulted in 5 replacement/s +debug: Coalescing resulted in 8 replacement/s debug: Coalescing local variables in test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.other_routine using strategy RootOperandGrouping debug: Coalescing array#0 with [array#1] debug: Coalescing struct#0 with [struct#1] debug: Coalescing resulted in 4 replacement/s debug: Coalescing local variables in test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.other_routine_2 using strategy RootOperandGrouping debug: Coalescing resulted in 0 replacement/s +debug: Coalescing local variables in test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.other_routine_3 using strategy RootOperandGrouping +debug: Coalescing arrays.0#0 with [arrays.0#2] +debug: Coalescing arrays.1#0 with [arrays.1#2] +debug: Coalescing arrays.2#0 with [arrays.2#2] +debug: Coalescing tuple_index%0#0 with [tuple_index%0#8, tuple_index%0#1] +debug: Coalescing resulted in 13 replacement/s debug: Coalescing local variables in test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.clear_state_program using strategy RootOperandGrouping debug: Coalescing resulted in 0 replacement/s debug: Sequentializing parallel copies in test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.approval_program debug: Sequentializing parallel copies in test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.mutating_copies debug: Sequentializing parallel copies in test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.other_routine debug: Sequentializing parallel copies in test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.other_routine_2 +debug: Sequentializing parallel copies in test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.other_routine_3 debug: Sequentializing parallel copies in test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.clear_state_program debug: Performing post-SSA optimizations debug: Output IR to arc4_types/out/Arc4MutableParamsContract.destructured.ir @@ -16284,8 +16577,10 @@ debug: Inserted mutating_copies_block@0.ops[93]: 'store reinterpret_biguint%10#0 debug: Replaced mutating_copies_block@0.ops[95]: 'load reinterpret_biguint%10#0' with 'load reinterpret_biguint%10#0 from l-stack (no copy)' debug: Inserted mutating_copies_block@0.ops[98]: 'store tmp%10#0 to l-stack (copy)' debug: Replaced mutating_copies_block@0.ops[100]: 'load tmp%10#0' with 'load tmp%10#0 from l-stack (no copy)' -debug: Inserted mutating_copies_block@0.ops[104]: 'store tmp%11#0 to l-stack (copy)' -debug: Replaced mutating_copies_block@0.ops[106]: 'load tmp%11#0' with 'load tmp%11#0 from l-stack (no copy)' +debug: Inserted mutating_copies_block@0.ops[104]: 'store my_array_copy_2#2 to l-stack (copy)' +debug: Replaced mutating_copies_block@0.ops[105]: 'load my_array_copy_2#2' with 'load my_array_copy_2#2 from l-stack (no copy)' +debug: Inserted mutating_copies_block@0.ops[112]: 'store tmp%11#0 to l-stack (copy)' +debug: Replaced mutating_copies_block@0.ops[114]: 'load tmp%11#0' with 'load tmp%11#0 from l-stack (no copy)' debug: Inserted mutating_copies_block@0.ops[89]: 'store my_array_copy_2#2 to l-stack (copy)' debug: Replaced mutating_copies_block@0.ops[92]: 'load my_array_copy_2#2' with 'load my_array_copy_2#2 from l-stack (no copy)' debug: Inserted mutating_copies_block@0.ops[50]: 'store item_end_offset%0#0 to l-stack (copy)' @@ -16298,16 +16593,20 @@ debug: Inserted mutating_copies_block@0.ops[50]: 'store my_struct#1 to l-stack ( debug: Replaced mutating_copies_block@0.ops[55]: 'load my_struct#1' with 'load my_struct#1 from l-stack (no copy)' debug: Inserted mutating_copies_block@0.ops[48]: 'store item_start_offset%0#0 to l-stack (copy)' debug: Replaced mutating_copies_block@0.ops[57]: 'load item_start_offset%0#0' with 'load item_start_offset%0#0 from l-stack (no copy)' +debug: Inserted mutating_copies_block@0.ops[109]: 'store my_array#1 to l-stack (copy)' +debug: Replaced mutating_copies_block@0.ops[117]: 'load my_array#1' with 'load my_array#1 from l-stack (no copy)' debug: Inserted mutating_copies_block@0.ops[6]: 'store my_array#1 to l-stack (copy)' debug: Replaced mutating_copies_block@0.ops[17]: 'load my_array#1' with 'load my_array#1 from l-stack (no copy)' debug: Inserted mutating_copies_block@0.ops[83]: 'store my_array_copy_2#2 to l-stack (copy)' debug: Replaced mutating_copies_block@0.ops[94]: 'load my_array_copy_2#2' with 'load my_array_copy_2#2 from l-stack (no copy)' debug: Inserted mutating_copies_block@0.ops[21]: 'store my_array#1 to l-stack (copy)' debug: Replaced mutating_copies_block@0.ops[35]: 'load my_array#1' with 'load my_array#1 from l-stack (no copy)' +debug: Inserted mutating_copies_block@0.ops[101]: 'store my_array_copy_2#2 to l-stack (copy)' +debug: Replaced mutating_copies_block@0.ops[114]: 'load my_array_copy_2#2' with 'load my_array_copy_2#2 from l-stack (no copy)' debug: Inserted mutating_copies_block@0.ops[20]: 'store my_struct#1 to l-stack (copy)' debug: Replaced mutating_copies_block@0.ops[47]: 'load my_struct#1' with 'load my_struct#1 from l-stack (no copy)' debug: Inserted mutating_copies_block@0.ops[37]: 'store my_array#1 to l-stack (copy)' -debug: Replaced mutating_copies_block@0.ops[113]: 'load my_array#1' with 'load my_array#1 from l-stack (no copy)' +debug: Replaced mutating_copies_block@0.ops[114]: 'load my_array#1' with 'load my_array#1 from l-stack (no copy)' debug: Inserted other_routine_block@0.ops[28]: 'store updated_data%0#0 to l-stack (copy)' debug: Replaced other_routine_block@0.ops[30]: 'load updated_data%0#0' with 'load updated_data%0#0 from l-stack (no copy)' debug: Inserted other_routine_block@0.ops[41]: 'store tail_offset%0#0 to l-stack (copy)' @@ -16342,6 +16641,15 @@ debug: Inserted other_routine_block@0.ops[12]: 'store item_offset%0#0 to l-stack debug: Replaced other_routine_block@0.ops[43]: 'load item_offset%0#0' with 'load item_offset%0#0 from l-stack (no copy)' debug: Inserted other_routine_2_block@0.ops[3]: 'store array#1 to l-stack (copy)' debug: Replaced other_routine_2_block@0.ops[6]: 'load array#1' with 'load array#1 from l-stack (no copy)' +debug: Inserted other_routine_3_for_body@4.ops[1]: 'store tuple_index%0#0 to l-stack (copy)' +debug: Replaced other_routine_3_for_body@4.ops[5]: 'load tuple_index%0#0' with 'load tuple_index%0#0 from l-stack (no copy)' +debug: Found 2 edge set/s for test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.other_routine_3 +debug: Allocated 1 variable/s to x-stack: tuple_index%0#0 +debug: shared x-stack for other_routine_3_block@0 -> other_routine_3_for_body@4: tuple_index%0#0 +debug: shared x-stack for other_routine_3_for_header_1@2 -> other_routine_3_for_body@4: tuple_index%0#0 +debug: shared x-stack for other_routine_3_for_header_2@3 -> other_routine_3_for_body@4: tuple_index%0#0 +debug: test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.other_routine_3 f-stack entry: ['tuple_index%0#4'] +debug: test_cases.arc4_types.mutable_params.Arc4MutableParamsContract.other_routine_3 f-stack on first store: [] debug: Inserted dynamic_array_fixed_size_block@0.ops[4]: 'store popped#0 to l-stack (copy)' debug: Replaced dynamic_array_fixed_size_block@0.ops[6]: 'load popped#0' with 'load popped#0 from l-stack (no copy)' debug: Inserted dynamic_array_fixed_size_block@0.ops[9]: 'store tmp%3#0 to l-stack (copy)' diff --git a/test_cases/tuple_support/out/TupleSupport.approval.mir b/test_cases/tuple_support/out/TupleSupport.approval.mir index a46273c81d..240f1e5f3d 100644 --- a/test_cases/tuple_support/out/TupleSupport.approval.mir +++ b/test_cases/tuple_support/out/TupleSupport.approval.mir @@ -89,18 +89,19 @@ main_entrypoint@2: int 7 // 1,2,3,4,5,6,7 UInt64(7) tuple_support/tuple_support.py:50 int 8 // 1,2,3,4,5,6,7,8 UInt64(8) tuple_support/tuple_support.py:51 callsub slicing // slicing(\n(\nUInt64(1),\nUInt64(2),\nUInt64(3),\nUInt64(4),\nUInt64(5),\nUInt64(6),\nUInt64(7),\n... tuple_support/tuple_support.py:42-53 - int 3 // 3 a + b tuple_support/tuple_support.py:54 - return // return a + b tuple_support/tuple_support.py:54 + callsub bin_ops // bin_ops() tuple_support/tuple_support.py:54 + int 3 // 3 a + b tuple_support/tuple_support.py:55 + return // return a + b tuple_support/tuple_support.py:55 // test_cases.tuple_support.tuple_support.add_three_values(values.0: uint64, values.1: uint64, values.2: uint64) -> uint64: add_three_values: - proto 3 1 // (𝕡) values.0#0,values.1#0,values.2#0 | @subroutine\ndef add_three_values(values: tuple[UInt64, UInt64, UInt64]) -> UInt64: tuple_support/tuple_support.py:76-77 + proto 3 1 // (𝕡) values.0#0,values.1#0,values.2#0 | @subroutine\ndef add_three_values(values: tuple[UInt64, UInt64, UInt64]) -> UInt64: tuple_support/tuple_support.py:90-91 byte "" // allocate 1 to stack (𝕡) values.0#0,values.1#0,values.2#0 | (𝕗) tuple_index%0#4 | add_three_values_block@0: - int 0 // (𝕡) values.0#0,values.1#0,values.2#0 | (𝕗) tuple_index%0#4 | 0 UInt64(0) tuple_support/tuple_support.py:78 - // virtual: store total#0 to f-stack (𝕡) values.0#0,values.1#0,values.2#0 | (𝕗) tuple_index%0#4,total#0 | total = UInt64(0) tuple_support/tuple_support.py:78 + int 0 // (𝕡) values.0#0,values.1#0,values.2#0 | (𝕗) tuple_index%0#4 | 0 UInt64(0) tuple_support/tuple_support.py:92 + // virtual: store total#0 to f-stack (𝕡) values.0#0,values.1#0,values.2#0 | (𝕗) tuple_index%0#4,total#0 | total = UInt64(0) tuple_support/tuple_support.py:92 int 0 // (𝕡) values.0#0,values.1#0,values.2#0 | (𝕗) tuple_index%0#4,total#0 | 0 // virtual: store tuple_index%0#0 to x-stack (no copy) (𝕡) values.0#0,values.1#0,values.2#0 | (𝕗) tuple_index%0#4,total#0 | (𝕏) tuple_index%0#0 | frame_dig -3 // load values.0#0 from parameters (𝕡) values.0#0,values.1#0,values.2#0 | (𝕗) tuple_index%0#4,total#0 | (𝕏) tuple_index%0#0 | values.0#0 @@ -122,165 +123,173 @@ add_three_values_for_header_2@3: // Implicit fall through to add_three_values_for_body@4 // (𝕡) values.0#0,values.1#0,values.2#0 | (𝕗) tuple_index%0#4,total#0 | (𝕏) value#3,tuple_index%0#0 | value#3, tuple_index%0#0 add_three_values_for_body@4: - frame_dig 1 // load total#0 from f-stack (𝕡) values.0#0,values.1#0,values.2#0 | (𝕗) tuple_index%0#4,total#0 | (𝕏) value#3,tuple_index%0#0 | total#0 value#3, tuple_index%0#0 total += value tuple_support/tuple_support.py:80 - uncover 2 // load value#3 from x-stack (𝕡) values.0#0,values.1#0,values.2#0 | (𝕗) tuple_index%0#4,total#0 | (𝕏) tuple_index%0#0 | total#0,value#3 total += value tuple_support/tuple_support.py:80 - + // (𝕡) values.0#0,values.1#0,values.2#0 | (𝕗) tuple_index%0#4,total#0 | (𝕏) tuple_index%0#0 | {+} total += value tuple_support/tuple_support.py:80 - dup // store total#0 to l-stack (copy) (𝕡) values.0#0,values.1#0,values.2#0 | (𝕗) tuple_index%0#4,total#0 | (𝕏) tuple_index%0#0 | total#0,total#0 total += value tuple_support/tuple_support.py:80 - frame_bury 1 // store total#0 to f-stack (𝕡) values.0#0,values.1#0,values.2#0 | (𝕗) tuple_index%0#4,total#0 | (𝕏) tuple_index%0#0 | total#0 total += value tuple_support/tuple_support.py:80 + frame_dig 1 // load total#0 from f-stack (𝕡) values.0#0,values.1#0,values.2#0 | (𝕗) tuple_index%0#4,total#0 | (𝕏) value#3,tuple_index%0#0 | total#0 value#3, tuple_index%0#0 total += value tuple_support/tuple_support.py:94 + uncover 2 // load value#3 from x-stack (𝕡) values.0#0,values.1#0,values.2#0 | (𝕗) tuple_index%0#4,total#0 | (𝕏) tuple_index%0#0 | total#0,value#3 total += value tuple_support/tuple_support.py:94 + + // (𝕡) values.0#0,values.1#0,values.2#0 | (𝕗) tuple_index%0#4,total#0 | (𝕏) tuple_index%0#0 | {+} total += value tuple_support/tuple_support.py:94 + dup // store total#0 to l-stack (copy) (𝕡) values.0#0,values.1#0,values.2#0 | (𝕗) tuple_index%0#4,total#0 | (𝕏) tuple_index%0#0 | total#0,total#0 total += value tuple_support/tuple_support.py:94 + frame_bury 1 // store total#0 to f-stack (𝕡) values.0#0,values.1#0,values.2#0 | (𝕗) tuple_index%0#4,total#0 | (𝕏) tuple_index%0#0 | total#0 total += value tuple_support/tuple_support.py:94 uncover 1 // load tuple_index%0#0 from x-stack (𝕡) values.0#0,values.1#0,values.2#0 | (𝕗) tuple_index%0#4,total#0 | total#0,tuple_index%0#0 dup // store tuple_index%0#0 to l-stack (copy) (𝕡) values.0#0,values.1#0,values.2#0 | (𝕗) tuple_index%0#4,total#0 | total#0,tuple_index%0#0,tuple_index%0#0 int 1 // (𝕡) values.0#0,values.1#0,values.2#0 | (𝕗) tuple_index%0#4,total#0 | total#0,tuple_index%0#0,tuple_index%0#0,1 + // (𝕡) values.0#0,values.1#0,values.2#0 | (𝕗) tuple_index%0#4,total#0 | total#0,tuple_index%0#0,{+} frame_bury 0 // store tuple_index%0#4 to f-stack (𝕡) values.0#0,values.1#0,values.2#0 | (𝕗) tuple_index%0#4,total#0 | total#0,tuple_index%0#0 - // virtual: load tuple_index%0#0 from l-stack (no copy) (𝕡) values.0#0,values.1#0,values.2#0 | (𝕗) tuple_index%0#4,total#0 | total#0,tuple_index%0#0 for value in values: tuple_support/tuple_support.py:79 - switch add_three_values_for_header_1@2 add_three_values_for_header_2@3 // (𝕡) values.0#0,values.1#0,values.2#0 | (𝕗) tuple_index%0#4,total#0 | total#0 for value in values: tuple_support/tuple_support.py:79 - // virtual: load total#0 from l-stack (no copy) (𝕡) values.0#0,values.1#0,values.2#0 | (𝕗) tuple_index%0#4,total#0 | total#0 for value in values: tuple_support/tuple_support.py:79 + // virtual: load tuple_index%0#0 from l-stack (no copy) (𝕡) values.0#0,values.1#0,values.2#0 | (𝕗) tuple_index%0#4,total#0 | total#0,tuple_index%0#0 for value in values: tuple_support/tuple_support.py:93 + switch add_three_values_for_header_1@2 add_three_values_for_header_2@3 // (𝕡) values.0#0,values.1#0,values.2#0 | (𝕗) tuple_index%0#4,total#0 | total#0 for value in values: tuple_support/tuple_support.py:93 + // virtual: load total#0 from l-stack (no copy) (𝕡) values.0#0,values.1#0,values.2#0 | (𝕗) tuple_index%0#4,total#0 | total#0 for value in values: tuple_support/tuple_support.py:93 frame_bury 0 - retsub // total#0 return total tuple_support/tuple_support.py:82 + retsub // total#0 return total tuple_support/tuple_support.py:96 // test_cases.tuple_support.tuple_support.bytes_combine(arg.0: bytes, arg.1: bytes) -> bytes: bytes_combine: - proto 2 1 // (𝕡) arg.0#0,arg.1#0 | @subroutine\ndef bytes_combine(arg: tuple[Bytes, Bytes]) -> Bytes: tuple_support/tuple_support.py:60-61 + proto 2 1 // (𝕡) arg.0#0,arg.1#0 | @subroutine\ndef bytes_combine(arg: tuple[Bytes, Bytes]) -> Bytes: tuple_support/tuple_support.py:74-75 bytes_combine_block@0: - frame_dig -2 // load arg.0#0 from parameters (𝕡) arg.0#0,arg.1#0 | arg.0#0 result = a + b tuple_support/tuple_support.py:63 - frame_dig -1 // load arg.1#0 from parameters (𝕡) arg.0#0,arg.1#0 | arg.0#0,arg.1#0 result = a + b tuple_support/tuple_support.py:63 - concat // (𝕡) arg.0#0,arg.1#0 | {concat} a + b tuple_support/tuple_support.py:63 - // virtual: store result#0 to l-stack (no copy) (𝕡) arg.0#0,arg.1#0 | result#0 result = a + b tuple_support/tuple_support.py:63 - // virtual: load result#0 from l-stack (no copy) (𝕡) arg.0#0,arg.1#0 | result#0 return result tuple_support/tuple_support.py:64 - retsub // result#0 return result tuple_support/tuple_support.py:64 + frame_dig -2 // load arg.0#0 from parameters (𝕡) arg.0#0,arg.1#0 | arg.0#0 result = a + b tuple_support/tuple_support.py:77 + frame_dig -1 // load arg.1#0 from parameters (𝕡) arg.0#0,arg.1#0 | arg.0#0,arg.1#0 result = a + b tuple_support/tuple_support.py:77 + concat // (𝕡) arg.0#0,arg.1#0 | {concat} a + b tuple_support/tuple_support.py:77 + // virtual: store result#0 to l-stack (no copy) (𝕡) arg.0#0,arg.1#0 | result#0 result = a + b tuple_support/tuple_support.py:77 + // virtual: load result#0 from l-stack (no copy) (𝕡) arg.0#0,arg.1#0 | result#0 return result tuple_support/tuple_support.py:78 + retsub // result#0 return result tuple_support/tuple_support.py:78 // test_cases.tuple_support.tuple_support.addw2(a.0: uint64, a.1: uint64, b.0: uint64, b.1: uint64) -> uint64, uint64, uint64: addw2: - proto 4 3 // (𝕡) a.0#0,a.1#0,b.0#0,b.1#0 | @subroutine\ndef addw2(a: tuple[UInt64, UInt64], b: tuple[UInt64, UInt64]) -> tuple[UInt64, UInt6... tuple_support/tuple_support.py:85-86 + proto 4 3 // (𝕡) a.0#0,a.1#0,b.0#0,b.1#0 | @subroutine\ndef addw2(a: tuple[UInt64, UInt64], b: tuple[UInt64, UInt64]) -> tuple[UInt64, UInt6... tuple_support/tuple_support.py:99-100 addw2_block@0: - frame_dig -3 // load a.1#0 from parameters (𝕡) a.0#0,a.1#0,b.0#0,b.1#0 | a.1#0 op.addw(a_lo, b_lo) tuple_support/tuple_support.py:89 - frame_dig -1 // load b.1#0 from parameters (𝕡) a.0#0,a.1#0,b.0#0,b.1#0 | a.1#0,b.1#0 op.addw(a_lo, b_lo) tuple_support/tuple_support.py:89 - addw // (𝕡) a.0#0,a.1#0,b.0#0,b.1#0 | {addw}.0,{addw}.1 op.addw(a_lo, b_lo) tuple_support/tuple_support.py:89 - cover 1 // store c_lo#0 to l-stack (no copy) (𝕡) a.0#0,a.1#0,b.0#0,b.1#0 | c_lo#0,{addw}.0 op.addw(a_lo, b_lo) tuple_support/tuple_support.py:89 - // virtual: store lo_carry#0 to l-stack (no copy) (𝕡) a.0#0,a.1#0,b.0#0,b.1#0 | c_lo#0,lo_carry#0 op.addw(a_lo, b_lo) tuple_support/tuple_support.py:89 - frame_dig -4 // load a.0#0 from parameters (𝕡) a.0#0,a.1#0,b.0#0,b.1#0 | c_lo#0,lo_carry#0,a.0#0 op.addw(a_hi, b_hi) tuple_support/tuple_support.py:90 - frame_dig -2 // load b.0#0 from parameters (𝕡) a.0#0,a.1#0,b.0#0,b.1#0 | c_lo#0,lo_carry#0,a.0#0,b.0#0 op.addw(a_hi, b_hi) tuple_support/tuple_support.py:90 - addw // (𝕡) a.0#0,a.1#0,b.0#0,b.1#0 | c_lo#0,lo_carry#0,{addw}.0,{addw}.1 op.addw(a_hi, b_hi) tuple_support/tuple_support.py:90 - // virtual: store c_mid#0 to l-stack (no copy) (𝕡) a.0#0,a.1#0,b.0#0,b.1#0 | c_lo#0,lo_carry#0,c_mid#0,{addw}.0 op.addw(a_hi, b_hi) tuple_support/tuple_support.py:90 - // virtual: store hi_carry1#0 to l-stack (no copy) (𝕡) a.0#0,a.1#0,b.0#0,b.1#0 | c_lo#0,lo_carry#0,hi_carry1#0,c_mid#0 op.addw(a_hi, b_hi) tuple_support/tuple_support.py:90 - // virtual: load c_mid#0 from l-stack (no copy) (𝕡) a.0#0,a.1#0,b.0#0,b.1#0 | c_lo#0,lo_carry#0,hi_carry1#0,c_mid#0 op.addw(c_mid, lo_carry) tuple_support/tuple_support.py:91 - uncover 2 // load lo_carry#0 from l-stack (no copy) (𝕡) a.0#0,a.1#0,b.0#0,b.1#0 | c_lo#0,hi_carry1#0,c_mid#0,lo_carry#0 op.addw(c_mid, lo_carry) tuple_support/tuple_support.py:91 - addw // (𝕡) a.0#0,a.1#0,b.0#0,b.1#0 | c_lo#0,hi_carry1#0,{addw}.0,{addw}.1 op.addw(c_mid, lo_carry) tuple_support/tuple_support.py:91 - cover 2 // store c_mid#0 to l-stack (no copy) (𝕡) a.0#0,a.1#0,b.0#0,b.1#0 | c_lo#0,c_mid#0,hi_carry1#0,{addw}.0 op.addw(c_mid, lo_carry) tuple_support/tuple_support.py:91 - // virtual: store hi_carry2#0 to l-stack (no copy) (𝕡) a.0#0,a.1#0,b.0#0,b.1#0 | c_lo#0,c_mid#0,hi_carry1#0,hi_carry2#0 op.addw(c_mid, lo_carry) tuple_support/tuple_support.py:91 - // virtual: load hi_carry1#0 from l-stack (no copy) (𝕡) a.0#0,a.1#0,b.0#0,b.1#0 | c_lo#0,c_mid#0,hi_carry2#0,hi_carry1#0 op.addw(hi_carry1, hi_carry2) tuple_support/tuple_support.py:92 - // virtual: load hi_carry2#0 from l-stack (no copy) (𝕡) a.0#0,a.1#0,b.0#0,b.1#0 | c_lo#0,c_mid#0,hi_carry1#0,hi_carry2#0 op.addw(hi_carry1, hi_carry2) tuple_support/tuple_support.py:92 - addw // (𝕡) a.0#0,a.1#0,b.0#0,b.1#0 | c_lo#0,c_mid#0,{addw}.0,{addw}.1 op.addw(hi_carry1, hi_carry2) tuple_support/tuple_support.py:92 - cover 1 // store c_hi#0 to l-stack (no copy) (𝕡) a.0#0,a.1#0,b.0#0,b.1#0 | c_lo#0,c_mid#0,c_hi#0,{addw}.0 op.addw(hi_carry1, hi_carry2) tuple_support/tuple_support.py:92 - // virtual: store did_overflow#0 to l-stack (no copy) (𝕡) a.0#0,a.1#0,b.0#0,b.1#0 | c_lo#0,c_mid#0,c_hi#0,did_overflow#0 op.addw(hi_carry1, hi_carry2) tuple_support/tuple_support.py:92 - // virtual: load did_overflow#0 from l-stack (no copy) (𝕡) a.0#0,a.1#0,b.0#0,b.1#0 | c_lo#0,c_mid#0,c_hi#0,did_overflow#0 not did_overflow tuple_support/tuple_support.py:93 - ! // (𝕡) a.0#0,a.1#0,b.0#0,b.1#0 | c_lo#0,c_mid#0,c_hi#0,{!} not did_overflow tuple_support/tuple_support.py:93 - // virtual: store tmp%0#0 to l-stack (no copy) (𝕡) a.0#0,a.1#0,b.0#0,b.1#0 | c_lo#0,c_mid#0,c_hi#0,tmp%0#0 not did_overflow tuple_support/tuple_support.py:93 - // virtual: load tmp%0#0 from l-stack (no copy) (𝕡) a.0#0,a.1#0,b.0#0,b.1#0 | c_lo#0,c_mid#0,c_hi#0,tmp%0#0 assert not did_overflow, "is such a thing even possible? 👽" tuple_support/tuple_support.py:93 - assert // is such a thing even possible? 👽 // (𝕡) a.0#0,a.1#0,b.0#0,b.1#0 | c_lo#0,c_mid#0,c_hi#0 assert not did_overflow, "is such a thing even possible? 👽" tuple_support/tuple_support.py:93 - // virtual: load c_hi#0 from l-stack (no copy) (𝕡) a.0#0,a.1#0,b.0#0,b.1#0 | c_lo#0,c_mid#0,c_hi#0 return c_hi, c_mid, c_lo tuple_support/tuple_support.py:94 - uncover 1 // load c_mid#0 from l-stack (no copy) (𝕡) a.0#0,a.1#0,b.0#0,b.1#0 | c_lo#0,c_hi#0,c_mid#0 return c_hi, c_mid, c_lo tuple_support/tuple_support.py:94 - uncover 2 // load c_lo#0 from l-stack (no copy) (𝕡) a.0#0,a.1#0,b.0#0,b.1#0 | c_hi#0,c_mid#0,c_lo#0 return c_hi, c_mid, c_lo tuple_support/tuple_support.py:94 - retsub // c_hi#0,c_mid#0,c_lo#0 return c_hi, c_mid, c_lo tuple_support/tuple_support.py:94 + frame_dig -3 // load a.1#0 from parameters (𝕡) a.0#0,a.1#0,b.0#0,b.1#0 | a.1#0 op.addw(a_lo, b_lo) tuple_support/tuple_support.py:103 + frame_dig -1 // load b.1#0 from parameters (𝕡) a.0#0,a.1#0,b.0#0,b.1#0 | a.1#0,b.1#0 op.addw(a_lo, b_lo) tuple_support/tuple_support.py:103 + addw // (𝕡) a.0#0,a.1#0,b.0#0,b.1#0 | {addw}.0,{addw}.1 op.addw(a_lo, b_lo) tuple_support/tuple_support.py:103 + cover 1 // store c_lo#0 to l-stack (no copy) (𝕡) a.0#0,a.1#0,b.0#0,b.1#0 | c_lo#0,{addw}.0 op.addw(a_lo, b_lo) tuple_support/tuple_support.py:103 + // virtual: store lo_carry#0 to l-stack (no copy) (𝕡) a.0#0,a.1#0,b.0#0,b.1#0 | c_lo#0,lo_carry#0 op.addw(a_lo, b_lo) tuple_support/tuple_support.py:103 + frame_dig -4 // load a.0#0 from parameters (𝕡) a.0#0,a.1#0,b.0#0,b.1#0 | c_lo#0,lo_carry#0,a.0#0 op.addw(a_hi, b_hi) tuple_support/tuple_support.py:104 + frame_dig -2 // load b.0#0 from parameters (𝕡) a.0#0,a.1#0,b.0#0,b.1#0 | c_lo#0,lo_carry#0,a.0#0,b.0#0 op.addw(a_hi, b_hi) tuple_support/tuple_support.py:104 + addw // (𝕡) a.0#0,a.1#0,b.0#0,b.1#0 | c_lo#0,lo_carry#0,{addw}.0,{addw}.1 op.addw(a_hi, b_hi) tuple_support/tuple_support.py:104 + // virtual: store c_mid#0 to l-stack (no copy) (𝕡) a.0#0,a.1#0,b.0#0,b.1#0 | c_lo#0,lo_carry#0,c_mid#0,{addw}.0 op.addw(a_hi, b_hi) tuple_support/tuple_support.py:104 + // virtual: store hi_carry1#0 to l-stack (no copy) (𝕡) a.0#0,a.1#0,b.0#0,b.1#0 | c_lo#0,lo_carry#0,hi_carry1#0,c_mid#0 op.addw(a_hi, b_hi) tuple_support/tuple_support.py:104 + // virtual: load c_mid#0 from l-stack (no copy) (𝕡) a.0#0,a.1#0,b.0#0,b.1#0 | c_lo#0,lo_carry#0,hi_carry1#0,c_mid#0 op.addw(c_mid, lo_carry) tuple_support/tuple_support.py:105 + uncover 2 // load lo_carry#0 from l-stack (no copy) (𝕡) a.0#0,a.1#0,b.0#0,b.1#0 | c_lo#0,hi_carry1#0,c_mid#0,lo_carry#0 op.addw(c_mid, lo_carry) tuple_support/tuple_support.py:105 + addw // (𝕡) a.0#0,a.1#0,b.0#0,b.1#0 | c_lo#0,hi_carry1#0,{addw}.0,{addw}.1 op.addw(c_mid, lo_carry) tuple_support/tuple_support.py:105 + cover 2 // store c_mid#0 to l-stack (no copy) (𝕡) a.0#0,a.1#0,b.0#0,b.1#0 | c_lo#0,c_mid#0,hi_carry1#0,{addw}.0 op.addw(c_mid, lo_carry) tuple_support/tuple_support.py:105 + // virtual: store hi_carry2#0 to l-stack (no copy) (𝕡) a.0#0,a.1#0,b.0#0,b.1#0 | c_lo#0,c_mid#0,hi_carry1#0,hi_carry2#0 op.addw(c_mid, lo_carry) tuple_support/tuple_support.py:105 + // virtual: load hi_carry1#0 from l-stack (no copy) (𝕡) a.0#0,a.1#0,b.0#0,b.1#0 | c_lo#0,c_mid#0,hi_carry2#0,hi_carry1#0 op.addw(hi_carry1, hi_carry2) tuple_support/tuple_support.py:106 + // virtual: load hi_carry2#0 from l-stack (no copy) (𝕡) a.0#0,a.1#0,b.0#0,b.1#0 | c_lo#0,c_mid#0,hi_carry1#0,hi_carry2#0 op.addw(hi_carry1, hi_carry2) tuple_support/tuple_support.py:106 + addw // (𝕡) a.0#0,a.1#0,b.0#0,b.1#0 | c_lo#0,c_mid#0,{addw}.0,{addw}.1 op.addw(hi_carry1, hi_carry2) tuple_support/tuple_support.py:106 + cover 1 // store c_hi#0 to l-stack (no copy) (𝕡) a.0#0,a.1#0,b.0#0,b.1#0 | c_lo#0,c_mid#0,c_hi#0,{addw}.0 op.addw(hi_carry1, hi_carry2) tuple_support/tuple_support.py:106 + // virtual: store did_overflow#0 to l-stack (no copy) (𝕡) a.0#0,a.1#0,b.0#0,b.1#0 | c_lo#0,c_mid#0,c_hi#0,did_overflow#0 op.addw(hi_carry1, hi_carry2) tuple_support/tuple_support.py:106 + // virtual: load did_overflow#0 from l-stack (no copy) (𝕡) a.0#0,a.1#0,b.0#0,b.1#0 | c_lo#0,c_mid#0,c_hi#0,did_overflow#0 not did_overflow tuple_support/tuple_support.py:107 + ! // (𝕡) a.0#0,a.1#0,b.0#0,b.1#0 | c_lo#0,c_mid#0,c_hi#0,{!} not did_overflow tuple_support/tuple_support.py:107 + // virtual: store tmp%0#0 to l-stack (no copy) (𝕡) a.0#0,a.1#0,b.0#0,b.1#0 | c_lo#0,c_mid#0,c_hi#0,tmp%0#0 not did_overflow tuple_support/tuple_support.py:107 + // virtual: load tmp%0#0 from l-stack (no copy) (𝕡) a.0#0,a.1#0,b.0#0,b.1#0 | c_lo#0,c_mid#0,c_hi#0,tmp%0#0 assert not did_overflow, "is such a thing even possible? 👽" tuple_support/tuple_support.py:107 + assert // is such a thing even possible? 👽 // (𝕡) a.0#0,a.1#0,b.0#0,b.1#0 | c_lo#0,c_mid#0,c_hi#0 assert not did_overflow, "is such a thing even possible? 👽" tuple_support/tuple_support.py:107 + // virtual: load c_hi#0 from l-stack (no copy) (𝕡) a.0#0,a.1#0,b.0#0,b.1#0 | c_lo#0,c_mid#0,c_hi#0 return c_hi, c_mid, c_lo tuple_support/tuple_support.py:108 + uncover 1 // load c_mid#0 from l-stack (no copy) (𝕡) a.0#0,a.1#0,b.0#0,b.1#0 | c_lo#0,c_hi#0,c_mid#0 return c_hi, c_mid, c_lo tuple_support/tuple_support.py:108 + uncover 2 // load c_lo#0 from l-stack (no copy) (𝕡) a.0#0,a.1#0,b.0#0,b.1#0 | c_hi#0,c_mid#0,c_lo#0 return c_hi, c_mid, c_lo tuple_support/tuple_support.py:108 + retsub // c_hi#0,c_mid#0,c_lo#0 return c_hi, c_mid, c_lo tuple_support/tuple_support.py:108 // test_cases.tuple_support.tuple_support.bytes_multiply(arg.0: bytes, arg.1: uint64) -> bytes: bytes_multiply: - proto 2 1 // (𝕡) arg.0#0,arg.1#0 | @subroutine\ndef bytes_multiply(arg: tuple[Bytes, UInt64]) -> Bytes: tuple_support/tuple_support.py:67-68 + proto 2 1 // (𝕡) arg.0#0,arg.1#0 | @subroutine\ndef bytes_multiply(arg: tuple[Bytes, UInt64]) -> Bytes: tuple_support/tuple_support.py:81-82 bytes_multiply_block@0: - byte 0x // (𝕡) arg.0#0,arg.1#0 | 0x Bytes() tuple_support/tuple_support.py:70 - // virtual: store result#0 to f-stack (𝕡) arg.0#0,arg.1#0 | (𝕗) result#0 | result = Bytes() tuple_support/tuple_support.py:70 - int 0 // (𝕡) arg.0#0,arg.1#0 | (𝕗) result#0 | 0 urange(count) tuple_support/tuple_support.py:71 - // virtual: store range_item%0#0 to l-stack (no copy) (𝕡) arg.0#0,arg.1#0 | (𝕗) result#0 | range_item%0#0 _i tuple_support/tuple_support.py:71 + byte 0x // (𝕡) arg.0#0,arg.1#0 | 0x Bytes() tuple_support/tuple_support.py:84 + // virtual: store result#0 to f-stack (𝕡) arg.0#0,arg.1#0 | (𝕗) result#0 | result = Bytes() tuple_support/tuple_support.py:84 + int 0 // (𝕡) arg.0#0,arg.1#0 | (𝕗) result#0 | 0 urange(count) tuple_support/tuple_support.py:85 + // virtual: store range_item%0#0 to l-stack (no copy) (𝕡) arg.0#0,arg.1#0 | (𝕗) result#0 | range_item%0#0 _i tuple_support/tuple_support.py:85 // virtual: load range_item%0#0 from l-stack (no copy) (𝕡) arg.0#0,arg.1#0 | (𝕗) result#0 | range_item%0#0 // virtual: store _i#0 to f-stack (𝕡) arg.0#0,arg.1#0 | (𝕗) result#0,_i#0 | // Implicit fall through to bytes_multiply_for_header@1 // (𝕡) arg.0#0,arg.1#0 | (𝕗) result#0,_i#0 | bytes_multiply_for_header@1: - frame_dig 1 // load _i#0 from f-stack (𝕡) arg.0#0,arg.1#0 | (𝕗) result#0,_i#0 | _i#0 urange(count) tuple_support/tuple_support.py:71 - frame_dig -1 // load arg.1#0 from parameters (𝕡) arg.0#0,arg.1#0 | (𝕗) result#0,_i#0 | _i#0,arg.1#0 urange(count) tuple_support/tuple_support.py:71 - < // (𝕡) arg.0#0,arg.1#0 | (𝕗) result#0,_i#0 | {<} urange(count) tuple_support/tuple_support.py:71 - // virtual: store continue_looping%0#0 to l-stack (no copy) (𝕡) arg.0#0,arg.1#0 | (𝕗) result#0,_i#0 | continue_looping%0#0 urange(count) tuple_support/tuple_support.py:71 - // virtual: load continue_looping%0#0 from l-stack (no copy) (𝕡) arg.0#0,arg.1#0 | (𝕗) result#0,_i#0 | continue_looping%0#0 for _i in urange(count): tuple_support/tuple_support.py:71 - bz bytes_multiply_after_for@5 // (𝕡) arg.0#0,arg.1#0 | (𝕗) result#0,_i#0 | for _i in urange(count): tuple_support/tuple_support.py:71 - // Implicit fall through to bytes_multiply_for_body@2 // (𝕡) arg.0#0,arg.1#0 | (𝕗) result#0,_i#0 | for _i in urange(count): tuple_support/tuple_support.py:71 + frame_dig 1 // load _i#0 from f-stack (𝕡) arg.0#0,arg.1#0 | (𝕗) result#0,_i#0 | _i#0 urange(count) tuple_support/tuple_support.py:85 + frame_dig -1 // load arg.1#0 from parameters (𝕡) arg.0#0,arg.1#0 | (𝕗) result#0,_i#0 | _i#0,arg.1#0 urange(count) tuple_support/tuple_support.py:85 + < // (𝕡) arg.0#0,arg.1#0 | (𝕗) result#0,_i#0 | {<} urange(count) tuple_support/tuple_support.py:85 + // virtual: store continue_looping%0#0 to l-stack (no copy) (𝕡) arg.0#0,arg.1#0 | (𝕗) result#0,_i#0 | continue_looping%0#0 urange(count) tuple_support/tuple_support.py:85 + // virtual: load continue_looping%0#0 from l-stack (no copy) (𝕡) arg.0#0,arg.1#0 | (𝕗) result#0,_i#0 | continue_looping%0#0 for _i in urange(count): tuple_support/tuple_support.py:85 + bz bytes_multiply_after_for@5 // (𝕡) arg.0#0,arg.1#0 | (𝕗) result#0,_i#0 | for _i in urange(count): tuple_support/tuple_support.py:85 + // Implicit fall through to bytes_multiply_for_body@2 // (𝕡) arg.0#0,arg.1#0 | (𝕗) result#0,_i#0 | for _i in urange(count): tuple_support/tuple_support.py:85 bytes_multiply_for_body@2: - frame_dig 0 // load result#0 from f-stack (𝕡) arg.0#0,arg.1#0 | (𝕗) result#0,_i#0 | result#0 result += b tuple_support/tuple_support.py:72 - frame_dig -2 // load arg.0#0 from parameters (𝕡) arg.0#0,arg.1#0 | (𝕗) result#0,_i#0 | result#0,arg.0#0 result += b tuple_support/tuple_support.py:72 - concat // (𝕡) arg.0#0,arg.1#0 | (𝕗) result#0,_i#0 | {concat} result += b tuple_support/tuple_support.py:72 - frame_bury 0 // store result#0 to f-stack (𝕡) arg.0#0,arg.1#0 | (𝕗) result#0,_i#0 | result += b tuple_support/tuple_support.py:72 - frame_dig 1 // load _i#0 from f-stack (𝕡) arg.0#0,arg.1#0 | (𝕗) result#0,_i#0 | _i#0 for _i in urange(count): tuple_support/tuple_support.py:71 - int 1 // (𝕡) arg.0#0,arg.1#0 | (𝕗) result#0,_i#0 | _i#0,1 urange(count) tuple_support/tuple_support.py:71 - + // (𝕡) arg.0#0,arg.1#0 | (𝕗) result#0,_i#0 | {+} urange(count) tuple_support/tuple_support.py:71 - // virtual: store range_item%0#0 to l-stack (no copy) (𝕡) arg.0#0,arg.1#0 | (𝕗) result#0,_i#0 | range_item%0#0 for _i in urange(count): tuple_support/tuple_support.py:71 + frame_dig 0 // load result#0 from f-stack (𝕡) arg.0#0,arg.1#0 | (𝕗) result#0,_i#0 | result#0 result += b tuple_support/tuple_support.py:86 + frame_dig -2 // load arg.0#0 from parameters (𝕡) arg.0#0,arg.1#0 | (𝕗) result#0,_i#0 | result#0,arg.0#0 result += b tuple_support/tuple_support.py:86 + concat // (𝕡) arg.0#0,arg.1#0 | (𝕗) result#0,_i#0 | {concat} result += b tuple_support/tuple_support.py:86 + frame_bury 0 // store result#0 to f-stack (𝕡) arg.0#0,arg.1#0 | (𝕗) result#0,_i#0 | result += b tuple_support/tuple_support.py:86 + frame_dig 1 // load _i#0 from f-stack (𝕡) arg.0#0,arg.1#0 | (𝕗) result#0,_i#0 | _i#0 for _i in urange(count): tuple_support/tuple_support.py:85 + int 1 // (𝕡) arg.0#0,arg.1#0 | (𝕗) result#0,_i#0 | _i#0,1 urange(count) tuple_support/tuple_support.py:85 + + // (𝕡) arg.0#0,arg.1#0 | (𝕗) result#0,_i#0 | {+} urange(count) tuple_support/tuple_support.py:85 + // virtual: store range_item%0#0 to l-stack (no copy) (𝕡) arg.0#0,arg.1#0 | (𝕗) result#0,_i#0 | range_item%0#0 for _i in urange(count): tuple_support/tuple_support.py:85 // virtual: load range_item%0#0 from l-stack (no copy) (𝕡) arg.0#0,arg.1#0 | (𝕗) result#0,_i#0 | range_item%0#0 frame_bury 1 // store _i#0 to f-stack (𝕡) arg.0#0,arg.1#0 | (𝕗) result#0,_i#0 | b bytes_multiply_for_header@1 // (𝕡) arg.0#0,arg.1#0 | (𝕗) result#0,_i#0 | bytes_multiply_after_for@5: - frame_dig 0 // load result#0 from f-stack (𝕡) arg.0#0,arg.1#0 | (𝕗) result#0,_i#0 | result#0 return result tuple_support/tuple_support.py:73 + frame_dig 0 // load result#0 from f-stack (𝕡) arg.0#0,arg.1#0 | (𝕗) result#0,_i#0 | result#0 return result tuple_support/tuple_support.py:87 frame_bury 0 - retsub // result#0 return result tuple_support/tuple_support.py:73 + retsub // result#0 return result tuple_support/tuple_support.py:87 // test_cases.tuple_support.tuple_support.test_tuple_swap(zero: uint64) -> void: test_tuple_swap: - proto 1 0 // (𝕡) zero#0 | @subroutine\ndef test_tuple_swap(zero: UInt64) -> None: tuple_support/tuple_support.py:97-98 + proto 1 0 // (𝕡) zero#0 | @subroutine\ndef test_tuple_swap(zero: UInt64) -> None: tuple_support/tuple_support.py:111-112 test_tuple_swap_block@0: - frame_dig -1 // load zero#0 from parameters (𝕡) zero#0 | zero#0 a = zero + 1 tuple_support/tuple_support.py:99 - int 1 // (𝕡) zero#0 | zero#0,1 1 tuple_support/tuple_support.py:99 - + // (𝕡) zero#0 | {+} zero + 1 tuple_support/tuple_support.py:99 - // virtual: store a#0 to l-stack (no copy) (𝕡) zero#0 | a#0 a = zero + 1 tuple_support/tuple_support.py:99 - frame_dig -1 // load zero#0 from parameters (𝕡) zero#0 | a#0,zero#0 b = zero + 2 tuple_support/tuple_support.py:100 - int 2 // (𝕡) zero#0 | a#0,zero#0,2 2 tuple_support/tuple_support.py:100 - + // (𝕡) zero#0 | a#0,{+} zero + 2 tuple_support/tuple_support.py:100 - // virtual: store b#0 to l-stack (no copy) (𝕡) zero#0 | a#0,b#0 b = zero + 2 tuple_support/tuple_support.py:100 - // virtual: load b#0 from l-stack (no copy) (𝕡) zero#0 | a#0,b#0 a == 2, "a should be two" tuple_support/tuple_support.py:102 - int 2 // (𝕡) zero#0 | a#0,b#0,2 2 tuple_support/tuple_support.py:102 - == // (𝕡) zero#0 | a#0,{==} a == 2, "a should be two" tuple_support/tuple_support.py:102 - // virtual: store tmp%0#0 to l-stack (no copy) (𝕡) zero#0 | a#0,tmp%0#0 a == 2, "a should be two" tuple_support/tuple_support.py:102 - // virtual: load tmp%0#0 from l-stack (no copy) (𝕡) zero#0 | a#0,tmp%0#0 assert a == 2, "a should be two" tuple_support/tuple_support.py:102 - assert // a should be two // (𝕡) zero#0 | a#0 assert a == 2, "a should be two" tuple_support/tuple_support.py:102 - // virtual: load a#0 from l-stack (no copy) (𝕡) zero#0 | a#0 b == 1, "b should be one" tuple_support/tuple_support.py:103 - int 1 // (𝕡) zero#0 | a#0,1 1 tuple_support/tuple_support.py:103 - == // (𝕡) zero#0 | {==} b == 1, "b should be one" tuple_support/tuple_support.py:103 - // virtual: store tmp%1#0 to l-stack (no copy) (𝕡) zero#0 | tmp%1#0 b == 1, "b should be one" tuple_support/tuple_support.py:103 - // virtual: load tmp%1#0 from l-stack (no copy) (𝕡) zero#0 | tmp%1#0 assert b == 1, "b should be one" tuple_support/tuple_support.py:103 - assert // b should be one // (𝕡) zero#0 | assert b == 1, "b should be one" tuple_support/tuple_support.py:103 + frame_dig -1 // load zero#0 from parameters (𝕡) zero#0 | zero#0 a = zero + 1 tuple_support/tuple_support.py:113 + int 1 // (𝕡) zero#0 | zero#0,1 1 tuple_support/tuple_support.py:113 + + // (𝕡) zero#0 | {+} zero + 1 tuple_support/tuple_support.py:113 + // virtual: store a#0 to l-stack (no copy) (𝕡) zero#0 | a#0 a = zero + 1 tuple_support/tuple_support.py:113 + frame_dig -1 // load zero#0 from parameters (𝕡) zero#0 | a#0,zero#0 b = zero + 2 tuple_support/tuple_support.py:114 + int 2 // (𝕡) zero#0 | a#0,zero#0,2 2 tuple_support/tuple_support.py:114 + + // (𝕡) zero#0 | a#0,{+} zero + 2 tuple_support/tuple_support.py:114 + // virtual: store b#0 to l-stack (no copy) (𝕡) zero#0 | a#0,b#0 b = zero + 2 tuple_support/tuple_support.py:114 + // virtual: load b#0 from l-stack (no copy) (𝕡) zero#0 | a#0,b#0 a == 2, "a should be two" tuple_support/tuple_support.py:116 + int 2 // (𝕡) zero#0 | a#0,b#0,2 2 tuple_support/tuple_support.py:116 + == // (𝕡) zero#0 | a#0,{==} a == 2, "a should be two" tuple_support/tuple_support.py:116 + // virtual: store tmp%0#0 to l-stack (no copy) (𝕡) zero#0 | a#0,tmp%0#0 a == 2, "a should be two" tuple_support/tuple_support.py:116 + // virtual: load tmp%0#0 from l-stack (no copy) (𝕡) zero#0 | a#0,tmp%0#0 assert a == 2, "a should be two" tuple_support/tuple_support.py:116 + assert // a should be two // (𝕡) zero#0 | a#0 assert a == 2, "a should be two" tuple_support/tuple_support.py:116 + // virtual: load a#0 from l-stack (no copy) (𝕡) zero#0 | a#0 b == 1, "b should be one" tuple_support/tuple_support.py:117 + int 1 // (𝕡) zero#0 | a#0,1 1 tuple_support/tuple_support.py:117 + == // (𝕡) zero#0 | {==} b == 1, "b should be one" tuple_support/tuple_support.py:117 + // virtual: store tmp%1#0 to l-stack (no copy) (𝕡) zero#0 | tmp%1#0 b == 1, "b should be one" tuple_support/tuple_support.py:117 + // virtual: load tmp%1#0 from l-stack (no copy) (𝕡) zero#0 | tmp%1#0 assert b == 1, "b should be one" tuple_support/tuple_support.py:117 + assert // b should be one // (𝕡) zero#0 | assert b == 1, "b should be one" tuple_support/tuple_support.py:117 retsub // // test_cases.tuple_support.tuple_support.slicing(values.0: uint64, values.1: uint64, values.2: uint64, values.3: uint64, values.4: uint64, values.5: uint64, values.6: uint64, values.7: uint64) -> void: slicing: - proto 8 0 // (𝕡) values.0#0,values.1#0,values.2#0,values.3#0,values.4#0,values.5#0,values.6#0,values.7#0 | @subroutine\ndef slicing(values: tuple[UInt64, UInt64, UInt64, UInt64, UInt64, UInt64, UInt64, UI... tuple_support/tuple_support.py:106-107 + proto 8 0 // (𝕡) values.0#0,values.1#0,values.2#0,values.3#0,values.4#0,values.5#0,values.6#0,values.7#0 | @subroutine\ndef slicing(values: tuple[UInt64, UInt64, UInt64, UInt64, UInt64, UInt64, UInt64, UI... tuple_support/tuple_support.py:120-121 slicing_block@0: - frame_dig -8 // load values.0#0 from parameters (𝕡) values.0#0,values.1#0,values.2#0,values.3#0,values.4#0,values.5#0,values.6#0,values.7#0 | values.0#0 add_three_values(one_to_three) tuple_support/tuple_support.py:109 - frame_dig -7 // load values.1#0 from parameters (𝕡) values.0#0,values.1#0,values.2#0,values.3#0,values.4#0,values.5#0,values.6#0,values.7#0 | values.0#0,values.1#0 add_three_values(one_to_three) tuple_support/tuple_support.py:109 - frame_dig -6 // load values.2#0 from parameters (𝕡) values.0#0,values.1#0,values.2#0,values.3#0,values.4#0,values.5#0,values.6#0,values.7#0 | values.0#0,values.1#0,values.2#0 add_three_values(one_to_three) tuple_support/tuple_support.py:109 - callsub add_three_values // (𝕡) values.0#0,values.1#0,values.2#0,values.3#0,values.4#0,values.5#0,values.6#0,values.7#0 | {add_three_values} add_three_values(one_to_three) tuple_support/tuple_support.py:109 - // virtual: store tmp%0#0 to l-stack (no copy) (𝕡) values.0#0,values.1#0,values.2#0,values.3#0,values.4#0,values.5#0,values.6#0,values.7#0 | tmp%0#0 add_three_values(one_to_three) tuple_support/tuple_support.py:109 - frame_dig -8 // load values.0#0 from parameters (𝕡) values.0#0,values.1#0,values.2#0,values.3#0,values.4#0,values.5#0,values.6#0,values.7#0 | tmp%0#0,values.0#0 values[0] + values[1] tuple_support/tuple_support.py:109 - frame_dig -7 // load values.1#0 from parameters (𝕡) values.0#0,values.1#0,values.2#0,values.3#0,values.4#0,values.5#0,values.6#0,values.7#0 | tmp%0#0,values.0#0,values.1#0 values[0] + values[1] tuple_support/tuple_support.py:109 - + // (𝕡) values.0#0,values.1#0,values.2#0,values.3#0,values.4#0,values.5#0,values.6#0,values.7#0 | tmp%0#0,{+} values[0] + values[1] tuple_support/tuple_support.py:109 - // virtual: store tmp%1#0 to l-stack (no copy) (𝕡) values.0#0,values.1#0,values.2#0,values.3#0,values.4#0,values.5#0,values.6#0,values.7#0 | tmp%0#0,tmp%1#0 values[0] + values[1] tuple_support/tuple_support.py:109 - // virtual: load tmp%1#0 from l-stack (no copy) (𝕡) values.0#0,values.1#0,values.2#0,values.3#0,values.4#0,values.5#0,values.6#0,values.7#0 | tmp%0#0,tmp%1#0 values[0] + values[1] + values[2] tuple_support/tuple_support.py:109 - frame_dig -6 // load values.2#0 from parameters (𝕡) values.0#0,values.1#0,values.2#0,values.3#0,values.4#0,values.5#0,values.6#0,values.7#0 | tmp%0#0,tmp%1#0,values.2#0 values[0] + values[1] + values[2] tuple_support/tuple_support.py:109 - + // (𝕡) values.0#0,values.1#0,values.2#0,values.3#0,values.4#0,values.5#0,values.6#0,values.7#0 | tmp%0#0,{+} values[0] + values[1] + values[2] tuple_support/tuple_support.py:109 - // virtual: store tmp%2#0 to l-stack (no copy) (𝕡) values.0#0,values.1#0,values.2#0,values.3#0,values.4#0,values.5#0,values.6#0,values.7#0 | tmp%0#0,tmp%2#0 values[0] + values[1] + values[2] tuple_support/tuple_support.py:109 - // virtual: load tmp%0#0 from l-stack (no copy) (𝕡) values.0#0,values.1#0,values.2#0,values.3#0,values.4#0,values.5#0,values.6#0,values.7#0 | tmp%2#0,tmp%0#0 add_three_values(one_to_three) == values[0] + values[1] + values[2] tuple_support/tuple_support.py:109 - // virtual: load tmp%2#0 from l-stack (no copy) (𝕡) values.0#0,values.1#0,values.2#0,values.3#0,values.4#0,values.5#0,values.6#0,values.7#0 | tmp%0#0,tmp%2#0 add_three_values(one_to_three) == values[0] + values[1] + values[2] tuple_support/tuple_support.py:109 - == // (𝕡) values.0#0,values.1#0,values.2#0,values.3#0,values.4#0,values.5#0,values.6#0,values.7#0 | {==} add_three_values(one_to_three) == values[0] + values[1] + values[2] tuple_support/tuple_support.py:109 - // virtual: store tmp%3#0 to l-stack (no copy) (𝕡) values.0#0,values.1#0,values.2#0,values.3#0,values.4#0,values.5#0,values.6#0,values.7#0 | tmp%3#0 add_three_values(one_to_three) == values[0] + values[1] + values[2] tuple_support/tuple_support.py:109 - // virtual: load tmp%3#0 from l-stack (no copy) (𝕡) values.0#0,values.1#0,values.2#0,values.3#0,values.4#0,values.5#0,values.6#0,values.7#0 | tmp%3#0 assert add_three_values(one_to_three) == values[0] + values[1] + values[2] tuple_support/tuple_support.py:109 - assert // (𝕡) values.0#0,values.1#0,values.2#0,values.3#0,values.4#0,values.5#0,values.6#0,values.7#0 | assert add_three_values(one_to_three) == values[0] + values[1] + values[2] tuple_support/tuple_support.py:109 + frame_dig -8 // load values.0#0 from parameters (𝕡) values.0#0,values.1#0,values.2#0,values.3#0,values.4#0,values.5#0,values.6#0,values.7#0 | values.0#0 add_three_values(one_to_three) tuple_support/tuple_support.py:123 + frame_dig -7 // load values.1#0 from parameters (𝕡) values.0#0,values.1#0,values.2#0,values.3#0,values.4#0,values.5#0,values.6#0,values.7#0 | values.0#0,values.1#0 add_three_values(one_to_three) tuple_support/tuple_support.py:123 + frame_dig -6 // load values.2#0 from parameters (𝕡) values.0#0,values.1#0,values.2#0,values.3#0,values.4#0,values.5#0,values.6#0,values.7#0 | values.0#0,values.1#0,values.2#0 add_three_values(one_to_three) tuple_support/tuple_support.py:123 + callsub add_three_values // (𝕡) values.0#0,values.1#0,values.2#0,values.3#0,values.4#0,values.5#0,values.6#0,values.7#0 | {add_three_values} add_three_values(one_to_three) tuple_support/tuple_support.py:123 + // virtual: store tmp%0#0 to l-stack (no copy) (𝕡) values.0#0,values.1#0,values.2#0,values.3#0,values.4#0,values.5#0,values.6#0,values.7#0 | tmp%0#0 add_three_values(one_to_three) tuple_support/tuple_support.py:123 + frame_dig -8 // load values.0#0 from parameters (𝕡) values.0#0,values.1#0,values.2#0,values.3#0,values.4#0,values.5#0,values.6#0,values.7#0 | tmp%0#0,values.0#0 values[0] + values[1] tuple_support/tuple_support.py:123 + frame_dig -7 // load values.1#0 from parameters (𝕡) values.0#0,values.1#0,values.2#0,values.3#0,values.4#0,values.5#0,values.6#0,values.7#0 | tmp%0#0,values.0#0,values.1#0 values[0] + values[1] tuple_support/tuple_support.py:123 + + // (𝕡) values.0#0,values.1#0,values.2#0,values.3#0,values.4#0,values.5#0,values.6#0,values.7#0 | tmp%0#0,{+} values[0] + values[1] tuple_support/tuple_support.py:123 + // virtual: store tmp%1#0 to l-stack (no copy) (𝕡) values.0#0,values.1#0,values.2#0,values.3#0,values.4#0,values.5#0,values.6#0,values.7#0 | tmp%0#0,tmp%1#0 values[0] + values[1] tuple_support/tuple_support.py:123 + // virtual: load tmp%1#0 from l-stack (no copy) (𝕡) values.0#0,values.1#0,values.2#0,values.3#0,values.4#0,values.5#0,values.6#0,values.7#0 | tmp%0#0,tmp%1#0 values[0] + values[1] + values[2] tuple_support/tuple_support.py:123 + frame_dig -6 // load values.2#0 from parameters (𝕡) values.0#0,values.1#0,values.2#0,values.3#0,values.4#0,values.5#0,values.6#0,values.7#0 | tmp%0#0,tmp%1#0,values.2#0 values[0] + values[1] + values[2] tuple_support/tuple_support.py:123 + + // (𝕡) values.0#0,values.1#0,values.2#0,values.3#0,values.4#0,values.5#0,values.6#0,values.7#0 | tmp%0#0,{+} values[0] + values[1] + values[2] tuple_support/tuple_support.py:123 + // virtual: store tmp%2#0 to l-stack (no copy) (𝕡) values.0#0,values.1#0,values.2#0,values.3#0,values.4#0,values.5#0,values.6#0,values.7#0 | tmp%0#0,tmp%2#0 values[0] + values[1] + values[2] tuple_support/tuple_support.py:123 + // virtual: load tmp%0#0 from l-stack (no copy) (𝕡) values.0#0,values.1#0,values.2#0,values.3#0,values.4#0,values.5#0,values.6#0,values.7#0 | tmp%2#0,tmp%0#0 add_three_values(one_to_three) == values[0] + values[1] + values[2] tuple_support/tuple_support.py:123 + // virtual: load tmp%2#0 from l-stack (no copy) (𝕡) values.0#0,values.1#0,values.2#0,values.3#0,values.4#0,values.5#0,values.6#0,values.7#0 | tmp%0#0,tmp%2#0 add_three_values(one_to_three) == values[0] + values[1] + values[2] tuple_support/tuple_support.py:123 + == // (𝕡) values.0#0,values.1#0,values.2#0,values.3#0,values.4#0,values.5#0,values.6#0,values.7#0 | {==} add_three_values(one_to_three) == values[0] + values[1] + values[2] tuple_support/tuple_support.py:123 + // virtual: store tmp%3#0 to l-stack (no copy) (𝕡) values.0#0,values.1#0,values.2#0,values.3#0,values.4#0,values.5#0,values.6#0,values.7#0 | tmp%3#0 add_three_values(one_to_three) == values[0] + values[1] + values[2] tuple_support/tuple_support.py:123 + // virtual: load tmp%3#0 from l-stack (no copy) (𝕡) values.0#0,values.1#0,values.2#0,values.3#0,values.4#0,values.5#0,values.6#0,values.7#0 | tmp%3#0 assert add_three_values(one_to_three) == values[0] + values[1] + values[2] tuple_support/tuple_support.py:123 + assert // (𝕡) values.0#0,values.1#0,values.2#0,values.3#0,values.4#0,values.5#0,values.6#0,values.7#0 | assert add_three_values(one_to_three) == values[0] + values[1] + values[2] tuple_support/tuple_support.py:123 + retsub // + + +// test_cases.tuple_support.tuple_support.bin_ops() -> void: +bin_ops: + proto 0 0 // @subroutine\ndef bin_ops() -> None: tuple_support/tuple_support.py:61-62 + +bin_ops_block@0: retsub // diff --git a/test_cases/tuple_support/out/TupleSupport.approval.teal b/test_cases/tuple_support/out/TupleSupport.approval.teal index 6f7b383f16..33a6ce8f86 100644 --- a/test_cases/tuple_support/out/TupleSupport.approval.teal +++ b/test_cases/tuple_support/out/TupleSupport.approval.teal @@ -116,6 +116,9 @@ main_entrypoint@2: // ) callsub slicing // tuple_support/tuple_support.py:54 + // bin_ops() + callsub bin_ops + // tuple_support/tuple_support.py:55 // return a + b int 3 return @@ -123,12 +126,12 @@ main_entrypoint@2: // test_cases.tuple_support.tuple_support.add_three_values(values.0: uint64, values.1: uint64, values.2: uint64) -> uint64: add_three_values: - // tuple_support/tuple_support.py:76-77 + // tuple_support/tuple_support.py:90-91 // @subroutine // def add_three_values(values: tuple[UInt64, UInt64, UInt64]) -> UInt64: proto 3 1 byte "" - // tuple_support/tuple_support.py:78 + // tuple_support/tuple_support.py:92 // total = UInt64(0) int 0 frame_dig -3 @@ -145,7 +148,7 @@ add_three_values_for_header_2@3: frame_dig 0 add_three_values_for_body@4: - // tuple_support/tuple_support.py:80 + // tuple_support/tuple_support.py:94 // total += value frame_dig 1 uncover 2 @@ -157,10 +160,10 @@ add_three_values_for_body@4: int 1 + frame_bury 0 - // tuple_support/tuple_support.py:79 + // tuple_support/tuple_support.py:93 // for value in values: switch add_three_values_for_header_1@2 add_three_values_for_header_2@3 - // tuple_support/tuple_support.py:82 + // tuple_support/tuple_support.py:96 // return total frame_bury 0 retsub @@ -168,51 +171,51 @@ add_three_values_for_body@4: // test_cases.tuple_support.tuple_support.bytes_combine(arg.0: bytes, arg.1: bytes) -> bytes: bytes_combine: - // tuple_support/tuple_support.py:60-61 + // tuple_support/tuple_support.py:74-75 // @subroutine // def bytes_combine(arg: tuple[Bytes, Bytes]) -> Bytes: proto 2 1 - // tuple_support/tuple_support.py:63 + // tuple_support/tuple_support.py:77 // result = a + b frame_dig -2 frame_dig -1 concat - // tuple_support/tuple_support.py:64 + // tuple_support/tuple_support.py:78 // return result retsub // test_cases.tuple_support.tuple_support.addw2(a.0: uint64, a.1: uint64, b.0: uint64, b.1: uint64) -> uint64, uint64, uint64: addw2: - // tuple_support/tuple_support.py:85-86 + // tuple_support/tuple_support.py:99-100 // @subroutine // def addw2(a: tuple[UInt64, UInt64], b: tuple[UInt64, UInt64]) -> tuple[UInt64, UInt64, UInt64]: proto 4 3 - // tuple_support/tuple_support.py:89 + // tuple_support/tuple_support.py:103 // lo_carry, c_lo = op.addw(a_lo, b_lo) frame_dig -3 frame_dig -1 addw swap - // tuple_support/tuple_support.py:90 + // tuple_support/tuple_support.py:104 // hi_carry1, c_mid = op.addw(a_hi, b_hi) frame_dig -4 frame_dig -2 addw - // tuple_support/tuple_support.py:91 + // tuple_support/tuple_support.py:105 // hi_carry2, c_mid = op.addw(c_mid, lo_carry) uncover 2 addw cover 2 - // tuple_support/tuple_support.py:92 + // tuple_support/tuple_support.py:106 // did_overflow, c_hi = op.addw(hi_carry1, hi_carry2) addw swap - // tuple_support/tuple_support.py:93 + // tuple_support/tuple_support.py:107 // assert not did_overflow, "is such a thing even possible? 👽" ! assert // is such a thing even possible? 👽 - // tuple_support/tuple_support.py:94 + // tuple_support/tuple_support.py:108 // return c_hi, c_mid, c_lo swap uncover 2 @@ -221,31 +224,31 @@ addw2: // test_cases.tuple_support.tuple_support.bytes_multiply(arg.0: bytes, arg.1: uint64) -> bytes: bytes_multiply: - // tuple_support/tuple_support.py:67-68 + // tuple_support/tuple_support.py:81-82 // @subroutine // def bytes_multiply(arg: tuple[Bytes, UInt64]) -> Bytes: proto 2 1 - // tuple_support/tuple_support.py:70 + // tuple_support/tuple_support.py:84 // result = Bytes() byte 0x - // tuple_support/tuple_support.py:71 + // tuple_support/tuple_support.py:85 // for _i in urange(count): int 0 bytes_multiply_for_header@1: - // tuple_support/tuple_support.py:71 + // tuple_support/tuple_support.py:85 // for _i in urange(count): frame_dig 1 frame_dig -1 < bz bytes_multiply_after_for@5 - // tuple_support/tuple_support.py:72 + // tuple_support/tuple_support.py:86 // result += b frame_dig 0 frame_dig -2 concat frame_bury 0 - // tuple_support/tuple_support.py:71 + // tuple_support/tuple_support.py:85 // for _i in urange(count): frame_dig 1 int 1 @@ -254,33 +257,33 @@ bytes_multiply_for_header@1: b bytes_multiply_for_header@1 bytes_multiply_after_for@5: - // tuple_support/tuple_support.py:73 + // tuple_support/tuple_support.py:87 // return result retsub // test_cases.tuple_support.tuple_support.test_tuple_swap(zero: uint64) -> void: test_tuple_swap: - // tuple_support/tuple_support.py:97-98 + // tuple_support/tuple_support.py:111-112 // @subroutine // def test_tuple_swap(zero: UInt64) -> None: proto 1 0 - // tuple_support/tuple_support.py:99 + // tuple_support/tuple_support.py:113 // a = zero + 1 frame_dig -1 int 1 + - // tuple_support/tuple_support.py:100 + // tuple_support/tuple_support.py:114 // b = zero + 2 frame_dig -1 int 2 + - // tuple_support/tuple_support.py:102 + // tuple_support/tuple_support.py:116 // assert a == 2, "a should be two" int 2 == assert // a should be two - // tuple_support/tuple_support.py:103 + // tuple_support/tuple_support.py:117 // assert b == 1, "b should be one" int 1 == @@ -290,11 +293,11 @@ test_tuple_swap: // test_cases.tuple_support.tuple_support.slicing(values.0: uint64, values.1: uint64, values.2: uint64, values.3: uint64, values.4: uint64, values.5: uint64, values.6: uint64, values.7: uint64) -> void: slicing: - // tuple_support/tuple_support.py:106-107 + // tuple_support/tuple_support.py:120-121 // @subroutine // def slicing(values: tuple[UInt64, UInt64, UInt64, UInt64, UInt64, UInt64, UInt64, UInt64]) -> None: proto 8 0 - // tuple_support/tuple_support.py:109 + // tuple_support/tuple_support.py:123 // assert add_three_values(one_to_three) == values[0] + values[1] + values[2] frame_dig -8 frame_dig -7 @@ -310,6 +313,15 @@ slicing: retsub +// test_cases.tuple_support.tuple_support.bin_ops() -> void: +bin_ops: + // tuple_support/tuple_support.py:61-62 + // @subroutine + // def bin_ops() -> None: + proto 0 0 + retsub + + // test_cases.tuple_support.tuple_support.TupleSupport.__init__() -> void: __init__: // tuple_support/tuple_support.py:5 diff --git a/test_cases/tuple_support/out/TupleSupport.clear.mir b/test_cases/tuple_support/out/TupleSupport.clear.mir index 1f2f4bd486..c558976347 100644 --- a/test_cases/tuple_support/out/TupleSupport.clear.mir +++ b/test_cases/tuple_support/out/TupleSupport.clear.mir @@ -4,6 +4,6 @@ // test_cases.tuple_support.tuple_support.TupleSupport.clear_state_program() -> uint64: main_block@0: - int 0 // 0 UInt64(0) tuple_support/tuple_support.py:57 - return // return UInt64(0) tuple_support/tuple_support.py:57 + int 0 // 0 UInt64(0) tuple_support/tuple_support.py:58 + return // return UInt64(0) tuple_support/tuple_support.py:58 diff --git a/test_cases/tuple_support/out/TupleSupport.clear.teal b/test_cases/tuple_support/out/TupleSupport.clear.teal index ce7d14b617..0a08f3664e 100644 --- a/test_cases/tuple_support/out/TupleSupport.clear.teal +++ b/test_cases/tuple_support/out/TupleSupport.clear.teal @@ -1,7 +1,7 @@ #pragma version 10 test_cases.tuple_support.tuple_support.TupleSupport.clear_state_program: - // tuple_support/tuple_support.py:57 + // tuple_support/tuple_support.py:58 // return UInt64(0) int 0 return diff --git a/test_cases/tuple_support/out/TupleSupport.destructured.ir b/test_cases/tuple_support/out/TupleSupport.destructured.ir index 7e8ec0adba..0bfe02c5f0 100644 --- a/test_cases/tuple_support/out/TupleSupport.destructured.ir +++ b/test_cases/tuple_support/out/TupleSupport.destructured.ir @@ -29,34 +29,35 @@ contract test_cases.tuple_support.tuple_support.TupleSupport: (log tmp%17#0) test_cases.tuple_support.tuple_support.test_tuple_swap(0u) test_cases.tuple_support.tuple_support.slicing(1u, 2u, 3u, 4u, 5u, 6u, 7u, 8u) + test_cases.tuple_support.tuple_support.bin_ops() return 3u subroutine test_cases.tuple_support.tuple_support.add_three_values(values.0: uint64, values.1: uint64, values.2: uint64) -> uint64: - block@0: // L76 + block@0: // L90 let total#0: uint64 = 0u let tuple_index%0#0: uint64 = 0u let value#3: uint64 = values.0#0 goto block@4 - block@2: // for_header_1_L79 + block@2: // for_header_1_L93 let tuple_index%0#0: uint64 = tuple_index%0#4 let value#3: uint64 = values.1#0 goto block@4 - block@3: // for_header_2_L79 + block@3: // for_header_2_L93 let tuple_index%0#0: uint64 = tuple_index%0#4 let value#3: uint64 = values.2#0 goto block@4 - block@4: // for_body_L79 + block@4: // for_body_L93 let total#0: uint64 = (+ total#0 value#3) let tuple_index%0#4: uint64 = (+ tuple_index%0#0 1u) goto_nth [block@2, block@3][tuple_index%0#0] else return total#0 subroutine test_cases.tuple_support.tuple_support.bytes_combine(arg.0: bytes, arg.1: bytes) -> bytes: - block@0: // L60 + block@0: // L74 let result#0: bytes = (concat arg.0#0 arg.1#0) return result#0 subroutine test_cases.tuple_support.tuple_support.addw2(a.0: uint64, a.1: uint64, b.0: uint64, b.1: uint64) -> : - block@0: // L85 + block@0: // L99 let (lo_carry#0: uint64, c_lo#0: uint64) = (addw a.1#0 b.1#0) let (hi_carry1#0: uint64, c_mid#0: uint64) = (addw a.0#0 b.0#0) let (hi_carry2#0: uint64, c_mid#0: uint64) = (addw c_mid#0 lo_carry#0) @@ -66,24 +67,24 @@ contract test_cases.tuple_support.tuple_support.TupleSupport: return c_hi#0 c_mid#0 c_lo#0 subroutine test_cases.tuple_support.tuple_support.bytes_multiply(arg.0: bytes, arg.1: uint64) -> bytes: - block@0: // L67 + block@0: // L81 let result#0: bytes = 0x let range_item%0#0: uint64 = 0u let _i#0: uint64 = range_item%0#0 goto block@1 - block@1: // for_header_L71 + block@1: // for_header_L85 let continue_looping%0#0: bool = (< _i#0 arg.1#0) goto continue_looping%0#0 ? block@2 : block@5 - block@2: // for_body_L71 + block@2: // for_body_L85 let result#0: bytes = (concat result#0 arg.0#0) let range_item%0#0: uint64 = (+ _i#0 1u) let _i#0: uint64 = range_item%0#0 goto block@1 - block@5: // after_for_L71 + block@5: // after_for_L85 return result#0 subroutine test_cases.tuple_support.tuple_support.test_tuple_swap(zero: uint64) -> void: - block@0: // L97 + block@0: // L111 let a#0: uint64 = (+ zero#0 1u) let b#0: uint64 = (+ zero#0 2u) let tmp%0#0: bool = (== b#0 2u) @@ -93,7 +94,7 @@ contract test_cases.tuple_support.tuple_support.TupleSupport: return subroutine test_cases.tuple_support.tuple_support.slicing(values.0: uint64, values.1: uint64, values.2: uint64, values.3: uint64, values.4: uint64, values.5: uint64, values.6: uint64, values.7: uint64) -> void: - block@0: // L106 + block@0: // L120 let tmp%0#0: uint64 = test_cases.tuple_support.tuple_support.add_three_values(values.0#0, values.1#0, values.2#0) let tmp%1#0: uint64 = (+ values.0#0 values.1#0) let tmp%2#0: uint64 = (+ tmp%1#0 values.2#0) @@ -101,6 +102,10 @@ contract test_cases.tuple_support.tuple_support.TupleSupport: (assert tmp%3#0) return + subroutine test_cases.tuple_support.tuple_support.bin_ops() -> void: + block@0: // L61 + return + subroutine test_cases.tuple_support.tuple_support.TupleSupport.__init__() -> void: block@0: // L5 (app_global_put "state" 0u) @@ -108,5 +113,5 @@ contract test_cases.tuple_support.tuple_support.TupleSupport: program clear-state: subroutine test_cases.tuple_support.tuple_support.TupleSupport.clear_state_program() -> uint64: - block@0: // L56 + block@0: // L57 return 0u \ No newline at end of file diff --git a/test_cases/tuple_support/out/TupleSupport.ssa.ir b/test_cases/tuple_support/out/TupleSupport.ssa.ir index 0f237a3d94..a6970561a6 100644 --- a/test_cases/tuple_support/out/TupleSupport.ssa.ir +++ b/test_cases/tuple_support/out/TupleSupport.ssa.ir @@ -70,44 +70,45 @@ contract test_cases.tuple_support.tuple_support.TupleSupport: (log tmp%17#0) test_cases.tuple_support.tuple_support.test_tuple_swap(0u) test_cases.tuple_support.tuple_support.slicing(1u, 2u, 3u, 4u, 5u, 6u, 7u, 8u) + test_cases.tuple_support.tuple_support.bin_ops() let tmp%18#0: uint64 = (+ a#0 b#0) return tmp%18#0 subroutine test_cases.tuple_support.tuple_support.add_three_values(values.0: uint64, values.1: uint64, values.2: uint64) -> uint64: - block@0: // L76 + block@0: // L90 let total#0: uint64 = 0u goto block@1 - block@1: // for_header_0_L79 + block@1: // for_header_0_L93 let tuple_index%0#0: uint64 = 0u let value#0: uint64 = values.0#0 goto block@4 - block@2: // for_header_1_L79 + block@2: // for_header_1_L93 let value#1: uint64 = values.1#0 goto block@4 - block@3: // for_header_2_L79 + block@3: // for_header_2_L93 let value#2: uint64 = values.2#0 goto block@4 - block@4: // for_body_L79 + block@4: // for_body_L93 let total#1: uint64 = φ(total#0 <- block@1, total#4 <- block@2, total#4 <- block@3) let value#3: uint64 = φ(value#0 <- block@1, value#1 <- block@2, value#2 <- block@3) let tuple_index%0#1: uint64 = φ(tuple_index%0#0 <- block@1, tuple_index%0#4 <- block@2, tuple_index%0#4 <- block@3) let total#4: uint64 = (+ total#1 value#3) goto block@5 - block@5: // for_footer_L79 + block@5: // for_footer_L93 let tuple_index%0#4: uint64 = (+ tuple_index%0#1 1u) goto_nth [block@2, block@3][tuple_index%0#1] else goto block@6 - block@6: // after_for_L79 + block@6: // after_for_L93 return total#4 subroutine test_cases.tuple_support.tuple_support.bytes_combine(arg.0: bytes, arg.1: bytes) -> bytes: - block@0: // L60 + block@0: // L74 let a#0: bytes = arg.0#0 let b#0: bytes = arg.1#0 let result#0: bytes = (concat a#0 b#0) return result#0 subroutine test_cases.tuple_support.tuple_support.addw2(a.0: uint64, a.1: uint64, b.0: uint64, b.1: uint64) -> : - block@0: // L85 + block@0: // L99 let a_hi#0: uint64 = a.0#0 let a_lo#0: uint64 = a.1#0 let b_hi#0: uint64 = b.0#0 @@ -130,32 +131,32 @@ contract test_cases.tuple_support.tuple_support.TupleSupport: return c_hi#0 c_mid#1 c_lo#0 subroutine test_cases.tuple_support.tuple_support.bytes_multiply(arg.0: bytes, arg.1: uint64) -> bytes: - block@0: // L67 + block@0: // L81 let b#0: bytes = arg.0#0 let count#0: uint64 = arg.1#0 let result#0: bytes = 0x (assert 1u) // Step cannot be zero let range_item%0#0: uint64 = 0u goto block@1 - block@1: // for_header_L71 + block@1: // for_header_L85 let range_item%0#1: uint64 = φ(range_item%0#0 <- block@0, range_item%0#3 <- block@4) let result#3: bytes = φ(result#0 <- block@0, result#2 <- block@4) let continue_looping%0#0: bool = (< range_item%0#1 count#0) goto continue_looping%0#0 ? block@2 : block@5 - block@2: // for_body_L71 + block@2: // for_body_L85 let _i#0: uint64 = range_item%0#1 let result#2: bytes = (concat result#3 b#0) goto block@3 - block@3: // for_footer_L71 + block@3: // for_footer_L85 goto block@4 - block@4: // for_increment_L71 + block@4: // for_increment_L85 let range_item%0#3: uint64 = (+ range_item%0#1 1u) goto block@1 - block@5: // after_for_L71 + block@5: // after_for_L85 return result#3 subroutine test_cases.tuple_support.tuple_support.test_tuple_swap(zero: uint64) -> void: - block@0: // L97 + block@0: // L111 let a#0: uint64 = (+ zero#0 1u) let b#0: uint64 = (+ zero#0 2u) let a#1: uint64 = b#0 @@ -167,7 +168,7 @@ contract test_cases.tuple_support.tuple_support.TupleSupport: return subroutine test_cases.tuple_support.tuple_support.slicing(values.0: uint64, values.1: uint64, values.2: uint64, values.3: uint64, values.4: uint64, values.5: uint64, values.6: uint64, values.7: uint64) -> void: - block@0: // L106 + block@0: // L120 let (one_to_three.0#0: uint64, one_to_three.1#0: uint64, one_to_three.2#0: uint64) = (values.0#0, values.1#0, values.2#0) let tmp%0#0: uint64 = test_cases.tuple_support.tuple_support.add_three_values(one_to_three.0#0, one_to_three.1#0, one_to_three.2#0) let tmp%1#0: uint64 = (+ values.0#0 values.1#0) @@ -178,6 +179,24 @@ contract test_cases.tuple_support.tuple_support.TupleSupport: (assert tmp%4#0) return + subroutine test_cases.tuple_support.tuple_support.bin_ops() -> void: + block@0: // L61 + let (a.0#0: uint64, a.1#0: uint64, a.2#0: uint64) = (1u, 1u, 1u) + let tmp%0#0: bool = (== a.0#0 1u) + (assert tmp%0#0) + let tmp%1#0: bool = (== a.1#0 1u) + (assert tmp%1#0) + let tmp%2#0: bool = (== a.2#0 1u) + (assert tmp%2#0) + let (b.0#0: uint64, b.1#0: bytes, b.2#0: uint64) = (1u, 0x32, 3u) + let tmp%3#0: bool = (== b.0#0 1u) + (assert tmp%3#0) + let tmp%4#0: bool = (== b.1#0 0x32) + (assert tmp%4#0) + let tmp%5#0: bool = (== b.2#0 3u) + (assert tmp%5#0) + return + subroutine test_cases.tuple_support.tuple_support.TupleSupport.__init__() -> void: block@0: // L5 (app_global_put "state" 0u) @@ -185,5 +204,5 @@ contract test_cases.tuple_support.tuple_support.TupleSupport: program clear-state: subroutine test_cases.tuple_support.tuple_support.TupleSupport.clear_state_program() -> uint64: - block@0: // L56 + block@0: // L57 return 0u \ No newline at end of file diff --git a/test_cases/tuple_support/out/TupleSupport.ssa.opt_pass_1.ir b/test_cases/tuple_support/out/TupleSupport.ssa.opt_pass_1.ir index c2ab6b5c8a..c6f9d6a37e 100644 --- a/test_cases/tuple_support/out/TupleSupport.ssa.opt_pass_1.ir +++ b/test_cases/tuple_support/out/TupleSupport.ssa.opt_pass_1.ir @@ -52,19 +52,20 @@ contract test_cases.tuple_support.tuple_support.TupleSupport: (log tmp%17#0) test_cases.tuple_support.tuple_support.test_tuple_swap(0u) test_cases.tuple_support.tuple_support.slicing(1u, 2u, 3u, 4u, 5u, 6u, 7u, 8u) + test_cases.tuple_support.tuple_support.bin_ops() let tmp%18#0: uint64 = 3u return tmp%18#0 subroutine test_cases.tuple_support.tuple_support.add_three_values(values.0: uint64, values.1: uint64, values.2: uint64) -> uint64: - block@0: // L76 + block@0: // L90 let total#0: uint64 = 0u let tuple_index%0#0: uint64 = 0u goto block@4 - block@2: // for_header_1_L79 + block@2: // for_header_1_L93 goto block@4 - block@3: // for_header_2_L79 + block@3: // for_header_2_L93 goto block@4 - block@4: // for_body_L79 + block@4: // for_body_L93 let total#1: uint64 = φ(total#0 <- block@0, total#4 <- block@2, total#4 <- block@3) let value#3: uint64 = φ(values.0#0 <- block@0, values.1#0 <- block@2, values.2#0 <- block@3) let tuple_index%0#1: uint64 = φ(tuple_index%0#0 <- block@0, tuple_index%0#4 <- block@2, tuple_index%0#4 <- block@3) @@ -73,12 +74,12 @@ contract test_cases.tuple_support.tuple_support.TupleSupport: goto_nth [block@2, block@3][tuple_index%0#1] else return total#4 subroutine test_cases.tuple_support.tuple_support.bytes_combine(arg.0: bytes, arg.1: bytes) -> bytes: - block@0: // L60 + block@0: // L74 let result#0: bytes = (concat arg.0#0 arg.1#0) return result#0 subroutine test_cases.tuple_support.tuple_support.addw2(a.0: uint64, a.1: uint64, b.0: uint64, b.1: uint64) -> : - block@0: // L85 + block@0: // L99 let (lo_carry#0: uint64, c_lo#0: uint64) = (addw a.1#0 b.1#0) let (hi_carry1#0: uint64, c_mid#0: uint64) = (addw a.0#0 b.0#0) let (hi_carry2#0: uint64, c_mid#1: uint64) = (addw c_mid#0 lo_carry#0) @@ -88,24 +89,24 @@ contract test_cases.tuple_support.tuple_support.TupleSupport: return c_hi#0 c_mid#1 c_lo#0 subroutine test_cases.tuple_support.tuple_support.bytes_multiply(arg.0: bytes, arg.1: uint64) -> bytes: - block@0: // L67 + block@0: // L81 let result#0: bytes = 0x let range_item%0#0: uint64 = 0u goto block@1 - block@1: // for_header_L71 + block@1: // for_header_L85 let _i#0: uint64 = φ(range_item%0#0 <- block@0, range_item%0#3 <- block@2) let result#3: bytes = φ(result#0 <- block@0, result#2 <- block@2) let continue_looping%0#0: bool = (< _i#0 arg.1#0) goto continue_looping%0#0 ? block@2 : block@5 - block@2: // for_body_L71 + block@2: // for_body_L85 let result#2: bytes = (concat result#3 arg.0#0) let range_item%0#3: uint64 = (+ _i#0 1u) goto block@1 - block@5: // after_for_L71 + block@5: // after_for_L85 return result#3 subroutine test_cases.tuple_support.tuple_support.test_tuple_swap(zero: uint64) -> void: - block@0: // L97 + block@0: // L111 let a#0: uint64 = (+ zero#0 1u) let b#0: uint64 = (+ zero#0 2u) let tmp%0#0: bool = (== b#0 2u) @@ -115,7 +116,7 @@ contract test_cases.tuple_support.tuple_support.TupleSupport: return subroutine test_cases.tuple_support.tuple_support.slicing(values.0: uint64, values.1: uint64, values.2: uint64, values.3: uint64, values.4: uint64, values.5: uint64, values.6: uint64, values.7: uint64) -> void: - block@0: // L106 + block@0: // L120 let tmp%0#0: uint64 = test_cases.tuple_support.tuple_support.add_three_values(values.0#0, values.1#0, values.2#0) let tmp%1#0: uint64 = (+ values.0#0 values.1#0) let tmp%2#0: uint64 = (+ tmp%1#0 values.2#0) @@ -125,6 +126,22 @@ contract test_cases.tuple_support.tuple_support.TupleSupport: (assert tmp%4#0) return + subroutine test_cases.tuple_support.tuple_support.bin_ops() -> void: + block@0: // L61 + let tmp%0#0: bool = 1u + (assert tmp%0#0) + let tmp%1#0: bool = 1u + (assert tmp%1#0) + let tmp%2#0: bool = 1u + (assert tmp%2#0) + let tmp%3#0: bool = 1u + (assert tmp%3#0) + let tmp%4#0: bool = 1u + (assert tmp%4#0) + let tmp%5#0: bool = 1u + (assert tmp%5#0) + return + subroutine test_cases.tuple_support.tuple_support.TupleSupport.__init__() -> void: block@0: // L5 (app_global_put "state" 0u) @@ -132,5 +149,5 @@ contract test_cases.tuple_support.tuple_support.TupleSupport: program clear-state: subroutine test_cases.tuple_support.tuple_support.TupleSupport.clear_state_program() -> uint64: - block@0: // L56 + block@0: // L57 return 0u \ No newline at end of file diff --git a/test_cases/tuple_support/out/TupleSupport.ssa.opt_pass_2.ir b/test_cases/tuple_support/out/TupleSupport.ssa.opt_pass_2.ir index 5b3f48a9b1..7063a12e61 100644 --- a/test_cases/tuple_support/out/TupleSupport.ssa.opt_pass_2.ir +++ b/test_cases/tuple_support/out/TupleSupport.ssa.opt_pass_2.ir @@ -37,18 +37,19 @@ contract test_cases.tuple_support.tuple_support.TupleSupport: (log tmp%17#0) test_cases.tuple_support.tuple_support.test_tuple_swap(0u) test_cases.tuple_support.tuple_support.slicing(1u, 2u, 3u, 4u, 5u, 6u, 7u, 8u) + test_cases.tuple_support.tuple_support.bin_ops() return 3u subroutine test_cases.tuple_support.tuple_support.add_three_values(values.0: uint64, values.1: uint64, values.2: uint64) -> uint64: - block@0: // L76 + block@0: // L90 let total#0: uint64 = 0u let tuple_index%0#0: uint64 = 0u goto block@4 - block@2: // for_header_1_L79 + block@2: // for_header_1_L93 goto block@4 - block@3: // for_header_2_L79 + block@3: // for_header_2_L93 goto block@4 - block@4: // for_body_L79 + block@4: // for_body_L93 let total#1: uint64 = φ(total#0 <- block@0, total#4 <- block@2, total#4 <- block@3) let value#3: uint64 = φ(values.0#0 <- block@0, values.1#0 <- block@2, values.2#0 <- block@3) let tuple_index%0#1: uint64 = φ(tuple_index%0#0 <- block@0, tuple_index%0#4 <- block@2, tuple_index%0#4 <- block@3) @@ -57,12 +58,12 @@ contract test_cases.tuple_support.tuple_support.TupleSupport: goto_nth [block@2, block@3][tuple_index%0#1] else return total#4 subroutine test_cases.tuple_support.tuple_support.bytes_combine(arg.0: bytes, arg.1: bytes) -> bytes: - block@0: // L60 + block@0: // L74 let result#0: bytes = (concat arg.0#0 arg.1#0) return result#0 subroutine test_cases.tuple_support.tuple_support.addw2(a.0: uint64, a.1: uint64, b.0: uint64, b.1: uint64) -> : - block@0: // L85 + block@0: // L99 let (lo_carry#0: uint64, c_lo#0: uint64) = (addw a.1#0 b.1#0) let (hi_carry1#0: uint64, c_mid#0: uint64) = (addw a.0#0 b.0#0) let (hi_carry2#0: uint64, c_mid#1: uint64) = (addw c_mid#0 lo_carry#0) @@ -72,24 +73,24 @@ contract test_cases.tuple_support.tuple_support.TupleSupport: return c_hi#0 c_mid#1 c_lo#0 subroutine test_cases.tuple_support.tuple_support.bytes_multiply(arg.0: bytes, arg.1: uint64) -> bytes: - block@0: // L67 + block@0: // L81 let result#0: bytes = 0x let range_item%0#0: uint64 = 0u goto block@1 - block@1: // for_header_L71 + block@1: // for_header_L85 let _i#0: uint64 = φ(range_item%0#0 <- block@0, range_item%0#3 <- block@2) let result#3: bytes = φ(result#0 <- block@0, result#2 <- block@2) let continue_looping%0#0: bool = (< _i#0 arg.1#0) goto continue_looping%0#0 ? block@2 : block@5 - block@2: // for_body_L71 + block@2: // for_body_L85 let result#2: bytes = (concat result#3 arg.0#0) let range_item%0#3: uint64 = (+ _i#0 1u) goto block@1 - block@5: // after_for_L71 + block@5: // after_for_L85 return result#3 subroutine test_cases.tuple_support.tuple_support.test_tuple_swap(zero: uint64) -> void: - block@0: // L97 + block@0: // L111 let a#0: uint64 = (+ zero#0 1u) let b#0: uint64 = (+ zero#0 2u) let tmp%0#0: bool = (== b#0 2u) @@ -99,7 +100,7 @@ contract test_cases.tuple_support.tuple_support.TupleSupport: return subroutine test_cases.tuple_support.tuple_support.slicing(values.0: uint64, values.1: uint64, values.2: uint64, values.3: uint64, values.4: uint64, values.5: uint64, values.6: uint64, values.7: uint64) -> void: - block@0: // L106 + block@0: // L120 let tmp%0#0: uint64 = test_cases.tuple_support.tuple_support.add_three_values(values.0#0, values.1#0, values.2#0) let tmp%1#0: uint64 = (+ values.0#0 values.1#0) let tmp%2#0: uint64 = (+ tmp%1#0 values.2#0) @@ -107,6 +108,10 @@ contract test_cases.tuple_support.tuple_support.TupleSupport: (assert tmp%3#0) return + subroutine test_cases.tuple_support.tuple_support.bin_ops() -> void: + block@0: // L61 + return + subroutine test_cases.tuple_support.tuple_support.TupleSupport.__init__() -> void: block@0: // L5 (app_global_put "state" 0u) @@ -114,5 +119,5 @@ contract test_cases.tuple_support.tuple_support.TupleSupport: program clear-state: subroutine test_cases.tuple_support.tuple_support.TupleSupport.clear_state_program() -> uint64: - block@0: // L56 + block@0: // L57 return 0u \ No newline at end of file diff --git a/test_cases/tuple_support/out/TupleSupport.ssa.opt_pass_3.ir b/test_cases/tuple_support/out/TupleSupport.ssa.opt_pass_3.ir index ec7cd84825..79be45272c 100644 --- a/test_cases/tuple_support/out/TupleSupport.ssa.opt_pass_3.ir +++ b/test_cases/tuple_support/out/TupleSupport.ssa.opt_pass_3.ir @@ -33,18 +33,19 @@ contract test_cases.tuple_support.tuple_support.TupleSupport: (log tmp%17#0) test_cases.tuple_support.tuple_support.test_tuple_swap(0u) test_cases.tuple_support.tuple_support.slicing(1u, 2u, 3u, 4u, 5u, 6u, 7u, 8u) + test_cases.tuple_support.tuple_support.bin_ops() return 3u subroutine test_cases.tuple_support.tuple_support.add_three_values(values.0: uint64, values.1: uint64, values.2: uint64) -> uint64: - block@0: // L76 + block@0: // L90 let total#0: uint64 = 0u let tuple_index%0#0: uint64 = 0u goto block@4 - block@2: // for_header_1_L79 + block@2: // for_header_1_L93 goto block@4 - block@3: // for_header_2_L79 + block@3: // for_header_2_L93 goto block@4 - block@4: // for_body_L79 + block@4: // for_body_L93 let total#1: uint64 = φ(total#0 <- block@0, total#4 <- block@2, total#4 <- block@3) let value#3: uint64 = φ(values.0#0 <- block@0, values.1#0 <- block@2, values.2#0 <- block@3) let tuple_index%0#1: uint64 = φ(tuple_index%0#0 <- block@0, tuple_index%0#4 <- block@2, tuple_index%0#4 <- block@3) @@ -53,12 +54,12 @@ contract test_cases.tuple_support.tuple_support.TupleSupport: goto_nth [block@2, block@3][tuple_index%0#1] else return total#4 subroutine test_cases.tuple_support.tuple_support.bytes_combine(arg.0: bytes, arg.1: bytes) -> bytes: - block@0: // L60 + block@0: // L74 let result#0: bytes = (concat arg.0#0 arg.1#0) return result#0 subroutine test_cases.tuple_support.tuple_support.addw2(a.0: uint64, a.1: uint64, b.0: uint64, b.1: uint64) -> : - block@0: // L85 + block@0: // L99 let (lo_carry#0: uint64, c_lo#0: uint64) = (addw a.1#0 b.1#0) let (hi_carry1#0: uint64, c_mid#0: uint64) = (addw a.0#0 b.0#0) let (hi_carry2#0: uint64, c_mid#1: uint64) = (addw c_mid#0 lo_carry#0) @@ -68,24 +69,24 @@ contract test_cases.tuple_support.tuple_support.TupleSupport: return c_hi#0 c_mid#1 c_lo#0 subroutine test_cases.tuple_support.tuple_support.bytes_multiply(arg.0: bytes, arg.1: uint64) -> bytes: - block@0: // L67 + block@0: // L81 let result#0: bytes = 0x let range_item%0#0: uint64 = 0u goto block@1 - block@1: // for_header_L71 + block@1: // for_header_L85 let _i#0: uint64 = φ(range_item%0#0 <- block@0, range_item%0#3 <- block@2) let result#3: bytes = φ(result#0 <- block@0, result#2 <- block@2) let continue_looping%0#0: bool = (< _i#0 arg.1#0) goto continue_looping%0#0 ? block@2 : block@5 - block@2: // for_body_L71 + block@2: // for_body_L85 let result#2: bytes = (concat result#3 arg.0#0) let range_item%0#3: uint64 = (+ _i#0 1u) goto block@1 - block@5: // after_for_L71 + block@5: // after_for_L85 return result#3 subroutine test_cases.tuple_support.tuple_support.test_tuple_swap(zero: uint64) -> void: - block@0: // L97 + block@0: // L111 let a#0: uint64 = (+ zero#0 1u) let b#0: uint64 = (+ zero#0 2u) let tmp%0#0: bool = (== b#0 2u) @@ -95,7 +96,7 @@ contract test_cases.tuple_support.tuple_support.TupleSupport: return subroutine test_cases.tuple_support.tuple_support.slicing(values.0: uint64, values.1: uint64, values.2: uint64, values.3: uint64, values.4: uint64, values.5: uint64, values.6: uint64, values.7: uint64) -> void: - block@0: // L106 + block@0: // L120 let tmp%0#0: uint64 = test_cases.tuple_support.tuple_support.add_three_values(values.0#0, values.1#0, values.2#0) let tmp%1#0: uint64 = (+ values.0#0 values.1#0) let tmp%2#0: uint64 = (+ tmp%1#0 values.2#0) @@ -103,6 +104,10 @@ contract test_cases.tuple_support.tuple_support.TupleSupport: (assert tmp%3#0) return + subroutine test_cases.tuple_support.tuple_support.bin_ops() -> void: + block@0: // L61 + return + subroutine test_cases.tuple_support.tuple_support.TupleSupport.__init__() -> void: block@0: // L5 (app_global_put "state" 0u) @@ -110,5 +115,5 @@ contract test_cases.tuple_support.tuple_support.TupleSupport: program clear-state: subroutine test_cases.tuple_support.tuple_support.TupleSupport.clear_state_program() -> uint64: - block@0: // L56 + block@0: // L57 return 0u \ No newline at end of file diff --git a/test_cases/tuple_support/out/TupleSupport.ssa.opt_pass_4.ir b/test_cases/tuple_support/out/TupleSupport.ssa.opt_pass_4.ir index a2f0b2b1d9..f59a74e33c 100644 --- a/test_cases/tuple_support/out/TupleSupport.ssa.opt_pass_4.ir +++ b/test_cases/tuple_support/out/TupleSupport.ssa.opt_pass_4.ir @@ -29,18 +29,19 @@ contract test_cases.tuple_support.tuple_support.TupleSupport: (log tmp%17#0) test_cases.tuple_support.tuple_support.test_tuple_swap(0u) test_cases.tuple_support.tuple_support.slicing(1u, 2u, 3u, 4u, 5u, 6u, 7u, 8u) + test_cases.tuple_support.tuple_support.bin_ops() return 3u subroutine test_cases.tuple_support.tuple_support.add_three_values(values.0: uint64, values.1: uint64, values.2: uint64) -> uint64: - block@0: // L76 + block@0: // L90 let total#0: uint64 = 0u let tuple_index%0#0: uint64 = 0u goto block@4 - block@2: // for_header_1_L79 + block@2: // for_header_1_L93 goto block@4 - block@3: // for_header_2_L79 + block@3: // for_header_2_L93 goto block@4 - block@4: // for_body_L79 + block@4: // for_body_L93 let total#1: uint64 = φ(total#0 <- block@0, total#4 <- block@2, total#4 <- block@3) let value#3: uint64 = φ(values.0#0 <- block@0, values.1#0 <- block@2, values.2#0 <- block@3) let tuple_index%0#1: uint64 = φ(tuple_index%0#0 <- block@0, tuple_index%0#4 <- block@2, tuple_index%0#4 <- block@3) @@ -49,12 +50,12 @@ contract test_cases.tuple_support.tuple_support.TupleSupport: goto_nth [block@2, block@3][tuple_index%0#1] else return total#4 subroutine test_cases.tuple_support.tuple_support.bytes_combine(arg.0: bytes, arg.1: bytes) -> bytes: - block@0: // L60 + block@0: // L74 let result#0: bytes = (concat arg.0#0 arg.1#0) return result#0 subroutine test_cases.tuple_support.tuple_support.addw2(a.0: uint64, a.1: uint64, b.0: uint64, b.1: uint64) -> : - block@0: // L85 + block@0: // L99 let (lo_carry#0: uint64, c_lo#0: uint64) = (addw a.1#0 b.1#0) let (hi_carry1#0: uint64, c_mid#0: uint64) = (addw a.0#0 b.0#0) let (hi_carry2#0: uint64, c_mid#1: uint64) = (addw c_mid#0 lo_carry#0) @@ -64,24 +65,24 @@ contract test_cases.tuple_support.tuple_support.TupleSupport: return c_hi#0 c_mid#1 c_lo#0 subroutine test_cases.tuple_support.tuple_support.bytes_multiply(arg.0: bytes, arg.1: uint64) -> bytes: - block@0: // L67 + block@0: // L81 let result#0: bytes = 0x let range_item%0#0: uint64 = 0u goto block@1 - block@1: // for_header_L71 + block@1: // for_header_L85 let _i#0: uint64 = φ(range_item%0#0 <- block@0, range_item%0#3 <- block@2) let result#3: bytes = φ(result#0 <- block@0, result#2 <- block@2) let continue_looping%0#0: bool = (< _i#0 arg.1#0) goto continue_looping%0#0 ? block@2 : block@5 - block@2: // for_body_L71 + block@2: // for_body_L85 let result#2: bytes = (concat result#3 arg.0#0) let range_item%0#3: uint64 = (+ _i#0 1u) goto block@1 - block@5: // after_for_L71 + block@5: // after_for_L85 return result#3 subroutine test_cases.tuple_support.tuple_support.test_tuple_swap(zero: uint64) -> void: - block@0: // L97 + block@0: // L111 let a#0: uint64 = (+ zero#0 1u) let b#0: uint64 = (+ zero#0 2u) let tmp%0#0: bool = (== b#0 2u) @@ -91,7 +92,7 @@ contract test_cases.tuple_support.tuple_support.TupleSupport: return subroutine test_cases.tuple_support.tuple_support.slicing(values.0: uint64, values.1: uint64, values.2: uint64, values.3: uint64, values.4: uint64, values.5: uint64, values.6: uint64, values.7: uint64) -> void: - block@0: // L106 + block@0: // L120 let tmp%0#0: uint64 = test_cases.tuple_support.tuple_support.add_three_values(values.0#0, values.1#0, values.2#0) let tmp%1#0: uint64 = (+ values.0#0 values.1#0) let tmp%2#0: uint64 = (+ tmp%1#0 values.2#0) @@ -99,6 +100,10 @@ contract test_cases.tuple_support.tuple_support.TupleSupport: (assert tmp%3#0) return + subroutine test_cases.tuple_support.tuple_support.bin_ops() -> void: + block@0: // L61 + return + subroutine test_cases.tuple_support.tuple_support.TupleSupport.__init__() -> void: block@0: // L5 (app_global_put "state" 0u) @@ -106,5 +111,5 @@ contract test_cases.tuple_support.tuple_support.TupleSupport: program clear-state: subroutine test_cases.tuple_support.tuple_support.TupleSupport.clear_state_program() -> uint64: - block@0: // L56 + block@0: // L57 return 0u \ No newline at end of file diff --git a/test_cases/tuple_support/out/tuple_support.awst b/test_cases/tuple_support/out/tuple_support.awst index 9cfd85ea56..cb2515889e 100644 --- a/test_cases/tuple_support/out/tuple_support.awst +++ b/test_cases/tuple_support/out/tuple_support.awst @@ -43,6 +43,7 @@ contract TupleSupport log(test_cases.tuple_support.tuple_support::bytes_multiply((hex<"6E61">, 5u))) test_cases.tuple_support.tuple_support::test_tuple_swap(zero=0u) test_cases.tuple_support.tuple_support::slicing((1u, 2u, 3u, 4u, 5u, 6u, 7u, 8u)) + test_cases.tuple_support.tuple_support::bin_ops() return a + b } @@ -52,6 +53,18 @@ contract TupleSupport } } +subroutine bin_ops(): void +{ + a: tuple = (1u, 1u, 1u) + assert(a[0] == 1u) + assert(a[1] == 1u) + assert(a[2] == 1u) + b: tuple = (1u, hex<"32">, 3u) + assert(b[0] == 1u) + assert(b[1] == hex<"32">) + assert(b[2] == 3u) +} + subroutine bytes_combine(arg: tuple): bytes { (a, b): tuple = arg diff --git a/test_cases/tuple_support/out_O2/TupleSupport.approval.teal b/test_cases/tuple_support/out_O2/TupleSupport.approval.teal index 79121b545e..f4f9462770 100644 --- a/test_cases/tuple_support/out_O2/TupleSupport.approval.teal +++ b/test_cases/tuple_support/out_O2/TupleSupport.approval.teal @@ -54,6 +54,7 @@ main_entrypoint@2: int 7 int 8 callsub slicing + callsub bin_ops int 3 return @@ -183,6 +184,12 @@ slicing: retsub +// test_cases.tuple_support.tuple_support.bin_ops() -> void: +bin_ops: + proto 0 0 + retsub + + // test_cases.tuple_support.tuple_support.TupleSupport.__init__() -> void: __init__: proto 0 0 diff --git a/test_cases/tuple_support/out_O2/TupleSupport.destructured.ir b/test_cases/tuple_support/out_O2/TupleSupport.destructured.ir index 7e8ec0adba..0bfe02c5f0 100644 --- a/test_cases/tuple_support/out_O2/TupleSupport.destructured.ir +++ b/test_cases/tuple_support/out_O2/TupleSupport.destructured.ir @@ -29,34 +29,35 @@ contract test_cases.tuple_support.tuple_support.TupleSupport: (log tmp%17#0) test_cases.tuple_support.tuple_support.test_tuple_swap(0u) test_cases.tuple_support.tuple_support.slicing(1u, 2u, 3u, 4u, 5u, 6u, 7u, 8u) + test_cases.tuple_support.tuple_support.bin_ops() return 3u subroutine test_cases.tuple_support.tuple_support.add_three_values(values.0: uint64, values.1: uint64, values.2: uint64) -> uint64: - block@0: // L76 + block@0: // L90 let total#0: uint64 = 0u let tuple_index%0#0: uint64 = 0u let value#3: uint64 = values.0#0 goto block@4 - block@2: // for_header_1_L79 + block@2: // for_header_1_L93 let tuple_index%0#0: uint64 = tuple_index%0#4 let value#3: uint64 = values.1#0 goto block@4 - block@3: // for_header_2_L79 + block@3: // for_header_2_L93 let tuple_index%0#0: uint64 = tuple_index%0#4 let value#3: uint64 = values.2#0 goto block@4 - block@4: // for_body_L79 + block@4: // for_body_L93 let total#0: uint64 = (+ total#0 value#3) let tuple_index%0#4: uint64 = (+ tuple_index%0#0 1u) goto_nth [block@2, block@3][tuple_index%0#0] else return total#0 subroutine test_cases.tuple_support.tuple_support.bytes_combine(arg.0: bytes, arg.1: bytes) -> bytes: - block@0: // L60 + block@0: // L74 let result#0: bytes = (concat arg.0#0 arg.1#0) return result#0 subroutine test_cases.tuple_support.tuple_support.addw2(a.0: uint64, a.1: uint64, b.0: uint64, b.1: uint64) -> : - block@0: // L85 + block@0: // L99 let (lo_carry#0: uint64, c_lo#0: uint64) = (addw a.1#0 b.1#0) let (hi_carry1#0: uint64, c_mid#0: uint64) = (addw a.0#0 b.0#0) let (hi_carry2#0: uint64, c_mid#0: uint64) = (addw c_mid#0 lo_carry#0) @@ -66,24 +67,24 @@ contract test_cases.tuple_support.tuple_support.TupleSupport: return c_hi#0 c_mid#0 c_lo#0 subroutine test_cases.tuple_support.tuple_support.bytes_multiply(arg.0: bytes, arg.1: uint64) -> bytes: - block@0: // L67 + block@0: // L81 let result#0: bytes = 0x let range_item%0#0: uint64 = 0u let _i#0: uint64 = range_item%0#0 goto block@1 - block@1: // for_header_L71 + block@1: // for_header_L85 let continue_looping%0#0: bool = (< _i#0 arg.1#0) goto continue_looping%0#0 ? block@2 : block@5 - block@2: // for_body_L71 + block@2: // for_body_L85 let result#0: bytes = (concat result#0 arg.0#0) let range_item%0#0: uint64 = (+ _i#0 1u) let _i#0: uint64 = range_item%0#0 goto block@1 - block@5: // after_for_L71 + block@5: // after_for_L85 return result#0 subroutine test_cases.tuple_support.tuple_support.test_tuple_swap(zero: uint64) -> void: - block@0: // L97 + block@0: // L111 let a#0: uint64 = (+ zero#0 1u) let b#0: uint64 = (+ zero#0 2u) let tmp%0#0: bool = (== b#0 2u) @@ -93,7 +94,7 @@ contract test_cases.tuple_support.tuple_support.TupleSupport: return subroutine test_cases.tuple_support.tuple_support.slicing(values.0: uint64, values.1: uint64, values.2: uint64, values.3: uint64, values.4: uint64, values.5: uint64, values.6: uint64, values.7: uint64) -> void: - block@0: // L106 + block@0: // L120 let tmp%0#0: uint64 = test_cases.tuple_support.tuple_support.add_three_values(values.0#0, values.1#0, values.2#0) let tmp%1#0: uint64 = (+ values.0#0 values.1#0) let tmp%2#0: uint64 = (+ tmp%1#0 values.2#0) @@ -101,6 +102,10 @@ contract test_cases.tuple_support.tuple_support.TupleSupport: (assert tmp%3#0) return + subroutine test_cases.tuple_support.tuple_support.bin_ops() -> void: + block@0: // L61 + return + subroutine test_cases.tuple_support.tuple_support.TupleSupport.__init__() -> void: block@0: // L5 (app_global_put "state" 0u) @@ -108,5 +113,5 @@ contract test_cases.tuple_support.tuple_support.TupleSupport: program clear-state: subroutine test_cases.tuple_support.tuple_support.TupleSupport.clear_state_program() -> uint64: - block@0: // L56 + block@0: // L57 return 0u \ No newline at end of file diff --git a/test_cases/tuple_support/out_unoptimized/TupleSupport.approval.teal b/test_cases/tuple_support/out_unoptimized/TupleSupport.approval.teal index ac1c7982ce..cde40e0e17 100644 --- a/test_cases/tuple_support/out_unoptimized/TupleSupport.approval.teal +++ b/test_cases/tuple_support/out_unoptimized/TupleSupport.approval.teal @@ -213,11 +213,14 @@ main_after_if_else@5: // ) // ) callsub slicing + // tuple_support/tuple_support.py:54 + // bin_ops() + callsub bin_ops // tuple_support/tuple_support.py:11 // (a, b) = (UInt64(1), UInt64(2)) int 1 int 2 - // tuple_support/tuple_support.py:54 + // tuple_support/tuple_support.py:55 // return a + b + return @@ -225,24 +228,24 @@ main_after_if_else@5: // test_cases.tuple_support.tuple_support.add_three_values(values.0: uint64, values.1: uint64, values.2: uint64) -> uint64: add_three_values: - // tuple_support/tuple_support.py:76-77 + // tuple_support/tuple_support.py:90-91 // @subroutine // def add_three_values(values: tuple[UInt64, UInt64, UInt64]) -> UInt64: proto 3 1 byte "" dup - // tuple_support/tuple_support.py:78 + // tuple_support/tuple_support.py:92 // total = UInt64(0) int 0 int 0 frame_bury 0 - // tuple_support/tuple_support.py:79 + // tuple_support/tuple_support.py:93 // for value in values: frame_dig -3 b add_three_values_for_body@4 add_three_values_for_header_1@2: - // tuple_support/tuple_support.py:79 + // tuple_support/tuple_support.py:93 // for value in values: frame_dig -2 frame_dig 1 @@ -250,14 +253,14 @@ add_three_values_for_header_1@2: b add_three_values_for_body@4 add_three_values_for_header_2@3: - // tuple_support/tuple_support.py:79 + // tuple_support/tuple_support.py:93 // for value in values: frame_dig -1 frame_dig 1 frame_bury 0 add_three_values_for_body@4: - // tuple_support/tuple_support.py:80 + // tuple_support/tuple_support.py:94 // total += value frame_dig 2 uncover 1 @@ -268,10 +271,10 @@ add_three_values_for_body@4: int 1 + frame_bury 1 - // tuple_support/tuple_support.py:79 + // tuple_support/tuple_support.py:93 // for value in values: switch add_three_values_for_header_1@2 add_three_values_for_header_2@3 - // tuple_support/tuple_support.py:82 + // tuple_support/tuple_support.py:96 // return total frame_dig 2 frame_bury 0 @@ -280,62 +283,62 @@ add_three_values_for_body@4: // test_cases.tuple_support.tuple_support.bytes_combine(arg.0: bytes, arg.1: bytes) -> bytes: bytes_combine: - // tuple_support/tuple_support.py:60-61 + // tuple_support/tuple_support.py:74-75 // @subroutine // def bytes_combine(arg: tuple[Bytes, Bytes]) -> Bytes: proto 2 1 - // tuple_support/tuple_support.py:62 + // tuple_support/tuple_support.py:76 // a, b = arg frame_dig -2 frame_dig -1 - // tuple_support/tuple_support.py:63 + // tuple_support/tuple_support.py:77 // result = a + b concat - // tuple_support/tuple_support.py:64 + // tuple_support/tuple_support.py:78 // return result retsub // test_cases.tuple_support.tuple_support.addw2(a.0: uint64, a.1: uint64, b.0: uint64, b.1: uint64) -> uint64, uint64, uint64: addw2: - // tuple_support/tuple_support.py:85-86 + // tuple_support/tuple_support.py:99-100 // @subroutine // def addw2(a: tuple[UInt64, UInt64], b: tuple[UInt64, UInt64]) -> tuple[UInt64, UInt64, UInt64]: proto 4 3 - // tuple_support/tuple_support.py:87 + // tuple_support/tuple_support.py:101 // a_hi, a_lo = a frame_dig -4 frame_dig -3 - // tuple_support/tuple_support.py:88 + // tuple_support/tuple_support.py:102 // b_hi, b_lo = b frame_dig -2 cover 1 frame_dig -1 - // tuple_support/tuple_support.py:89 + // tuple_support/tuple_support.py:103 // lo_carry, c_lo = op.addw(a_lo, b_lo) addw cover 1 cover 2 cover 3 - // tuple_support/tuple_support.py:90 + // tuple_support/tuple_support.py:104 // hi_carry1, c_mid = op.addw(a_hi, b_hi) uncover 2 uncover 1 addw - // tuple_support/tuple_support.py:91 + // tuple_support/tuple_support.py:105 // hi_carry2, c_mid = op.addw(c_mid, lo_carry) uncover 2 addw cover 2 - // tuple_support/tuple_support.py:92 + // tuple_support/tuple_support.py:106 // did_overflow, c_hi = op.addw(hi_carry1, hi_carry2) addw cover 1 - // tuple_support/tuple_support.py:93 + // tuple_support/tuple_support.py:107 // assert not did_overflow, "is such a thing even possible? 👽" ! assert // is such a thing even possible? 👽 - // tuple_support/tuple_support.py:94 + // tuple_support/tuple_support.py:108 // return c_hi, c_mid, c_lo uncover 1 uncover 2 @@ -344,37 +347,37 @@ addw2: // test_cases.tuple_support.tuple_support.bytes_multiply(arg.0: bytes, arg.1: uint64) -> bytes: bytes_multiply: - // tuple_support/tuple_support.py:67-68 + // tuple_support/tuple_support.py:81-82 // @subroutine // def bytes_multiply(arg: tuple[Bytes, UInt64]) -> Bytes: proto 2 1 - // tuple_support/tuple_support.py:69 + // tuple_support/tuple_support.py:83 // b, count = arg frame_dig -2 frame_dig -1 - // tuple_support/tuple_support.py:70 + // tuple_support/tuple_support.py:84 // result = Bytes() byte 0x - // tuple_support/tuple_support.py:71 + // tuple_support/tuple_support.py:85 // for _i in urange(count): int 1 assert // Step cannot be zero int 0 bytes_multiply_for_header@1: - // tuple_support/tuple_support.py:71 + // tuple_support/tuple_support.py:85 // for _i in urange(count): frame_dig 3 frame_dig 1 < bz bytes_multiply_after_for@5 - // tuple_support/tuple_support.py:72 + // tuple_support/tuple_support.py:86 // result += b frame_dig 2 frame_dig 0 concat frame_bury 2 - // tuple_support/tuple_support.py:71 + // tuple_support/tuple_support.py:85 // for _i in urange(count): frame_dig 3 int 1 @@ -383,7 +386,7 @@ bytes_multiply_for_header@1: b bytes_multiply_for_header@1 bytes_multiply_after_for@5: - // tuple_support/tuple_support.py:73 + // tuple_support/tuple_support.py:87 // return result frame_dig 2 frame_bury 0 @@ -392,26 +395,26 @@ bytes_multiply_after_for@5: // test_cases.tuple_support.tuple_support.test_tuple_swap(zero: uint64) -> void: test_tuple_swap: - // tuple_support/tuple_support.py:97-98 + // tuple_support/tuple_support.py:111-112 // @subroutine // def test_tuple_swap(zero: UInt64) -> None: proto 1 0 - // tuple_support/tuple_support.py:99 + // tuple_support/tuple_support.py:113 // a = zero + 1 frame_dig -1 int 1 + - // tuple_support/tuple_support.py:100 + // tuple_support/tuple_support.py:114 // b = zero + 2 frame_dig -1 int 2 + - // tuple_support/tuple_support.py:102 + // tuple_support/tuple_support.py:116 // assert a == 2, "a should be two" int 2 == assert // a should be two - // tuple_support/tuple_support.py:103 + // tuple_support/tuple_support.py:117 // assert b == 1, "b should be one" int 1 == @@ -421,16 +424,16 @@ test_tuple_swap: // test_cases.tuple_support.tuple_support.slicing(values.0: uint64, values.1: uint64, values.2: uint64, values.3: uint64, values.4: uint64, values.5: uint64, values.6: uint64, values.7: uint64) -> void: slicing: - // tuple_support/tuple_support.py:106-107 + // tuple_support/tuple_support.py:120-121 // @subroutine // def slicing(values: tuple[UInt64, UInt64, UInt64, UInt64, UInt64, UInt64, UInt64, UInt64]) -> None: proto 8 0 - // tuple_support/tuple_support.py:108 + // tuple_support/tuple_support.py:122 // one_to_three = values[0:3] frame_dig -8 frame_dig -7 frame_dig -6 - // tuple_support/tuple_support.py:109 + // tuple_support/tuple_support.py:123 // assert add_three_values(one_to_three) == values[0] + values[1] + values[2] uncover 2 dig 2 @@ -443,7 +446,7 @@ slicing: + == assert - // tuple_support/tuple_support.py:111 + // tuple_support/tuple_support.py:125 // assert one_to_three[-2:-1][0] == one_to_three[1] dup uncover 1 @@ -452,6 +455,63 @@ slicing: retsub +// test_cases.tuple_support.tuple_support.bin_ops() -> void: +bin_ops: + // tuple_support/tuple_support.py:61-62 + // @subroutine + // def bin_ops() -> None: + proto 0 0 + // tuple_support/tuple_support.py:63 + // a = (UInt64(1),) * 3 + int 1 + // tuple_support/tuple_support.py:64 + // assert a[0] == 1 + int 1 + == + assert + // tuple_support/tuple_support.py:63 + // a = (UInt64(1),) * 3 + int 1 + // tuple_support/tuple_support.py:65 + // assert a[1] == 1 + int 1 + == + assert + // tuple_support/tuple_support.py:63 + // a = (UInt64(1),) * 3 + int 1 + // tuple_support/tuple_support.py:66 + // assert a[2] == 1 + int 1 + == + assert + // tuple_support/tuple_support.py:68 + // b = (UInt64(1),) + (Bytes(b"2"), UInt64(3)) # noqa: RUF005 + int 1 + // tuple_support/tuple_support.py:69 + // assert b[0] == 1 + int 1 + == + assert + // tuple_support/tuple_support.py:68 + // b = (UInt64(1),) + (Bytes(b"2"), UInt64(3)) # noqa: RUF005 + byte 0x32 + // tuple_support/tuple_support.py:70 + // assert b[1] == b"2" + byte 0x32 + == + assert + // tuple_support/tuple_support.py:68 + // b = (UInt64(1),) + (Bytes(b"2"), UInt64(3)) # noqa: RUF005 + int 3 + // tuple_support/tuple_support.py:71 + // assert b[2] == 3 + int 3 + == + assert + retsub + + // test_cases.tuple_support.tuple_support.TupleSupport.__init__() -> void: __init__: // tuple_support/tuple_support.py:5 diff --git a/test_cases/tuple_support/out_unoptimized/TupleSupport.clear.teal b/test_cases/tuple_support/out_unoptimized/TupleSupport.clear.teal index ce7d14b617..0a08f3664e 100644 --- a/test_cases/tuple_support/out_unoptimized/TupleSupport.clear.teal +++ b/test_cases/tuple_support/out_unoptimized/TupleSupport.clear.teal @@ -1,7 +1,7 @@ #pragma version 10 test_cases.tuple_support.tuple_support.TupleSupport.clear_state_program: - // tuple_support/tuple_support.py:57 + // tuple_support/tuple_support.py:58 // return UInt64(0) int 0 return diff --git a/test_cases/tuple_support/out_unoptimized/TupleSupport.destructured.ir b/test_cases/tuple_support/out_unoptimized/TupleSupport.destructured.ir index 087fb7ee2c..e2c561a29c 100644 --- a/test_cases/tuple_support/out_unoptimized/TupleSupport.destructured.ir +++ b/test_cases/tuple_support/out_unoptimized/TupleSupport.destructured.ir @@ -60,43 +60,44 @@ contract test_cases.tuple_support.tuple_support.TupleSupport: (log tmp%17#0) test_cases.tuple_support.tuple_support.test_tuple_swap(0u) test_cases.tuple_support.tuple_support.slicing(1u, 2u, 3u, 4u, 5u, 6u, 7u, 8u) + test_cases.tuple_support.tuple_support.bin_ops() let tmp%18#0: uint64 = (+ 1u 2u) return tmp%18#0 subroutine test_cases.tuple_support.tuple_support.add_three_values(values.0: uint64, values.1: uint64, values.2: uint64) -> uint64: - block@0: // L76 + block@0: // L90 let total#0: uint64 = 0u goto block@1 - block@1: // for_header_0_L79 + block@1: // for_header_0_L93 let tuple_index%0#0: uint64 = 0u let value#0: uint64 = values.0#0 goto block@4 - block@2: // for_header_1_L79 + block@2: // for_header_1_L93 let value#0: uint64 = values.1#0 let tuple_index%0#0: uint64 = tuple_index%0#4 goto block@4 - block@3: // for_header_2_L79 + block@3: // for_header_2_L93 let value#0: uint64 = values.2#0 let tuple_index%0#0: uint64 = tuple_index%0#4 goto block@4 - block@4: // for_body_L79 + block@4: // for_body_L93 let total#0: uint64 = (+ total#0 value#0) goto block@5 - block@5: // for_footer_L79 + block@5: // for_footer_L93 let tuple_index%0#4: uint64 = (+ tuple_index%0#0 1u) goto_nth [block@2, block@3][tuple_index%0#0] else goto block@6 - block@6: // after_for_L79 + block@6: // after_for_L93 return total#0 subroutine test_cases.tuple_support.tuple_support.bytes_combine(arg.0: bytes, arg.1: bytes) -> bytes: - block@0: // L60 + block@0: // L74 let a#0: bytes = arg.0#0 let b#0: bytes = arg.1#0 let result#0: bytes = (concat a#0 b#0) return result#0 subroutine test_cases.tuple_support.tuple_support.addw2(a.0: uint64, a.1: uint64, b.0: uint64, b.1: uint64) -> : - block@0: // L85 + block@0: // L99 let a_hi#0: uint64 = a.0#0 let a_lo#0: uint64 = a.1#0 let b_hi#0: uint64 = b.0#0 @@ -119,29 +120,29 @@ contract test_cases.tuple_support.tuple_support.TupleSupport: return c_hi#0 c_mid#0 c_lo#0 subroutine test_cases.tuple_support.tuple_support.bytes_multiply(arg.0: bytes, arg.1: uint64) -> bytes: - block@0: // L67 + block@0: // L81 let b#0: bytes = arg.0#0 let count#0: uint64 = arg.1#0 let result#0: bytes = 0x (assert 1u) // Step cannot be zero let range_item%0#0: uint64 = 0u goto block@1 - block@1: // for_header_L71 + block@1: // for_header_L85 let continue_looping%0#0: bool = (< range_item%0#0 count#0) goto continue_looping%0#0 ? block@2 : block@5 - block@2: // for_body_L71 + block@2: // for_body_L85 let result#0: bytes = (concat result#0 b#0) goto block@3 - block@3: // for_footer_L71 + block@3: // for_footer_L85 goto block@4 - block@4: // for_increment_L71 + block@4: // for_increment_L85 let range_item%0#0: uint64 = (+ range_item%0#0 1u) goto block@1 - block@5: // after_for_L71 + block@5: // after_for_L85 return result#0 subroutine test_cases.tuple_support.tuple_support.test_tuple_swap(zero: uint64) -> void: - block@0: // L97 + block@0: // L111 let a#0: uint64 = (+ zero#0 1u) let b#0: uint64 = (+ zero#0 2u) let a#1: uint64 = b#0 @@ -153,7 +154,7 @@ contract test_cases.tuple_support.tuple_support.TupleSupport: return subroutine test_cases.tuple_support.tuple_support.slicing(values.0: uint64, values.1: uint64, values.2: uint64, values.3: uint64, values.4: uint64, values.5: uint64, values.6: uint64, values.7: uint64) -> void: - block@0: // L106 + block@0: // L120 let one_to_three.0#0: uint64 = values.0#0 let one_to_three.1#0: uint64 = values.1#0 let one_to_three.2#0: uint64 = values.2#0 @@ -166,6 +167,22 @@ contract test_cases.tuple_support.tuple_support.TupleSupport: (assert tmp%4#0) return + subroutine test_cases.tuple_support.tuple_support.bin_ops() -> void: + block@0: // L61 + let tmp%0#0: bool = (== 1u 1u) + (assert tmp%0#0) + let tmp%1#0: bool = (== 1u 1u) + (assert tmp%1#0) + let tmp%2#0: bool = (== 1u 1u) + (assert tmp%2#0) + let tmp%3#0: bool = (== 1u 1u) + (assert tmp%3#0) + let tmp%4#0: bool = (== 0x32 0x32) + (assert tmp%4#0) + let tmp%5#0: bool = (== 3u 3u) + (assert tmp%5#0) + return + subroutine test_cases.tuple_support.tuple_support.TupleSupport.__init__() -> void: block@0: // L5 (app_global_put "state" 0u) @@ -173,5 +190,5 @@ contract test_cases.tuple_support.tuple_support.TupleSupport: program clear-state: subroutine test_cases.tuple_support.tuple_support.TupleSupport.clear_state_program() -> uint64: - block@0: // L56 + block@0: // L57 return 0u \ No newline at end of file diff --git a/test_cases/tuple_support/puya.log b/test_cases/tuple_support/puya.log index defcff5745..0406cbf9aa 100644 --- a/test_cases/tuple_support/puya.log +++ b/test_cases/tuple_support/puya.log @@ -526,107 +526,109 @@ debug: Sealing block@0: // L5 debug: Terminated block@0: // L5 debug: Sealing block@0: // L10 debug: Terminated block@0: // L10 -debug: Sealing block@0: // L76 -debug: Terminated block@0: // L76 -debug: Sealing block@1: // for_header_0_L79 -debug: Terminated block@1: // for_header_0_L79 -debug: Terminated block@2: // for_header_1_L79 -debug: Terminated block@3: // for_header_2_L79 -debug: Sealing block@None: // for_body_L79 -debug: Created Phi assignment: let total#1: uint64 = undefined while trying to resolve 'total' in block@4: // for_body_L79 -debug: Added total#0 to Phi node: let total#1: uint64 = φ(total#0 <- block@1) in block@1: // for_header_0_L79 -debug: Looking for 'total' in an unsealed block creating an incomplete Phi: block@2: // for_header_1_L79 -debug: Created Phi assignment: let total#2: uint64 = undefined while trying to resolve 'total' in block@2: // for_header_1_L79 -debug: Added total#2 to Phi node: let total#1: uint64 = φ(total#0 <- block@1, total#2 <- block@2) in block@2: // for_header_1_L79 -debug: Looking for 'total' in an unsealed block creating an incomplete Phi: block@3: // for_header_2_L79 -debug: Created Phi assignment: let total#3: uint64 = undefined while trying to resolve 'total' in block@3: // for_header_2_L79 -debug: Added total#3 to Phi node: let total#1: uint64 = φ(total#0 <- block@1, total#2 <- block@2, total#3 <- block@3) in block@3: // for_header_2_L79 -debug: Created Phi assignment: let value#3: uint64 = undefined while trying to resolve 'value' in block@4: // for_body_L79 -debug: Added value#0 to Phi node: let value#3: uint64 = φ(value#0 <- block@1) in block@1: // for_header_0_L79 -debug: Added value#1 to Phi node: let value#3: uint64 = φ(value#0 <- block@1, value#1 <- block@2) in block@2: // for_header_1_L79 -debug: Added value#2 to Phi node: let value#3: uint64 = φ(value#0 <- block@1, value#1 <- block@2, value#2 <- block@3) in block@3: // for_header_2_L79 -debug: Terminated block@4: // for_body_L79 -debug: Sealing block@5: // for_footer_L79 -debug: Created Phi assignment: let tuple_index%0#1: uint64 = undefined while trying to resolve 'tuple_index%0' in block@4: // for_body_L79 -debug: Added tuple_index%0#0 to Phi node: let tuple_index%0#1: uint64 = φ(tuple_index%0#0 <- block@1) in block@1: // for_header_0_L79 -debug: Looking for 'tuple_index%0' in an unsealed block creating an incomplete Phi: block@2: // for_header_1_L79 -debug: Created Phi assignment: let tuple_index%0#2: uint64 = undefined while trying to resolve 'tuple_index%0' in block@2: // for_header_1_L79 -debug: Added tuple_index%0#2 to Phi node: let tuple_index%0#1: uint64 = φ(tuple_index%0#0 <- block@1, tuple_index%0#2 <- block@2) in block@2: // for_header_1_L79 -debug: Looking for 'tuple_index%0' in an unsealed block creating an incomplete Phi: block@3: // for_header_2_L79 -debug: Created Phi assignment: let tuple_index%0#3: uint64 = undefined while trying to resolve 'tuple_index%0' in block@3: // for_header_2_L79 -debug: Added tuple_index%0#3 to Phi node: let tuple_index%0#1: uint64 = φ(tuple_index%0#0 <- block@1, tuple_index%0#2 <- block@2, tuple_index%0#3 <- block@3) in block@3: // for_header_2_L79 -debug: Terminated block@5: // for_footer_L79 -debug: Sealing block@2: // for_header_1_L79 -debug: Added total#4 to Phi node: let total#2: uint64 = φ(total#4 <- block@5) in block@5: // for_footer_L79 +debug: Sealing block@0: // L90 +debug: Terminated block@0: // L90 +debug: Sealing block@1: // for_header_0_L93 +debug: Terminated block@1: // for_header_0_L93 +debug: Terminated block@2: // for_header_1_L93 +debug: Terminated block@3: // for_header_2_L93 +debug: Sealing block@None: // for_body_L93 +debug: Created Phi assignment: let total#1: uint64 = undefined while trying to resolve 'total' in block@4: // for_body_L93 +debug: Added total#0 to Phi node: let total#1: uint64 = φ(total#0 <- block@1) in block@1: // for_header_0_L93 +debug: Looking for 'total' in an unsealed block creating an incomplete Phi: block@2: // for_header_1_L93 +debug: Created Phi assignment: let total#2: uint64 = undefined while trying to resolve 'total' in block@2: // for_header_1_L93 +debug: Added total#2 to Phi node: let total#1: uint64 = φ(total#0 <- block@1, total#2 <- block@2) in block@2: // for_header_1_L93 +debug: Looking for 'total' in an unsealed block creating an incomplete Phi: block@3: // for_header_2_L93 +debug: Created Phi assignment: let total#3: uint64 = undefined while trying to resolve 'total' in block@3: // for_header_2_L93 +debug: Added total#3 to Phi node: let total#1: uint64 = φ(total#0 <- block@1, total#2 <- block@2, total#3 <- block@3) in block@3: // for_header_2_L93 +debug: Created Phi assignment: let value#3: uint64 = undefined while trying to resolve 'value' in block@4: // for_body_L93 +debug: Added value#0 to Phi node: let value#3: uint64 = φ(value#0 <- block@1) in block@1: // for_header_0_L93 +debug: Added value#1 to Phi node: let value#3: uint64 = φ(value#0 <- block@1, value#1 <- block@2) in block@2: // for_header_1_L93 +debug: Added value#2 to Phi node: let value#3: uint64 = φ(value#0 <- block@1, value#1 <- block@2, value#2 <- block@3) in block@3: // for_header_2_L93 +debug: Terminated block@4: // for_body_L93 +debug: Sealing block@5: // for_footer_L93 +debug: Created Phi assignment: let tuple_index%0#1: uint64 = undefined while trying to resolve 'tuple_index%0' in block@4: // for_body_L93 +debug: Added tuple_index%0#0 to Phi node: let tuple_index%0#1: uint64 = φ(tuple_index%0#0 <- block@1) in block@1: // for_header_0_L93 +debug: Looking for 'tuple_index%0' in an unsealed block creating an incomplete Phi: block@2: // for_header_1_L93 +debug: Created Phi assignment: let tuple_index%0#2: uint64 = undefined while trying to resolve 'tuple_index%0' in block@2: // for_header_1_L93 +debug: Added tuple_index%0#2 to Phi node: let tuple_index%0#1: uint64 = φ(tuple_index%0#0 <- block@1, tuple_index%0#2 <- block@2) in block@2: // for_header_1_L93 +debug: Looking for 'tuple_index%0' in an unsealed block creating an incomplete Phi: block@3: // for_header_2_L93 +debug: Created Phi assignment: let tuple_index%0#3: uint64 = undefined while trying to resolve 'tuple_index%0' in block@3: // for_header_2_L93 +debug: Added tuple_index%0#3 to Phi node: let tuple_index%0#1: uint64 = φ(tuple_index%0#0 <- block@1, tuple_index%0#2 <- block@2, tuple_index%0#3 <- block@3) in block@3: // for_header_2_L93 +debug: Terminated block@5: // for_footer_L93 +debug: Sealing block@2: // for_header_1_L93 +debug: Added total#4 to Phi node: let total#2: uint64 = φ(total#4 <- block@5) in block@5: // for_footer_L93 debug: Replacing trivial Phi node: let total#2: uint64 = φ(total#4 <- block@5) (total#2) with total#4 debug: Deleting Phi assignment: let total#2: uint64 = φ(total#4 <- block@5) debug: Replaced trivial Phi node: let total#2: uint64 = φ(total#4 <- block@5) (total#2) with total#4 in current definition for 1 blocks -debug: Added tuple_index%0#4 to Phi node: let tuple_index%0#2: uint64 = φ(tuple_index%0#4 <- block@5) in block@5: // for_footer_L79 +debug: Added tuple_index%0#4 to Phi node: let tuple_index%0#2: uint64 = φ(tuple_index%0#4 <- block@5) in block@5: // for_footer_L93 debug: Replacing trivial Phi node: let tuple_index%0#2: uint64 = φ(tuple_index%0#4 <- block@5) (tuple_index%0#2) with tuple_index%0#4 debug: Deleting Phi assignment: let tuple_index%0#2: uint64 = φ(tuple_index%0#4 <- block@5) debug: Replaced trivial Phi node: let tuple_index%0#2: uint64 = φ(tuple_index%0#4 <- block@5) (tuple_index%0#2) with tuple_index%0#4 in current definition for 1 blocks -debug: Sealing block@3: // for_header_2_L79 -debug: Added total#4 to Phi node: let total#3: uint64 = φ(total#4 <- block@5) in block@5: // for_footer_L79 +debug: Sealing block@3: // for_header_2_L93 +debug: Added total#4 to Phi node: let total#3: uint64 = φ(total#4 <- block@5) in block@5: // for_footer_L93 debug: Replacing trivial Phi node: let total#3: uint64 = φ(total#4 <- block@5) (total#3) with total#4 debug: Deleting Phi assignment: let total#3: uint64 = φ(total#4 <- block@5) debug: Replaced trivial Phi node: let total#3: uint64 = φ(total#4 <- block@5) (total#3) with total#4 in current definition for 1 blocks -debug: Added tuple_index%0#4 to Phi node: let tuple_index%0#3: uint64 = φ(tuple_index%0#4 <- block@5) in block@5: // for_footer_L79 +debug: Added tuple_index%0#4 to Phi node: let tuple_index%0#3: uint64 = φ(tuple_index%0#4 <- block@5) in block@5: // for_footer_L93 debug: Replacing trivial Phi node: let tuple_index%0#3: uint64 = φ(tuple_index%0#4 <- block@5) (tuple_index%0#3) with tuple_index%0#4 debug: Deleting Phi assignment: let tuple_index%0#3: uint64 = φ(tuple_index%0#4 <- block@5) debug: Replaced trivial Phi node: let tuple_index%0#3: uint64 = φ(tuple_index%0#4 <- block@5) (tuple_index%0#3) with tuple_index%0#4 in current definition for 1 blocks -debug: Sealing block@None: // after_for_L79 -debug: Terminated block@6: // after_for_L79 -debug: Sealing block@0: // L60 -debug: Terminated block@0: // L60 -debug: Sealing block@0: // L85 -debug: Terminated block@0: // L85 -debug: Sealing block@0: // L67 -debug: Terminated block@0: // L67 -debug: Looking for 'range_item%0' in an unsealed block creating an incomplete Phi: block@1: // for_header_L71 -debug: Created Phi assignment: let range_item%0#1: uint64 = undefined while trying to resolve 'range_item%0' in block@1: // for_header_L71 -debug: Terminated block@1: // for_header_L71 -debug: Looking for 'range_item%0' in an unsealed block creating an incomplete Phi: block@2: // for_body_L71 -debug: Created Phi assignment: let range_item%0#2: uint64 = undefined while trying to resolve 'range_item%0' in block@2: // for_body_L71 -debug: Looking for 'result' in an unsealed block creating an incomplete Phi: block@2: // for_body_L71 -debug: Created Phi assignment: let result#1: bytes = undefined while trying to resolve 'result' in block@2: // for_body_L71 -debug: Looking for 'b' in an unsealed block creating an incomplete Phi: block@2: // for_body_L71 -debug: Created Phi assignment: let b#1: bytes = undefined while trying to resolve 'b' in block@2: // for_body_L71 -debug: Terminated block@2: // for_body_L71 -debug: Sealing block@3: // for_footer_L71 -debug: Terminated block@3: // for_footer_L71 -debug: Sealing block@4: // for_increment_L71 -debug: Terminated block@4: // for_increment_L71 -debug: Sealing block@1: // for_header_L71 -debug: Added range_item%0#0 to Phi node: let range_item%0#1: uint64 = φ(range_item%0#0 <- block@0) in block@0: // L67 -debug: Added range_item%0#3 to Phi node: let range_item%0#1: uint64 = φ(range_item%0#0 <- block@0, range_item%0#3 <- block@4) in block@4: // for_increment_L71 -debug: Sealing block@2: // for_body_L71 -debug: Added range_item%0#1 to Phi node: let range_item%0#2: uint64 = φ(range_item%0#1 <- block@1) in block@1: // for_header_L71 +debug: Sealing block@None: // after_for_L93 +debug: Terminated block@6: // after_for_L93 +debug: Sealing block@0: // L74 +debug: Terminated block@0: // L74 +debug: Sealing block@0: // L99 +debug: Terminated block@0: // L99 +debug: Sealing block@0: // L81 +debug: Terminated block@0: // L81 +debug: Looking for 'range_item%0' in an unsealed block creating an incomplete Phi: block@1: // for_header_L85 +debug: Created Phi assignment: let range_item%0#1: uint64 = undefined while trying to resolve 'range_item%0' in block@1: // for_header_L85 +debug: Terminated block@1: // for_header_L85 +debug: Looking for 'range_item%0' in an unsealed block creating an incomplete Phi: block@2: // for_body_L85 +debug: Created Phi assignment: let range_item%0#2: uint64 = undefined while trying to resolve 'range_item%0' in block@2: // for_body_L85 +debug: Looking for 'result' in an unsealed block creating an incomplete Phi: block@2: // for_body_L85 +debug: Created Phi assignment: let result#1: bytes = undefined while trying to resolve 'result' in block@2: // for_body_L85 +debug: Looking for 'b' in an unsealed block creating an incomplete Phi: block@2: // for_body_L85 +debug: Created Phi assignment: let b#1: bytes = undefined while trying to resolve 'b' in block@2: // for_body_L85 +debug: Terminated block@2: // for_body_L85 +debug: Sealing block@3: // for_footer_L85 +debug: Terminated block@3: // for_footer_L85 +debug: Sealing block@4: // for_increment_L85 +debug: Terminated block@4: // for_increment_L85 +debug: Sealing block@1: // for_header_L85 +debug: Added range_item%0#0 to Phi node: let range_item%0#1: uint64 = φ(range_item%0#0 <- block@0) in block@0: // L81 +debug: Added range_item%0#3 to Phi node: let range_item%0#1: uint64 = φ(range_item%0#0 <- block@0, range_item%0#3 <- block@4) in block@4: // for_increment_L85 +debug: Sealing block@2: // for_body_L85 +debug: Added range_item%0#1 to Phi node: let range_item%0#2: uint64 = φ(range_item%0#1 <- block@1) in block@1: // for_header_L85 debug: Replacing trivial Phi node: let range_item%0#2: uint64 = φ(range_item%0#1 <- block@1) (range_item%0#2) with range_item%0#1 debug: Deleting Phi assignment: let range_item%0#2: uint64 = φ(range_item%0#1 <- block@1) debug: Replaced trivial Phi node: let range_item%0#2: uint64 = φ(range_item%0#1 <- block@1) (range_item%0#2) with range_item%0#1 in current definition for 2 blocks -debug: Created Phi assignment: let result#3: bytes = undefined while trying to resolve 'result' in block@1: // for_header_L71 -debug: Added result#0 to Phi node: let result#3: bytes = φ(result#0 <- block@0) in block@0: // L67 -debug: Added result#2 to Phi node: let result#3: bytes = φ(result#0 <- block@0, result#2 <- block@4) in block@4: // for_increment_L71 -debug: Added result#3 to Phi node: let result#1: bytes = φ(result#3 <- block@1) in block@1: // for_header_L71 +debug: Created Phi assignment: let result#3: bytes = undefined while trying to resolve 'result' in block@1: // for_header_L85 +debug: Added result#0 to Phi node: let result#3: bytes = φ(result#0 <- block@0) in block@0: // L81 +debug: Added result#2 to Phi node: let result#3: bytes = φ(result#0 <- block@0, result#2 <- block@4) in block@4: // for_increment_L85 +debug: Added result#3 to Phi node: let result#1: bytes = φ(result#3 <- block@1) in block@1: // for_header_L85 debug: Replacing trivial Phi node: let result#1: bytes = φ(result#3 <- block@1) (result#1) with result#3 debug: Deleting Phi assignment: let result#1: bytes = φ(result#3 <- block@1) debug: Replaced trivial Phi node: let result#1: bytes = φ(result#3 <- block@1) (result#1) with result#3 in current definition for 0 blocks -debug: Created Phi assignment: let b#2: bytes = undefined while trying to resolve 'b' in block@1: // for_header_L71 -debug: Added b#0 to Phi node: let b#2: bytes = φ(b#0 <- block@0) in block@0: // L67 -debug: Added b#1 to Phi node: let b#2: bytes = φ(b#0 <- block@0, b#1 <- block@4) in block@4: // for_increment_L71 -debug: Added b#2 to Phi node: let b#1: bytes = φ(b#2 <- block@1) in block@1: // for_header_L71 +debug: Created Phi assignment: let b#2: bytes = undefined while trying to resolve 'b' in block@1: // for_header_L85 +debug: Added b#0 to Phi node: let b#2: bytes = φ(b#0 <- block@0) in block@0: // L81 +debug: Added b#1 to Phi node: let b#2: bytes = φ(b#0 <- block@0, b#1 <- block@4) in block@4: // for_increment_L85 +debug: Added b#2 to Phi node: let b#1: bytes = φ(b#2 <- block@1) in block@1: // for_header_L85 debug: Replacing trivial Phi node: let b#1: bytes = φ(b#2 <- block@1) (b#1) with b#2 debug: Deleting Phi assignment: let b#1: bytes = φ(b#2 <- block@1) debug: Replacing trivial Phi node: let b#2: bytes = φ(b#0 <- block@0, b#2 <- block@4) (b#2) with b#0 debug: Deleting Phi assignment: let b#2: bytes = φ(b#0 <- block@0, b#2 <- block@4) debug: Replaced trivial Phi node: let b#1: bytes = φ(b#2 <- block@1) (b#1) with b#2 in current definition for 3 blocks debug: Replaced trivial Phi node: let b#2: bytes = φ(b#0 <- block@0, b#2 <- block@4) (b#2) with b#0 in current definition for 4 blocks -debug: Sealing block@None: // after_for_L71 -debug: Terminated block@5: // after_for_L71 -debug: Sealing block@0: // L97 -debug: Terminated block@0: // L97 -debug: Sealing block@0: // L106 -debug: Terminated block@0: // L106 +debug: Sealing block@None: // after_for_L85 +debug: Terminated block@5: // after_for_L85 +debug: Sealing block@0: // L111 +debug: Terminated block@0: // L111 +debug: Sealing block@0: // L120 +debug: Terminated block@0: // L120 +debug: Sealing block@0: // L61 +debug: Terminated block@0: // L61 debug: Sealing block@0: // L5 debug: Terminated block@0: // L5 debug: Sealing block@0: // L8 @@ -683,8 +685,8 @@ debug: Created Phi assignment: let tup.1#2: uint64 = undefined while trying to r debug: Added tup.1#0 to Phi node: let tup.1#2: uint64 = φ(tup.1#0 <- block@3) in block@3: // if_body_L22 debug: Added tup.1#1 to Phi node: let tup.1#2: uint64 = φ(tup.1#0 <- block@3, tup.1#1 <- block@4) in block@4: // else_body_L22 debug: Terminated block@5: // after_if_else_L22 -debug: Sealing block@0: // L56 -debug: Terminated block@0: // L56 +debug: Sealing block@0: // L57 +debug: Terminated block@0: // L57 debug: Output IR to tuple_support/out/TupleComparisons.ssa.ir info: Optimizing test_cases.tuple_support.tuple_comparisons.TupleComparisons at level 1 debug: Begin optimization pass 1/100 @@ -1141,18 +1143,18 @@ debug: Optimizer: Remove Unused Variables debug: Optimizer: Inner Txn Field Replacer debug: Optimizer: Simplify Control Ops debug: inlining the default target of a switch/goto nth -debug: simplified terminator of block@5: // for_footer_L79 from goto_nth [block@2, block@3][tuple_index%0#1] else goto block@6 to goto_nth [block@2, block@3][tuple_index%0#1] else return total#4 +debug: simplified terminator of block@5: // for_footer_L93 from goto_nth [block@2, block@3][tuple_index%0#1] else goto block@6 to goto_nth [block@2, block@3][tuple_index%0#1] else return total#4 debug: Optimizer: Remove Linear Jump -debug: Replaced predecessor block@1: // for_header_0_L79 with block@0: // L76 in block@4: // for_body_L79 -debug: Merged linear block@1: // for_header_0_L79 into block@0: // L76 -debug: Replaced predecessor block@5: // for_footer_L79 with block@4: // for_body_L79 in block@2: // for_header_1_L79 -debug: Replaced predecessor block@5: // for_footer_L79 with block@4: // for_body_L79 in block@3: // for_header_2_L79 -debug: Merged linear block@5: // for_footer_L79 into block@4: // for_body_L79 +debug: Replaced predecessor block@1: // for_header_0_L93 with block@0: // L90 in block@4: // for_body_L93 +debug: Merged linear block@1: // for_header_0_L93 into block@0: // L90 +debug: Replaced predecessor block@5: // for_footer_L93 with block@4: // for_body_L93 in block@2: // for_header_1_L93 +debug: Replaced predecessor block@5: // for_footer_L93 with block@4: // for_body_L93 in block@3: // for_header_2_L93 +debug: Merged linear block@5: // for_footer_L93 into block@4: // for_body_L93 debug: Optimizer: Remove Empty Blocks -debug: Not removing empty block block@2: // for_header_1_L79 because it's used by phi nodes -debug: Not removing empty block block@3: // for_header_2_L79 because it's used by phi nodes +debug: Not removing empty block block@2: // for_header_1_L93 because it's used by phi nodes +debug: Not removing empty block block@3: // for_header_2_L93 because it's used by phi nodes debug: Optimizer: Remove Unreachable Blocks -debug: Removing unreachable blocks: block@6: // after_for_L79 +debug: Removing unreachable blocks: block@6: // after_for_L93 debug: Optimizer: Repeated Expression Elimination debug: Optimizing subroutine test_cases.tuple_support.tuple_support.bytes_combine debug: Splitting parallel copies prior to optimization @@ -1221,10 +1223,10 @@ debug: Optimizer: Remove Unused Variables debug: Optimizer: Inner Txn Field Replacer debug: Optimizer: Simplify Control Ops debug: Optimizer: Remove Linear Jump -debug: Replaced predecessor block@3: // for_footer_L71 with block@2: // for_body_L71 in block@4: // for_increment_L71 -debug: Merged linear block@3: // for_footer_L71 into block@2: // for_body_L71 -debug: Replaced predecessor block@4: // for_increment_L71 with block@2: // for_body_L71 in block@1: // for_header_L71 -debug: Merged linear block@4: // for_increment_L71 into block@2: // for_body_L71 +debug: Replaced predecessor block@3: // for_footer_L85 with block@2: // for_body_L85 in block@4: // for_increment_L85 +debug: Merged linear block@3: // for_footer_L85 into block@2: // for_body_L85 +debug: Replaced predecessor block@4: // for_increment_L85 with block@2: // for_body_L85 in block@1: // for_header_L85 +debug: Merged linear block@4: // for_increment_L85 into block@2: // for_body_L85 debug: Optimizer: Remove Empty Blocks debug: Optimizer: Remove Unreachable Blocks debug: Optimizer: Repeated Expression Elimination @@ -1263,6 +1265,30 @@ debug: Optimizer: Remove Linear Jump debug: Optimizer: Remove Empty Blocks debug: Optimizer: Remove Unreachable Blocks debug: Optimizer: Repeated Expression Elimination +debug: Optimizing subroutine test_cases.tuple_support.tuple_support.bin_ops +debug: Splitting parallel copies prior to optimization +debug: Optimizer: Constant Replacer +debug: Optimizer: Copy Propagation +debug: Optimizer: Intrinsic Simplifier +debug: Simplified (== 1u 1u) to 1u +debug: Simplified (== 1u 1u) to 1u +debug: Simplified (== 1u 1u) to 1u +debug: Simplified (== 1u 1u) to 1u +debug: Simplified (== 0x32 0x32) to 1u +debug: Simplified (== 3u 3u) to 1u +debug: Optimizer: Remove Unused Variables +debug: Removing unused variable a.0#0 +debug: Removing unused variable a.1#0 +debug: Removing unused variable a.2#0 +debug: Removing unused variable b.0#0 +debug: Removing unused variable b.1#0 +debug: Removing unused variable b.2#0 +debug: Optimizer: Inner Txn Field Replacer +debug: Optimizer: Simplify Control Ops +debug: Optimizer: Remove Linear Jump +debug: Optimizer: Remove Empty Blocks +debug: Optimizer: Remove Unreachable Blocks +debug: Optimizer: Repeated Expression Elimination debug: Optimizing subroutine test_cases.tuple_support.tuple_support.TupleSupport.__init__ debug: Splitting parallel copies prior to optimization debug: Optimizer: Constant Replacer @@ -1330,8 +1356,8 @@ debug: Optimizer: Inner Txn Field Replacer debug: Optimizer: Simplify Control Ops debug: Optimizer: Remove Linear Jump debug: Optimizer: Remove Empty Blocks -debug: Not removing empty block block@2: // for_header_1_L79 because it's used by phi nodes -debug: Not removing empty block block@3: // for_header_2_L79 because it's used by phi nodes +debug: Not removing empty block block@2: // for_header_1_L93 because it's used by phi nodes +debug: Not removing empty block block@3: // for_header_2_L93 because it's used by phi nodes debug: Optimizer: Remove Unreachable Blocks debug: Optimizer: Repeated Expression Elimination debug: Optimizing subroutine test_cases.tuple_support.tuple_support.bytes_combine @@ -1390,6 +1416,23 @@ debug: Optimizer: Remove Linear Jump debug: Optimizer: Remove Empty Blocks debug: Optimizer: Remove Unreachable Blocks debug: Optimizer: Repeated Expression Elimination +debug: Optimizing subroutine test_cases.tuple_support.tuple_support.bin_ops +debug: Optimizer: Constant Replacer +debug: Optimizer: Copy Propagation +debug: Optimizer: Intrinsic Simplifier +debug: Optimizer: Remove Unused Variables +debug: Removing unused variable tmp%0#0 +debug: Removing unused variable tmp%1#0 +debug: Removing unused variable tmp%2#0 +debug: Removing unused variable tmp%3#0 +debug: Removing unused variable tmp%4#0 +debug: Removing unused variable tmp%5#0 +debug: Optimizer: Inner Txn Field Replacer +debug: Optimizer: Simplify Control Ops +debug: Optimizer: Remove Linear Jump +debug: Optimizer: Remove Empty Blocks +debug: Optimizer: Remove Unreachable Blocks +debug: Optimizer: Repeated Expression Elimination debug: Optimizing subroutine test_cases.tuple_support.tuple_support.TupleSupport.__init__ debug: Optimizer: Constant Replacer debug: Optimizer: Copy Propagation @@ -1443,8 +1486,8 @@ debug: Optimizer: Inner Txn Field Replacer debug: Optimizer: Simplify Control Ops debug: Optimizer: Remove Linear Jump debug: Optimizer: Remove Empty Blocks -debug: Not removing empty block block@2: // for_header_1_L79 because it's used by phi nodes -debug: Not removing empty block block@3: // for_header_2_L79 because it's used by phi nodes +debug: Not removing empty block block@2: // for_header_1_L93 because it's used by phi nodes +debug: Not removing empty block block@3: // for_header_2_L93 because it's used by phi nodes debug: Optimizer: Remove Unreachable Blocks debug: Optimizer: Repeated Expression Elimination debug: Optimizing subroutine test_cases.tuple_support.tuple_support.bytes_combine @@ -1502,6 +1545,17 @@ debug: Optimizer: Remove Linear Jump debug: Optimizer: Remove Empty Blocks debug: Optimizer: Remove Unreachable Blocks debug: Optimizer: Repeated Expression Elimination +debug: Optimizing subroutine test_cases.tuple_support.tuple_support.bin_ops +debug: Optimizer: Constant Replacer +debug: Optimizer: Copy Propagation +debug: Optimizer: Intrinsic Simplifier +debug: Optimizer: Remove Unused Variables +debug: Optimizer: Inner Txn Field Replacer +debug: Optimizer: Simplify Control Ops +debug: Optimizer: Remove Linear Jump +debug: Optimizer: Remove Empty Blocks +debug: Optimizer: Remove Unreachable Blocks +debug: Optimizer: Repeated Expression Elimination debug: Optimizing subroutine test_cases.tuple_support.tuple_support.TupleSupport.__init__ debug: Optimizer: Constant Replacer debug: Optimizer: Copy Propagation @@ -1552,8 +1606,8 @@ debug: Optimizer: Inner Txn Field Replacer debug: Optimizer: Simplify Control Ops debug: Optimizer: Remove Linear Jump debug: Optimizer: Remove Empty Blocks -debug: Not removing empty block block@2: // for_header_1_L79 because it's used by phi nodes -debug: Not removing empty block block@3: // for_header_2_L79 because it's used by phi nodes +debug: Not removing empty block block@2: // for_header_1_L93 because it's used by phi nodes +debug: Not removing empty block block@3: // for_header_2_L93 because it's used by phi nodes debug: Optimizer: Remove Unreachable Blocks debug: Optimizer: Repeated Expression Elimination debug: Optimizing subroutine test_cases.tuple_support.tuple_support.bytes_combine @@ -1611,6 +1665,17 @@ debug: Optimizer: Remove Linear Jump debug: Optimizer: Remove Empty Blocks debug: Optimizer: Remove Unreachable Blocks debug: Optimizer: Repeated Expression Elimination +debug: Optimizing subroutine test_cases.tuple_support.tuple_support.bin_ops +debug: Optimizer: Constant Replacer +debug: Optimizer: Copy Propagation +debug: Optimizer: Intrinsic Simplifier +debug: Optimizer: Remove Unused Variables +debug: Optimizer: Inner Txn Field Replacer +debug: Optimizer: Simplify Control Ops +debug: Optimizer: Remove Linear Jump +debug: Optimizer: Remove Empty Blocks +debug: Optimizer: Remove Unreachable Blocks +debug: Optimizer: Repeated Expression Elimination debug: Optimizing subroutine test_cases.tuple_support.tuple_support.TupleSupport.__init__ debug: Optimizer: Constant Replacer debug: Optimizer: Copy Propagation @@ -1657,8 +1722,8 @@ debug: Optimizer: Inner Txn Field Replacer debug: Optimizer: Simplify Control Ops debug: Optimizer: Remove Linear Jump debug: Optimizer: Remove Empty Blocks -debug: Not removing empty block block@2: // for_header_1_L79 because it's used by phi nodes -debug: Not removing empty block block@3: // for_header_2_L79 because it's used by phi nodes +debug: Not removing empty block block@2: // for_header_1_L93 because it's used by phi nodes +debug: Not removing empty block block@3: // for_header_2_L93 because it's used by phi nodes debug: Optimizer: Remove Unreachable Blocks debug: Optimizer: Repeated Expression Elimination debug: Optimizing subroutine test_cases.tuple_support.tuple_support.bytes_combine @@ -1716,6 +1781,17 @@ debug: Optimizer: Remove Linear Jump debug: Optimizer: Remove Empty Blocks debug: Optimizer: Remove Unreachable Blocks debug: Optimizer: Repeated Expression Elimination +debug: Optimizing subroutine test_cases.tuple_support.tuple_support.bin_ops +debug: Optimizer: Constant Replacer +debug: Optimizer: Copy Propagation +debug: Optimizer: Intrinsic Simplifier +debug: Optimizer: Remove Unused Variables +debug: Optimizer: Inner Txn Field Replacer +debug: Optimizer: Simplify Control Ops +debug: Optimizer: Remove Linear Jump +debug: Optimizer: Remove Empty Blocks +debug: Optimizer: Remove Unreachable Blocks +debug: Optimizer: Repeated Expression Elimination debug: Optimizing subroutine test_cases.tuple_support.tuple_support.TupleSupport.__init__ debug: Optimizer: Constant Replacer debug: Optimizer: Copy Propagation @@ -1746,6 +1822,7 @@ debug: Removing Phis from test_cases.tuple_support.tuple_support.addw2 debug: Removing Phis from test_cases.tuple_support.tuple_support.bytes_multiply debug: Removing Phis from test_cases.tuple_support.tuple_support.test_tuple_swap debug: Removing Phis from test_cases.tuple_support.tuple_support.slicing +debug: Removing Phis from test_cases.tuple_support.tuple_support.bin_ops debug: Removing Phis from test_cases.tuple_support.tuple_support.TupleSupport.__init__ debug: Removing Phis from test_cases.tuple_support.tuple_support.TupleSupport.clear_state_program debug: Coalescing local variables in test_cases.tuple_support.tuple_support.TupleSupport.approval_program using strategy RootOperandGrouping @@ -1769,6 +1846,8 @@ debug: Coalescing local variables in test_cases.tuple_support.tuple_support.test debug: Coalescing resulted in 0 replacement/s debug: Coalescing local variables in test_cases.tuple_support.tuple_support.slicing using strategy RootOperandGrouping debug: Coalescing resulted in 0 replacement/s +debug: Coalescing local variables in test_cases.tuple_support.tuple_support.bin_ops using strategy RootOperandGrouping +debug: Coalescing resulted in 0 replacement/s debug: Coalescing local variables in test_cases.tuple_support.tuple_support.TupleSupport.__init__ using strategy RootOperandGrouping debug: Coalescing resulted in 0 replacement/s debug: Coalescing local variables in test_cases.tuple_support.tuple_support.TupleSupport.clear_state_program using strategy RootOperandGrouping @@ -1840,6 +1919,7 @@ debug: * to_do result#0 debug: * to_do _i#0 debug: Sequentializing parallel copies in test_cases.tuple_support.tuple_support.test_tuple_swap debug: Sequentializing parallel copies in test_cases.tuple_support.tuple_support.slicing +debug: Sequentializing parallel copies in test_cases.tuple_support.tuple_support.bin_ops debug: Sequentializing parallel copies in test_cases.tuple_support.tuple_support.TupleSupport.__init__ debug: Sequentializing parallel copies in test_cases.tuple_support.tuple_support.TupleSupport.clear_state_program debug: Performing post-SSA optimizations diff --git a/test_cases/tuple_support/tuple_support.py b/test_cases/tuple_support/tuple_support.py index f1190423b9..bbf2d968cb 100644 --- a/test_cases/tuple_support/tuple_support.py +++ b/test_cases/tuple_support/tuple_support.py @@ -51,12 +51,26 @@ def approval_program(self) -> UInt64: UInt64(8), ) ) + bin_ops() return a + b def clear_state_program(self) -> UInt64: return UInt64(0) +@subroutine +def bin_ops() -> None: + a = (UInt64(1),) * 3 + assert a[0] == 1 + assert a[1] == 1 + assert a[2] == 1 + + b = (UInt64(1),) + (Bytes(b"2"), UInt64(3)) # noqa: RUF005 + assert b[0] == 1 + assert b[1] == b"2" + assert b[2] == 3 + + @subroutine def bytes_combine(arg: tuple[Bytes, Bytes]) -> Bytes: a, b = arg diff --git a/tests/test_execution.py b/tests/test_execution.py index 1b4498b34b..77278f5a43 100644 --- a/tests/test_execution.py +++ b/tests/test_execution.py @@ -1399,20 +1399,6 @@ def okay(self) -> None: harness.deploy_from_closure(test) -def test_empty_box_key(harness: _TestHarness) -> None: - def test() -> None: - from algopy import Box, arc4 - - class MyContract(arc4.ARC4Contract): - def __init__(self) -> None: - # TODO: this should error, migrate to box.test once it does - self.my_box = Box(bool, key="") - # length op fails because the key is empty - assert not self.my_box.length - - harness.deploy_from_closure(test) - - @pytest.mark.slow() def test_brute_force_rotation_search(harness: _TestHarness) -> None: harness.deploy(TEST_CASES_DIR / "stress_tests" / "brute_force_rotation_search.py") diff --git a/tests/test_expected_output/arc4.test b/tests/test_expected_output/arc4.test index 9dac3ac8b1..86a93db770 100644 --- a/tests/test_expected_output/arc4.test +++ b/tests/test_expected_output/arc4.test @@ -89,6 +89,10 @@ def invalid_signature5() -> None: def invalid_signature6() -> None: arc4.emit("Event(string,uint8)(string,uint64)", arc4.String("a"), arc4.UInt8(1)) ## E: event signatures cannot include return types +@subroutine +def dont_copy_array() -> None: + a = arc4.DynamicBytes() + arc4.emit("Event(byte[])", a) # this should not need a .copy() ## case: test_bad_uint_sizes @@ -171,6 +175,8 @@ class Arc4CopyContract(arc4.ARC4Contract): copy1 = local_array ## E: mutable reference to ARC4-encoded value must be copied using .copy() when being assigned to another variable assert (copy2 := local_array).length, "this isn't ok" ## E: mutable reference to ARC4-encoded value must be copied using .copy() when being assigned to another variable valid_tuple = (local_array.copy(),) + + valid_tuple_copy: tuple[arc4.DynamicArray[arc4.UInt64]] = tuple(valid_tuple) # type: ignore[assignment] ## E: mutable reference to ARC4-encoded value must be copied using .copy() when being passed to a tuple expression copy3 = valid_tuple[0] ## E: mutable reference to ARC4-encoded value must be copied using .copy() when being assigned to another variable copy4 = self.global_a ## E: mutable reference to ARC4-encoded value must be copied using .copy() when being assigned to another variable copy5 = self.global_b.value ## E: mutable reference to ARC4-encoded value must be copied using .copy() when being assigned to another variable diff --git a/tests/test_expected_output/box.test b/tests/test_expected_output/box.test index 79bdb7d550..e46278ab3a 100644 --- a/tests/test_expected_output/box.test +++ b/tests/test_expected_output/box.test @@ -171,3 +171,11 @@ class BoxMapContract(ARC4Contract): @arc4.abimethod() def maybe(self) -> None: bad = self.ok.maybe(bad=UInt64(2)) # type: ignore[call-arg] ## E: invalid/unexpected args + +## case: test_empty_key +from algopy import * + +class MyContract(arc4.ARC4Contract): + def __init__(self) -> None: + self.my_box = Box(bool, key="") + assert not self.my_box.length, "length op fails because the key is empty" ## E: AVM does not support empty box keys diff --git a/tests/test_expected_output/expected_errors.test b/tests/test_expected_output/expected_errors.test index 5ce310cc82..fe1968c9cf 100644 --- a/tests/test_expected_output/expected_errors.test +++ b/tests/test_expected_output/expected_errors.test @@ -320,3 +320,10 @@ class Con(Contract): def clear_state_program(self) -> bool: assert self.x ## W: expression is always False return True + +## case: tuple_types +from algopy import * + +@subroutine +def test_tuple_type() -> None: + tuple[UInt64, Bytes]((UInt64(), Bytes())) # ## E: variadic tuples are not supported