From fe7a0ead47a44ea4c77538ccc45d3823eb6d41de Mon Sep 17 00:00:00 2001 From: Daniel McGregor Date: Fri, 8 Nov 2024 16:01:43 +0800 Subject: [PATCH] feat: add `.copy()` to arc4.Tuple --- examples/sizes.txt | 4 +- src/puyapy/awst_build/eb/arc4/tuple.py | 4 +- stubs/algopy-stubs/arc4.pyi | 3 + .../out/Arc4TuplesTypeContract.approval.mir | 52 +- .../out/Arc4TuplesTypeContract.approval.teal | 48 +- .../out/Arc4TuplesTypeContract.clear.mir | 2 +- .../out/Arc4TuplesTypeContract.clear.teal | 2 +- .../Arc4TuplesTypeContract.destructured.ir | 16 +- .../out/Arc4TuplesTypeContract.ssa.ir | 68 ++- .../Arc4TuplesTypeContract.ssa.opt_pass_1.ir | 46 +- .../Arc4TuplesTypeContract.ssa.opt_pass_10.ir | 26 +- .../Arc4TuplesTypeContract.ssa.opt_pass_11.ir | 25 +- .../Arc4TuplesTypeContract.ssa.opt_pass_12.ir | 24 +- .../Arc4TuplesTypeContract.ssa.opt_pass_13.ir | 22 +- .../Arc4TuplesTypeContract.ssa.opt_pass_14.ir | 20 +- .../Arc4TuplesTypeContract.ssa.opt_pass_15.ir | 16 +- .../Arc4TuplesTypeContract.ssa.opt_pass_16.ir | 16 +- .../Arc4TuplesTypeContract.ssa.opt_pass_17.ir | 16 +- .../Arc4TuplesTypeContract.ssa.opt_pass_18.ir | 16 +- .../Arc4TuplesTypeContract.ssa.opt_pass_19.ir | 16 +- .../Arc4TuplesTypeContract.ssa.opt_pass_2.ir | 39 +- .../Arc4TuplesTypeContract.ssa.opt_pass_20.ir | 16 +- .../Arc4TuplesTypeContract.ssa.opt_pass_21.ir | 16 +- .../Arc4TuplesTypeContract.ssa.opt_pass_22.ir | 16 +- .../Arc4TuplesTypeContract.ssa.opt_pass_23.ir | 16 +- .../Arc4TuplesTypeContract.ssa.opt_pass_24.ir | 16 +- .../Arc4TuplesTypeContract.ssa.opt_pass_25.ir | 16 +- .../Arc4TuplesTypeContract.ssa.opt_pass_3.ir | 36 +- .../Arc4TuplesTypeContract.ssa.opt_pass_4.ir | 35 +- .../Arc4TuplesTypeContract.ssa.opt_pass_5.ir | 33 +- .../Arc4TuplesTypeContract.ssa.opt_pass_6.ir | 31 +- .../Arc4TuplesTypeContract.ssa.opt_pass_7.ir | 30 +- .../Arc4TuplesTypeContract.ssa.opt_pass_8.ir | 29 +- .../Arc4TuplesTypeContract.ssa.opt_pass_9.ir | 27 +- test_cases/arc4_types/out/module.awst | 11 + test_cases/arc4_types/out/tuples.O0.log | 296 +++++++---- test_cases/arc4_types/out/tuples.O1.log | 131 ++--- test_cases/arc4_types/out/tuples.O2.log | 131 ++--- .../Arc4TuplesTypeContract.approval.teal | 23 + .../Arc4TuplesTypeContract.destructured.ir | 16 +- .../Arc4TuplesTypeContract.approval.teal | 157 +++++- .../Arc4TuplesTypeContract.clear.teal | 2 +- .../Arc4TuplesTypeContract.destructured.ir | 63 ++- test_cases/arc4_types/puya.log | 470 +++++++++++++++++- test_cases/arc4_types/tuples.py | 16 +- 45 files changed, 1821 insertions(+), 293 deletions(-) diff --git a/examples/sizes.txt b/examples/sizes.txt index 84e945e831..a0ceeac4a6 100644 --- a/examples/sizes.txt +++ b/examples/sizes.txt @@ -19,7 +19,7 @@ arc4_types/Arc4StringTypes 455 35 - | 245 13 - arc4_types/Arc4StructsFromAnotherModule 67 12 - | 49 6 - arc4_types/Arc4StructsType 389 239 - | 259 121 - - arc4_types/Arc4TuplesType 795 136 - | 537 58 - + arc4_types/Arc4TuplesType 954 173 - | 657 77 - arc4_types/MutableParams2 334 202 - | 193 97 - arc_28/EventEmitter 186 133 - | 100 64 - asset/Reference 268 261 - | 144 141 - @@ -133,4 +133,4 @@ unssa/UnSSA 432 368 - | 241 204 - voting/VotingRoundApp 1590 1483 - | 733 649 - with_reentrancy/WithReentrancy 255 242 - | 132 122 - - Total 70460 54247 54188 | 33630 22152 22108 \ No newline at end of file + Total 70619 54284 54225 | 33750 22171 22127 \ No newline at end of file diff --git a/src/puyapy/awst_build/eb/arc4/tuple.py b/src/puyapy/awst_build/eb/arc4/tuple.py index 281c3147ac..f3d44cedfa 100644 --- a/src/puyapy/awst_build/eb/arc4/tuple.py +++ b/src/puyapy/awst_build/eb/arc4/tuple.py @@ -12,7 +12,7 @@ from puyapy.awst_build.eb._base import GenericTypeBuilder from puyapy.awst_build.eb._bytes_backed import BytesBackedInstanceExpressionBuilder from puyapy.awst_build.eb._utils import compare_bytes, constant_bool_and_error, dummy_value -from puyapy.awst_build.eb.arc4._base import ARC4TypeBuilder +from puyapy.awst_build.eb.arc4._base import ARC4TypeBuilder, CopyBuilder from puyapy.awst_build.eb.factories import builder_for_instance from puyapy.awst_build.eb.interface import ( BuilderComparisonOp, @@ -118,6 +118,8 @@ def member_access(self, name: str, location: SourceLocation) -> NodeBuilder: source_location=location, ) return TupleExpressionBuilder(result_expr, native_pytype) + case "copy": + return CopyBuilder(self.resolve(), location, self.pytype) case _: return super().member_access(name, location) diff --git a/stubs/algopy-stubs/arc4.pyi b/stubs/algopy-stubs/arc4.pyi index 14d8371fd7..c2094a40d7 100644 --- a/stubs/algopy-stubs/arc4.pyi +++ b/stubs/algopy-stubs/arc4.pyi @@ -469,6 +469,9 @@ class Tuple(_ABIEncoded, tuple[typing.Unpack[_TTuple]]): """Convert to a native Python tuple - note that the elements of the tuple should be considered to be copies of the original elements""" + def copy(self) -> typing.Self: + """Create a copy of this tuple""" + @typing.dataclass_transform( eq_default=False, order_default=False, kw_only_default=False, field_specifiers=() ) diff --git a/test_cases/arc4_types/out/Arc4TuplesTypeContract.approval.mir b/test_cases/arc4_types/out/Arc4TuplesTypeContract.approval.mir index 71408043bd..df69ddddce 100644 --- a/test_cases/arc4_types/out/Arc4TuplesTypeContract.approval.mir +++ b/test_cases/arc4_types/out/Arc4TuplesTypeContract.approval.mir @@ -20,6 +20,9 @@ main_block@0: == tmp%20#0 assert // arc4_types/tuples.py:49 + // self.test_copy() + callsub test_copy + // arc4_types/tuples.py:51 // return True int 1 1 return @@ -27,13 +30,13 @@ main_block@0: // test_cases.arc4_types.tuples.Arc4TuplesTypeContract.test_stuff(test_tuple: bytes) -> uint64, bytes: test_stuff: (𝕡) test_tuple#0 | - // arc4_types/tuples.py:54-55 + // arc4_types/tuples.py:56-57 // @subroutine // def test_stuff(self, test_tuple: TestTuple) -> tuple[UInt64, String]: proto 1 2 (𝕡) test_tuple#0 | test_stuff_block@0: (𝕡) test_tuple#0 | - // arc4_types/tuples.py:56 + // arc4_types/tuples.py:58 // a, b, c, d, e = test_tuple.native p-load test_tuple#0 (𝕡) test_tuple#0 | test_tuple#0 (copy) extract 0 1 // on error: Index access is out of bounds (𝕡) test_tuple#0 | a#0 @@ -57,7 +60,7 @@ test_stuff_block@0: substring3 (𝕡) test_tuple#0 | a#0,b#0,c#0,d#0 p-load test_tuple#0 (𝕡) test_tuple#0 | a#0,b#0,c#0,d#0,test_tuple#0 (copy) extract 6 1 // on error: Index access is out of bounds (𝕡) test_tuple#0 | a#0,b#0,c#0,d#0,e#0 - // arc4_types/tuples.py:62 + // arc4_types/tuples.py:64 // total = a.native + b.native + e.native l-load a#0 4 (𝕡) test_tuple#0 | b#0,c#0,d#0,e#0,a#0 btoi (𝕡) test_tuple#0 | b#0,c#0,d#0,e#0,tmp%4#0 @@ -71,7 +74,7 @@ test_stuff_block@0: l-load tmp%6#0 1 (𝕡) test_tuple#0 | c#0,d#0,tmp%7#0,tmp%6#0 l-load tmp%7#0 1 (𝕡) test_tuple#0 | c#0,d#0,tmp%6#0,tmp%7#0 + (𝕡) test_tuple#0 | c#0,d#0,total#0 - // arc4_types/tuples.py:63 + // arc4_types/tuples.py:65 // text = c.native + " " + d.native l-load c#0 2 (𝕡) test_tuple#0 | d#0,total#0,c#0 extract 2 0 (𝕡) test_tuple#0 | d#0,total#0,tmp%8#0 @@ -82,7 +85,7 @@ test_stuff_block@0: l-load tmp%9#0 1 (𝕡) test_tuple#0 | total#0,tmp%10#0,tmp%9#0 l-load tmp%10#0 1 (𝕡) test_tuple#0 | total#0,tmp%9#0,tmp%10#0 concat (𝕡) test_tuple#0 | total#0,text#0 - // arc4_types/tuples.py:65 + // arc4_types/tuples.py:67 // return total, String(text) l-load-copy text#0 0 (𝕡) test_tuple#0 | total#0,text#0,text#0 (copy) len (𝕡) test_tuple#0 | total#0,text#0,length%0#0 @@ -95,3 +98,42 @@ test_stuff_block@0: retsub total#0,encoded_value%0#0 +// test_cases.arc4_types.tuples.Arc4TuplesTypeContract.test_copy() -> void: +test_copy: + // arc4_types/tuples.py:69-70 + // @subroutine + // def test_copy(self) -> None: + proto 0 0 + +test_copy_block@0: + // arc4_types/tuples.py:74 + // assert tup[1] == DynamicBytes(0) + byte 0x000100 0x000100 + // arc4_types/tuples.py:77 + // tup[1][0] = Byte(1) + byte 0x01 0x000100,0x01 + replace2 2 updated_target%0#0 + byte 0x000003 updated_target%0#0,0x000003 + l-load updated_target%0#0 1 0x000003,updated_target%0#0 + concat tup#2 + // arc4_types/tuples.py:79 + // assert tup[1] != tup2[1] + l-load-copy tup#2 0 tup#2,tup#2 (copy) + int 1 tup#2,tup#2 (copy),1 + extract_uint16 tup#2,item_start_offset%3#0 + l-load-copy tup#2 1 tup#2,item_start_offset%3#0,tup#2 (copy) + len tup#2,item_start_offset%3#0,item_end_offset%3#0 + l-load tup#2 2 item_start_offset%3#0,item_end_offset%3#0,tup#2 + l-load item_start_offset%3#0 2 item_end_offset%3#0,tup#2,item_start_offset%3#0 + l-load item_end_offset%3#0 2 tup#2,item_start_offset%3#0,item_end_offset%3#0 + substring3 tmp%4#0 + // arc4_types/tuples.py:74 + // assert tup[1] == DynamicBytes(0) + byte 0x000100 tmp%4#0,0x000100 + // arc4_types/tuples.py:79 + // assert tup[1] != tup2[1] + != tmp%6#0 + assert + retsub + + diff --git a/test_cases/arc4_types/out/Arc4TuplesTypeContract.approval.teal b/test_cases/arc4_types/out/Arc4TuplesTypeContract.approval.teal index b31753235b..aca39c9d38 100644 --- a/test_cases/arc4_types/out/Arc4TuplesTypeContract.approval.teal +++ b/test_cases/arc4_types/out/Arc4TuplesTypeContract.approval.teal @@ -1,6 +1,7 @@ #pragma version 10 test_cases.arc4_types.tuples.Arc4TuplesTypeContract.approval_program: + bytecblock 0x000100 // arc4_types/tuples.py:15 // my_tuple = Tuple((UInt8(1), UInt8(2), String("hello"), String("world"), UInt8(255))) pushbytes 0x01020007000eff000568656c6c6f0005776f726c64 @@ -19,6 +20,9 @@ test_cases.arc4_types.tuples.Arc4TuplesTypeContract.approval_program: == assert // arc4_types/tuples.py:49 + // self.test_copy() + callsub test_copy + // arc4_types/tuples.py:51 // return True pushint 1 // 1 return @@ -26,11 +30,11 @@ test_cases.arc4_types.tuples.Arc4TuplesTypeContract.approval_program: // test_cases.arc4_types.tuples.Arc4TuplesTypeContract.test_stuff(test_tuple: bytes) -> uint64, bytes: test_stuff: - // arc4_types/tuples.py:54-55 + // arc4_types/tuples.py:56-57 // @subroutine // def test_stuff(self, test_tuple: TestTuple) -> tuple[UInt64, String]: proto 1 2 - // arc4_types/tuples.py:56 + // arc4_types/tuples.py:58 // a, b, c, d, e = test_tuple.native frame_dig -1 extract 0 1 // on error: Index access is out of bounds @@ -54,7 +58,7 @@ test_stuff: substring3 frame_dig -1 extract 6 1 // on error: Index access is out of bounds - // arc4_types/tuples.py:62 + // arc4_types/tuples.py:64 // total = a.native + b.native + e.native uncover 4 btoi @@ -64,7 +68,7 @@ test_stuff: swap btoi + - // arc4_types/tuples.py:63 + // arc4_types/tuples.py:65 // text = c.native + " " + d.native uncover 2 extract 2 0 @@ -73,7 +77,7 @@ test_stuff: uncover 2 extract 2 0 concat - // arc4_types/tuples.py:65 + // arc4_types/tuples.py:67 // return total, String(text) dup len @@ -82,3 +86,37 @@ test_stuff: swap concat retsub + + +// test_cases.arc4_types.tuples.Arc4TuplesTypeContract.test_copy() -> void: +test_copy: + // arc4_types/tuples.py:69-70 + // @subroutine + // def test_copy(self) -> None: + proto 0 0 + // arc4_types/tuples.py:74 + // assert tup[1] == DynamicBytes(0) + bytec_0 // 0x000100 + // arc4_types/tuples.py:77 + // tup[1][0] = Byte(1) + pushbytes 0x01 + replace2 2 + pushbytes 0x000003 + swap + concat + // arc4_types/tuples.py:79 + // assert tup[1] != tup2[1] + dup + pushint 1 // 1 + extract_uint16 + dig 1 + len + substring3 + // arc4_types/tuples.py:74 + // assert tup[1] == DynamicBytes(0) + bytec_0 // 0x000100 + // arc4_types/tuples.py:79 + // assert tup[1] != tup2[1] + != + assert + retsub diff --git a/test_cases/arc4_types/out/Arc4TuplesTypeContract.clear.mir b/test_cases/arc4_types/out/Arc4TuplesTypeContract.clear.mir index 62240133ba..71483a4563 100644 --- a/test_cases/arc4_types/out/Arc4TuplesTypeContract.clear.mir +++ b/test_cases/arc4_types/out/Arc4TuplesTypeContract.clear.mir @@ -1,7 +1,7 @@ // Op Stack (out) // test_cases.arc4_types.tuples.Arc4TuplesTypeContract.clear_state_program() -> uint64: main_block@0: - // arc4_types/tuples.py:52 + // arc4_types/tuples.py:54 // return True int 1 1 return diff --git a/test_cases/arc4_types/out/Arc4TuplesTypeContract.clear.teal b/test_cases/arc4_types/out/Arc4TuplesTypeContract.clear.teal index ea52beb6e0..1a5dffc0f4 100644 --- a/test_cases/arc4_types/out/Arc4TuplesTypeContract.clear.teal +++ b/test_cases/arc4_types/out/Arc4TuplesTypeContract.clear.teal @@ -1,7 +1,7 @@ #pragma version 10 test_cases.arc4_types.tuples.Arc4TuplesTypeContract.clear_state_program: - // arc4_types/tuples.py:52 + // arc4_types/tuples.py:54 // return True pushint 1 // 1 return diff --git a/test_cases/arc4_types/out/Arc4TuplesTypeContract.destructured.ir b/test_cases/arc4_types/out/Arc4TuplesTypeContract.destructured.ir index fef8f00d02..72898b4c87 100644 --- a/test_cases/arc4_types/out/Arc4TuplesTypeContract.destructured.ir +++ b/test_cases/arc4_types/out/Arc4TuplesTypeContract.destructured.ir @@ -8,10 +8,11 @@ contract test_cases.arc4_types.tuples.Arc4TuplesTypeContract: (assert tmp%19#0) let tmp%20#0: bool = (== total#0 258u) (assert tmp%20#0) + test_cases.arc4_types.tuples.Arc4TuplesTypeContract.test_copy() return 1u subroutine test_cases.arc4_types.tuples.Arc4TuplesTypeContract.test_stuff(test_tuple: bytes) -> : - block@0: // L54 + block@0: // L56 let a#0: bytes = ((extract 0 1) test_tuple#0) // on error: Index access is out of bounds let b#0: bytes = ((extract 1 1) test_tuple#0) // on error: Index access is out of bounds let item_start_offset%0#0: uint64 = (extract_uint16 test_tuple#0 2u) @@ -34,8 +35,19 @@ contract test_cases.arc4_types.tuples.Arc4TuplesTypeContract: let length_uint16%0#0: bytes = ((extract 6 2) as_bytes%0#0) let encoded_value%0#0: bytes = (concat length_uint16%0#0 text#0) return total#0 encoded_value%0#0 + + subroutine test_cases.arc4_types.tuples.Arc4TuplesTypeContract.test_copy() -> void: + block@0: // L69 + let updated_target%0#0: bytes = ((replace2 2) 0x000100 0x01) + let tup#2: bytes = (concat 0x000003 updated_target%0#0) + let item_start_offset%3#0: uint64 = (extract_uint16 tup#2 1u) + let item_end_offset%3#0: uint64 = (len tup#2) + let tmp%4#0: bytes = (substring3 tup#2 item_start_offset%3#0 item_end_offset%3#0) + let tmp%6#0: bool = (!= tmp%4#0 0x000100) + (assert tmp%6#0) + return program clear-state: subroutine test_cases.arc4_types.tuples.Arc4TuplesTypeContract.clear_state_program() -> bool: - block@0: // L51 + block@0: // L53 return 1u \ No newline at end of file diff --git a/test_cases/arc4_types/out/Arc4TuplesTypeContract.ssa.ir b/test_cases/arc4_types/out/Arc4TuplesTypeContract.ssa.ir index 37dd684653..591441b471 100644 --- a/test_cases/arc4_types/out/Arc4TuplesTypeContract.ssa.ir +++ b/test_cases/arc4_types/out/Arc4TuplesTypeContract.ssa.ir @@ -215,10 +215,11 @@ contract test_cases.arc4_types.tuples.Arc4TuplesTypeContract: (assert tmp%19#0) let tmp%20#0: bool = (== total#0 258u) (assert tmp%20#0) + test_cases.arc4_types.tuples.Arc4TuplesTypeContract.test_copy() return 1u subroutine test_cases.arc4_types.tuples.Arc4TuplesTypeContract.test_stuff(test_tuple: bytes) -> : - block@0: // L54 + block@0: // L56 let item0%0#0: bytes = (extract3 test_tuple#0 0u 1u) // on error: Index access is out of bounds let item1%0#0: bytes = (extract3 test_tuple#0 1u 1u) // on error: Index access is out of bounds let item_start_offset%0#0: uint64 = (extract_uint16 test_tuple#0 2u) @@ -260,8 +261,71 @@ contract test_cases.arc4_types.tuples.Arc4TuplesTypeContract: let length_uint16%0#0: bytes = ((extract 6 2) as_bytes%0#0) let encoded_value%0#0: bytes = (concat length_uint16%0#0 text#0) return total#0 encoded_value%0#0 + + subroutine test_cases.arc4_types.tuples.Arc4TuplesTypeContract.test_copy() -> void: + block@0: // L69 + let length%0#0: uint64 = (len 0x) + let as_bytes%0#0: bytes = (itob length%0#0) + let length_uint16%0#0: bytes = ((extract 6 2) as_bytes%0#0) + let encoded_value%0#0: bytes = (concat length_uint16%0#0 0x) + let current_tail_offset%0#0: uint64 = 3u + let encoded_tuple_buffer%0#0: bytes = 0x + let encoded_tuple_buffer%1#0: bytes = (concat encoded_tuple_buffer%0#0 0x00) + let as_bytes%1#0: bytes = (itob current_tail_offset%0#0) + let offset_as_uint16%0#0: bytes = ((extract 6 2) as_bytes%1#0) + let encoded_tuple_buffer%2#0: bytes = (concat encoded_tuple_buffer%1#0 offset_as_uint16%0#0) + let data_length%0#0: uint64 = (len encoded_value%0#0) + let current_tail_offset%1#0: uint64 = (+ current_tail_offset%0#0 data_length%0#0) + let encoded_tuple_buffer%3#0: bytes = (concat encoded_tuple_buffer%2#0 encoded_value%0#0) + let tup#0: bytes = encoded_tuple_buffer%3#0 + let item_start_offset%0#0: uint64 = (extract_uint16 tup#0 1u) + let item_end_offset%0#0: uint64 = (len tup#0) + let tmp%0#0: bytes = (substring3 tup#0 item_start_offset%0#0 item_end_offset%0#0) + let expr_value_trimmed%0#0: bytes = ((extract 2 0) tmp%0#0) + let data%0#0: bytes = (concat 0x 0x00) + let concatenated%0#0: bytes = (concat expr_value_trimmed%0#0 data%0#0) + let len_%0#0: uint64 = (len concatenated%0#0) + let as_bytes%2#0: bytes = (itob len_%0#0) + let len_16_bit%0#0: bytes = ((extract 6 2) as_bytes%2#0) + let concat_result%0#0: bytes = (concat len_16_bit%0#0 concatenated%0#0) + let assigned_value%0#0: bytes = concat_result%0#0 + let item_offset%0#0: uint64 = (extract_uint16 tup#0 1u) + let data_up_to_item%0#0: bytes = (extract3 tup#0 0u item_offset%0#0) + let updated_data%0#0: bytes = (concat data_up_to_item%0#0 assigned_value%0#0) + let tup#1: bytes = updated_data%0#0 + let item_start_offset%1#0: uint64 = (extract_uint16 tup#1 1u) + let item_end_offset%1#0: uint64 = (len tup#1) + let tmp%1#0: bytes = (substring3 tup#1 item_start_offset%1#0 item_end_offset%1#0) + let result%0#0: bytes = (concat 0x 0x00) + let array_data%0#0: bytes = (concat 0x0001 result%0#0) + let tmp%2#0: bool = (== tmp%1#0 array_data%0#0) + (assert tmp%2#0) + let copy%0#0: bytes = tup#1 + let tup2#0: bytes = copy%0#0 + let item_start_offset%2#0: uint64 = (extract_uint16 tup#1 1u) + let item_end_offset%2#0: uint64 = (len tup#1) + let tmp%3#0: bytes = (substring3 tup#1 item_start_offset%2#0 item_end_offset%2#0) + let assigned_value%1#0: bytes = 0x01 + let array_length%0#0: uint64 = (extract_uint16 tmp%3#0 0u) + let index_is_in_bounds%0#0: bool = (< 0u array_length%0#0) + (assert index_is_in_bounds%0#0) // Index access is out of bounds + let updated_target%0#0: bytes = (replace3 tmp%3#0 2u assigned_value%1#0) + let assigned_value%2#0: bytes = updated_target%0#0 + let item_offset%1#0: uint64 = (extract_uint16 tup#1 1u) + let data_up_to_item%1#0: bytes = (extract3 tup#1 0u item_offset%1#0) + let updated_data%1#0: bytes = (concat data_up_to_item%1#0 assigned_value%2#0) + let tup#2: bytes = updated_data%1#0 + let item_start_offset%3#0: uint64 = (extract_uint16 tup#2 1u) + let item_end_offset%3#0: uint64 = (len tup#2) + let tmp%4#0: bytes = (substring3 tup#2 item_start_offset%3#0 item_end_offset%3#0) + let item_start_offset%4#0: uint64 = (extract_uint16 tup2#0 1u) + let item_end_offset%4#0: uint64 = (len tup2#0) + let tmp%5#0: bytes = (substring3 tup2#0 item_start_offset%4#0 item_end_offset%4#0) + let tmp%6#0: bool = (!= tmp%4#0 tmp%5#0) + (assert tmp%6#0) + return program clear-state: subroutine test_cases.arc4_types.tuples.Arc4TuplesTypeContract.clear_state_program() -> bool: - block@0: // L51 + block@0: // L53 return 1u \ No newline at end of file diff --git a/test_cases/arc4_types/out/Arc4TuplesTypeContract.ssa.opt_pass_1.ir b/test_cases/arc4_types/out/Arc4TuplesTypeContract.ssa.opt_pass_1.ir index 794a1996de..ea8628de81 100644 --- a/test_cases/arc4_types/out/Arc4TuplesTypeContract.ssa.opt_pass_1.ir +++ b/test_cases/arc4_types/out/Arc4TuplesTypeContract.ssa.opt_pass_1.ir @@ -151,10 +151,11 @@ contract test_cases.arc4_types.tuples.Arc4TuplesTypeContract: (assert tmp%19#0) let tmp%20#0: bool = (== total#0 258u) (assert tmp%20#0) + test_cases.arc4_types.tuples.Arc4TuplesTypeContract.test_copy() return 1u subroutine test_cases.arc4_types.tuples.Arc4TuplesTypeContract.test_stuff(test_tuple: bytes) -> : - block@0: // L54 + block@0: // L56 let a#0: bytes = ((extract 0 1) test_tuple#0) // on error: Index access is out of bounds let b#0: bytes = ((extract 1 1) test_tuple#0) // on error: Index access is out of bounds let item_start_offset%0#0: uint64 = (extract_uint16 test_tuple#0 2u) @@ -183,8 +184,49 @@ contract test_cases.arc4_types.tuples.Arc4TuplesTypeContract: let length_uint16%0#0: bytes = ((extract 6 2) as_bytes%0#0) let encoded_value%0#0: bytes = (concat length_uint16%0#0 text#0) return total#0 encoded_value%0#0 + + subroutine test_cases.arc4_types.tuples.Arc4TuplesTypeContract.test_copy() -> void: + block@0: // L69 + let length%0#0: uint64 = 0u + let as_bytes%0#0: bytes = (itob length%0#0) + let length_uint16%0#0: bytes = ((extract 6 2) as_bytes%0#0) + let encoded_tuple_buffer%1#0: bytes = 0x00 + let offset_as_uint16%0#0: bytes = 0x0003 + let encoded_tuple_buffer%2#0: bytes = (concat encoded_tuple_buffer%1#0 offset_as_uint16%0#0) + let data_length%0#0: uint64 = (len length_uint16%0#0) + let tup#0: bytes = (concat encoded_tuple_buffer%2#0 length_uint16%0#0) + let item_start_offset%0#0: uint64 = (extract_uint16 tup#0 1u) + let item_end_offset%0#0: uint64 = (len tup#0) + let tmp%0#0: bytes = (substring3 tup#0 item_start_offset%0#0 item_end_offset%0#0) + let expr_value_trimmed%0#0: bytes = ((extract 2 0) tmp%0#0) + let data%0#0: bytes = 0x00 + let concatenated%0#0: bytes = (concat expr_value_trimmed%0#0 data%0#0) + let len_%0#0: uint64 = (len concatenated%0#0) + let as_bytes%2#0: bytes = (itob len_%0#0) + let len_16_bit%0#0: bytes = ((extract 6 2) as_bytes%2#0) + let concat_result%0#0: bytes = (concat len_16_bit%0#0 concatenated%0#0) + let data_up_to_item%0#0: bytes = (extract3 tup#0 0u item_start_offset%0#0) + let tup#1: bytes = (concat data_up_to_item%0#0 concat_result%0#0) + let item_start_offset%1#0: uint64 = (extract_uint16 tup#1 1u) + let item_end_offset%1#0: uint64 = (len tup#1) + let tmp%1#0: bytes = (substring3 tup#1 item_start_offset%1#0 item_end_offset%1#0) + let result%0#0: bytes = 0x00 + let array_data%0#0: bytes = (concat 0x0001 result%0#0) + let tmp%2#0: bool = (== tmp%1#0 array_data%0#0) + (assert tmp%2#0) + let array_length%0#0: uint64 = (extract_uint16 tmp%1#0 0u) + (assert array_length%0#0) // Index access is out of bounds + let updated_target%0#0: bytes = ((replace2 2) tmp%1#0 0x01) + let data_up_to_item%1#0: bytes = (extract3 tup#1 0u item_start_offset%1#0) + let tup#2: bytes = (concat data_up_to_item%1#0 updated_target%0#0) + let item_start_offset%3#0: uint64 = (extract_uint16 tup#2 1u) + let item_end_offset%3#0: uint64 = (len tup#2) + let tmp%4#0: bytes = (substring3 tup#2 item_start_offset%3#0 item_end_offset%3#0) + let tmp%6#0: bool = (!= tmp%4#0 tmp%1#0) + (assert tmp%6#0) + return program clear-state: subroutine test_cases.arc4_types.tuples.Arc4TuplesTypeContract.clear_state_program() -> bool: - block@0: // L51 + block@0: // L53 return 1u \ No newline at end of file diff --git a/test_cases/arc4_types/out/Arc4TuplesTypeContract.ssa.opt_pass_10.ir b/test_cases/arc4_types/out/Arc4TuplesTypeContract.ssa.opt_pass_10.ir index c4f6ea28ca..2ddb0b184c 100644 --- a/test_cases/arc4_types/out/Arc4TuplesTypeContract.ssa.opt_pass_10.ir +++ b/test_cases/arc4_types/out/Arc4TuplesTypeContract.ssa.opt_pass_10.ir @@ -104,10 +104,11 @@ contract test_cases.arc4_types.tuples.Arc4TuplesTypeContract: (assert tmp%19#0) let tmp%20#0: bool = (== total#0 258u) (assert tmp%20#0) + test_cases.arc4_types.tuples.Arc4TuplesTypeContract.test_copy() return 1u subroutine test_cases.arc4_types.tuples.Arc4TuplesTypeContract.test_stuff(test_tuple: bytes) -> : - block@0: // L54 + block@0: // L56 let a#0: bytes = ((extract 0 1) test_tuple#0) // on error: Index access is out of bounds let b#0: bytes = ((extract 1 1) test_tuple#0) // on error: Index access is out of bounds let item_start_offset%0#0: uint64 = (extract_uint16 test_tuple#0 2u) @@ -130,8 +131,29 @@ contract test_cases.arc4_types.tuples.Arc4TuplesTypeContract: let length_uint16%0#0: bytes = ((extract 6 2) as_bytes%0#0) let encoded_value%0#0: bytes = (concat length_uint16%0#0 text#0) return total#0 encoded_value%0#0 + + subroutine test_cases.arc4_types.tuples.Arc4TuplesTypeContract.test_copy() -> void: + block@0: // L69 + let concat_result%0#0: bytes = 0x000100 + let tup#1: bytes = (concat 0x000003 concat_result%0#0) + let item_start_offset%1#0: uint64 = (extract_uint16 tup#1 1u) + let item_end_offset%1#0: uint64 = (len tup#1) + let tmp%1#0: bytes = (substring3 tup#1 item_start_offset%1#0 item_end_offset%1#0) + let tmp%2#0: bool = (== tmp%1#0 0x000100) + (assert tmp%2#0) + let array_length%0#0: uint64 = (extract_uint16 tmp%1#0 0u) + (assert array_length%0#0) // Index access is out of bounds + let updated_target%0#0: bytes = ((replace2 2) tmp%1#0 0x01) + let data_up_to_item%1#0: bytes = (extract3 tup#1 0u item_start_offset%1#0) + let tup#2: bytes = (concat data_up_to_item%1#0 updated_target%0#0) + let item_start_offset%3#0: uint64 = (extract_uint16 tup#2 1u) + let item_end_offset%3#0: uint64 = (len tup#2) + let tmp%4#0: bytes = (substring3 tup#2 item_start_offset%3#0 item_end_offset%3#0) + let tmp%6#0: bool = (!= tmp%4#0 tmp%1#0) + (assert tmp%6#0) + return program clear-state: subroutine test_cases.arc4_types.tuples.Arc4TuplesTypeContract.clear_state_program() -> bool: - block@0: // L51 + block@0: // L53 return 1u \ No newline at end of file diff --git a/test_cases/arc4_types/out/Arc4TuplesTypeContract.ssa.opt_pass_11.ir b/test_cases/arc4_types/out/Arc4TuplesTypeContract.ssa.opt_pass_11.ir index f5a1adf39c..288f53ba2b 100644 --- a/test_cases/arc4_types/out/Arc4TuplesTypeContract.ssa.opt_pass_11.ir +++ b/test_cases/arc4_types/out/Arc4TuplesTypeContract.ssa.opt_pass_11.ir @@ -102,10 +102,11 @@ contract test_cases.arc4_types.tuples.Arc4TuplesTypeContract: (assert tmp%19#0) let tmp%20#0: bool = (== total#0 258u) (assert tmp%20#0) + test_cases.arc4_types.tuples.Arc4TuplesTypeContract.test_copy() return 1u subroutine test_cases.arc4_types.tuples.Arc4TuplesTypeContract.test_stuff(test_tuple: bytes) -> : - block@0: // L54 + block@0: // L56 let a#0: bytes = ((extract 0 1) test_tuple#0) // on error: Index access is out of bounds let b#0: bytes = ((extract 1 1) test_tuple#0) // on error: Index access is out of bounds let item_start_offset%0#0: uint64 = (extract_uint16 test_tuple#0 2u) @@ -128,8 +129,28 @@ contract test_cases.arc4_types.tuples.Arc4TuplesTypeContract: let length_uint16%0#0: bytes = ((extract 6 2) as_bytes%0#0) let encoded_value%0#0: bytes = (concat length_uint16%0#0 text#0) return total#0 encoded_value%0#0 + + subroutine test_cases.arc4_types.tuples.Arc4TuplesTypeContract.test_copy() -> void: + block@0: // L69 + let tup#1: bytes = 0x000003000100 + let item_start_offset%1#0: uint64 = (extract_uint16 tup#1 1u) + let item_end_offset%1#0: uint64 = (len tup#1) + let tmp%1#0: bytes = (substring3 tup#1 item_start_offset%1#0 item_end_offset%1#0) + let tmp%2#0: bool = (== tmp%1#0 0x000100) + (assert tmp%2#0) + let array_length%0#0: uint64 = (extract_uint16 tmp%1#0 0u) + (assert array_length%0#0) // Index access is out of bounds + let updated_target%0#0: bytes = ((replace2 2) tmp%1#0 0x01) + let data_up_to_item%1#0: bytes = (extract3 tup#1 0u item_start_offset%1#0) + let tup#2: bytes = (concat data_up_to_item%1#0 updated_target%0#0) + let item_start_offset%3#0: uint64 = (extract_uint16 tup#2 1u) + let item_end_offset%3#0: uint64 = (len tup#2) + let tmp%4#0: bytes = (substring3 tup#2 item_start_offset%3#0 item_end_offset%3#0) + let tmp%6#0: bool = (!= tmp%4#0 tmp%1#0) + (assert tmp%6#0) + return program clear-state: subroutine test_cases.arc4_types.tuples.Arc4TuplesTypeContract.clear_state_program() -> bool: - block@0: // L51 + block@0: // L53 return 1u \ No newline at end of file diff --git a/test_cases/arc4_types/out/Arc4TuplesTypeContract.ssa.opt_pass_12.ir b/test_cases/arc4_types/out/Arc4TuplesTypeContract.ssa.opt_pass_12.ir index 5c52008605..3e42ad3fb2 100644 --- a/test_cases/arc4_types/out/Arc4TuplesTypeContract.ssa.opt_pass_12.ir +++ b/test_cases/arc4_types/out/Arc4TuplesTypeContract.ssa.opt_pass_12.ir @@ -99,10 +99,11 @@ contract test_cases.arc4_types.tuples.Arc4TuplesTypeContract: (assert tmp%19#0) let tmp%20#0: bool = (== total#0 258u) (assert tmp%20#0) + test_cases.arc4_types.tuples.Arc4TuplesTypeContract.test_copy() return 1u subroutine test_cases.arc4_types.tuples.Arc4TuplesTypeContract.test_stuff(test_tuple: bytes) -> : - block@0: // L54 + block@0: // L56 let a#0: bytes = ((extract 0 1) test_tuple#0) // on error: Index access is out of bounds let b#0: bytes = ((extract 1 1) test_tuple#0) // on error: Index access is out of bounds let item_start_offset%0#0: uint64 = (extract_uint16 test_tuple#0 2u) @@ -125,8 +126,27 @@ contract test_cases.arc4_types.tuples.Arc4TuplesTypeContract: let length_uint16%0#0: bytes = ((extract 6 2) as_bytes%0#0) let encoded_value%0#0: bytes = (concat length_uint16%0#0 text#0) return total#0 encoded_value%0#0 + + subroutine test_cases.arc4_types.tuples.Arc4TuplesTypeContract.test_copy() -> void: + block@0: // L69 + let item_start_offset%1#0: uint64 = 3u + let item_end_offset%1#0: uint64 = 6u + let tmp%1#0: bytes = (substring3 0x000003000100 item_start_offset%1#0 item_end_offset%1#0) + let tmp%2#0: bool = (== tmp%1#0 0x000100) + (assert tmp%2#0) + let array_length%0#0: uint64 = (extract_uint16 tmp%1#0 0u) + (assert array_length%0#0) // Index access is out of bounds + let updated_target%0#0: bytes = ((replace2 2) tmp%1#0 0x01) + let data_up_to_item%1#0: bytes = (extract3 0x000003000100 0u item_start_offset%1#0) + let tup#2: bytes = (concat data_up_to_item%1#0 updated_target%0#0) + let item_start_offset%3#0: uint64 = (extract_uint16 tup#2 1u) + let item_end_offset%3#0: uint64 = (len tup#2) + let tmp%4#0: bytes = (substring3 tup#2 item_start_offset%3#0 item_end_offset%3#0) + let tmp%6#0: bool = (!= tmp%4#0 tmp%1#0) + (assert tmp%6#0) + return program clear-state: subroutine test_cases.arc4_types.tuples.Arc4TuplesTypeContract.clear_state_program() -> bool: - block@0: // L51 + block@0: // L53 return 1u \ No newline at end of file diff --git a/test_cases/arc4_types/out/Arc4TuplesTypeContract.ssa.opt_pass_13.ir b/test_cases/arc4_types/out/Arc4TuplesTypeContract.ssa.opt_pass_13.ir index 9ffd947476..3b69b2f8b4 100644 --- a/test_cases/arc4_types/out/Arc4TuplesTypeContract.ssa.opt_pass_13.ir +++ b/test_cases/arc4_types/out/Arc4TuplesTypeContract.ssa.opt_pass_13.ir @@ -86,10 +86,11 @@ contract test_cases.arc4_types.tuples.Arc4TuplesTypeContract: (assert tmp%19#0) let tmp%20#0: bool = (== total#0 258u) (assert tmp%20#0) + test_cases.arc4_types.tuples.Arc4TuplesTypeContract.test_copy() return 1u subroutine test_cases.arc4_types.tuples.Arc4TuplesTypeContract.test_stuff(test_tuple: bytes) -> : - block@0: // L54 + block@0: // L56 let a#0: bytes = ((extract 0 1) test_tuple#0) // on error: Index access is out of bounds let b#0: bytes = ((extract 1 1) test_tuple#0) // on error: Index access is out of bounds let item_start_offset%0#0: uint64 = (extract_uint16 test_tuple#0 2u) @@ -112,8 +113,25 @@ contract test_cases.arc4_types.tuples.Arc4TuplesTypeContract: let length_uint16%0#0: bytes = ((extract 6 2) as_bytes%0#0) let encoded_value%0#0: bytes = (concat length_uint16%0#0 text#0) return total#0 encoded_value%0#0 + + subroutine test_cases.arc4_types.tuples.Arc4TuplesTypeContract.test_copy() -> void: + block@0: // L69 + let tmp%1#0: bytes = 0x000100 + let tmp%2#0: bool = (== tmp%1#0 0x000100) + (assert tmp%2#0) + let array_length%0#0: uint64 = (extract_uint16 tmp%1#0 0u) + (assert array_length%0#0) // Index access is out of bounds + let updated_target%0#0: bytes = ((replace2 2) tmp%1#0 0x01) + let data_up_to_item%1#0: bytes = 0x000003 + let tup#2: bytes = (concat data_up_to_item%1#0 updated_target%0#0) + let item_start_offset%3#0: uint64 = (extract_uint16 tup#2 1u) + let item_end_offset%3#0: uint64 = (len tup#2) + let tmp%4#0: bytes = (substring3 tup#2 item_start_offset%3#0 item_end_offset%3#0) + let tmp%6#0: bool = (!= tmp%4#0 tmp%1#0) + (assert tmp%6#0) + return program clear-state: subroutine test_cases.arc4_types.tuples.Arc4TuplesTypeContract.clear_state_program() -> bool: - block@0: // L51 + block@0: // L53 return 1u \ No newline at end of file diff --git a/test_cases/arc4_types/out/Arc4TuplesTypeContract.ssa.opt_pass_14.ir b/test_cases/arc4_types/out/Arc4TuplesTypeContract.ssa.opt_pass_14.ir index 29510c26b1..f426c9ed23 100644 --- a/test_cases/arc4_types/out/Arc4TuplesTypeContract.ssa.opt_pass_14.ir +++ b/test_cases/arc4_types/out/Arc4TuplesTypeContract.ssa.opt_pass_14.ir @@ -75,10 +75,11 @@ contract test_cases.arc4_types.tuples.Arc4TuplesTypeContract: (assert tmp%19#0) let tmp%20#0: bool = (== total#0 258u) (assert tmp%20#0) + test_cases.arc4_types.tuples.Arc4TuplesTypeContract.test_copy() return 1u subroutine test_cases.arc4_types.tuples.Arc4TuplesTypeContract.test_stuff(test_tuple: bytes) -> : - block@0: // L54 + block@0: // L56 let a#0: bytes = ((extract 0 1) test_tuple#0) // on error: Index access is out of bounds let b#0: bytes = ((extract 1 1) test_tuple#0) // on error: Index access is out of bounds let item_start_offset%0#0: uint64 = (extract_uint16 test_tuple#0 2u) @@ -101,8 +102,23 @@ contract test_cases.arc4_types.tuples.Arc4TuplesTypeContract: let length_uint16%0#0: bytes = ((extract 6 2) as_bytes%0#0) let encoded_value%0#0: bytes = (concat length_uint16%0#0 text#0) return total#0 encoded_value%0#0 + + subroutine test_cases.arc4_types.tuples.Arc4TuplesTypeContract.test_copy() -> void: + block@0: // L69 + let tmp%2#0: bool = 1u + (assert tmp%2#0) + let array_length%0#0: uint64 = 1u + (assert array_length%0#0) // Index access is out of bounds + let updated_target%0#0: bytes = ((replace2 2) 0x000100 0x01) + let tup#2: bytes = (concat 0x000003 updated_target%0#0) + let item_start_offset%3#0: uint64 = (extract_uint16 tup#2 1u) + let item_end_offset%3#0: uint64 = (len tup#2) + let tmp%4#0: bytes = (substring3 tup#2 item_start_offset%3#0 item_end_offset%3#0) + let tmp%6#0: bool = (!= tmp%4#0 0x000100) + (assert tmp%6#0) + return program clear-state: subroutine test_cases.arc4_types.tuples.Arc4TuplesTypeContract.clear_state_program() -> bool: - block@0: // L51 + block@0: // L53 return 1u \ No newline at end of file diff --git a/test_cases/arc4_types/out/Arc4TuplesTypeContract.ssa.opt_pass_15.ir b/test_cases/arc4_types/out/Arc4TuplesTypeContract.ssa.opt_pass_15.ir index 809329ccc4..fe1f3600f8 100644 --- a/test_cases/arc4_types/out/Arc4TuplesTypeContract.ssa.opt_pass_15.ir +++ b/test_cases/arc4_types/out/Arc4TuplesTypeContract.ssa.opt_pass_15.ir @@ -28,10 +28,11 @@ contract test_cases.arc4_types.tuples.Arc4TuplesTypeContract: (assert tmp%19#0) let tmp%20#0: bool = (== total#0 258u) (assert tmp%20#0) + test_cases.arc4_types.tuples.Arc4TuplesTypeContract.test_copy() return 1u subroutine test_cases.arc4_types.tuples.Arc4TuplesTypeContract.test_stuff(test_tuple: bytes) -> : - block@0: // L54 + block@0: // L56 let a#0: bytes = ((extract 0 1) test_tuple#0) // on error: Index access is out of bounds let b#0: bytes = ((extract 1 1) test_tuple#0) // on error: Index access is out of bounds let item_start_offset%0#0: uint64 = (extract_uint16 test_tuple#0 2u) @@ -54,8 +55,19 @@ contract test_cases.arc4_types.tuples.Arc4TuplesTypeContract: let length_uint16%0#0: bytes = ((extract 6 2) as_bytes%0#0) let encoded_value%0#0: bytes = (concat length_uint16%0#0 text#0) return total#0 encoded_value%0#0 + + subroutine test_cases.arc4_types.tuples.Arc4TuplesTypeContract.test_copy() -> void: + block@0: // L69 + let updated_target%0#0: bytes = ((replace2 2) 0x000100 0x01) + let tup#2: bytes = (concat 0x000003 updated_target%0#0) + let item_start_offset%3#0: uint64 = (extract_uint16 tup#2 1u) + let item_end_offset%3#0: uint64 = (len tup#2) + let tmp%4#0: bytes = (substring3 tup#2 item_start_offset%3#0 item_end_offset%3#0) + let tmp%6#0: bool = (!= tmp%4#0 0x000100) + (assert tmp%6#0) + return program clear-state: subroutine test_cases.arc4_types.tuples.Arc4TuplesTypeContract.clear_state_program() -> bool: - block@0: // L51 + block@0: // L53 return 1u \ No newline at end of file diff --git a/test_cases/arc4_types/out/Arc4TuplesTypeContract.ssa.opt_pass_16.ir b/test_cases/arc4_types/out/Arc4TuplesTypeContract.ssa.opt_pass_16.ir index ce83ce4c29..eb6824c6fb 100644 --- a/test_cases/arc4_types/out/Arc4TuplesTypeContract.ssa.opt_pass_16.ir +++ b/test_cases/arc4_types/out/Arc4TuplesTypeContract.ssa.opt_pass_16.ir @@ -20,10 +20,11 @@ contract test_cases.arc4_types.tuples.Arc4TuplesTypeContract: (assert tmp%19#0) let tmp%20#0: bool = (== total#0 258u) (assert tmp%20#0) + test_cases.arc4_types.tuples.Arc4TuplesTypeContract.test_copy() return 1u subroutine test_cases.arc4_types.tuples.Arc4TuplesTypeContract.test_stuff(test_tuple: bytes) -> : - block@0: // L54 + block@0: // L56 let a#0: bytes = ((extract 0 1) test_tuple#0) // on error: Index access is out of bounds let b#0: bytes = ((extract 1 1) test_tuple#0) // on error: Index access is out of bounds let item_start_offset%0#0: uint64 = (extract_uint16 test_tuple#0 2u) @@ -46,8 +47,19 @@ contract test_cases.arc4_types.tuples.Arc4TuplesTypeContract: let length_uint16%0#0: bytes = ((extract 6 2) as_bytes%0#0) let encoded_value%0#0: bytes = (concat length_uint16%0#0 text#0) return total#0 encoded_value%0#0 + + subroutine test_cases.arc4_types.tuples.Arc4TuplesTypeContract.test_copy() -> void: + block@0: // L69 + let updated_target%0#0: bytes = ((replace2 2) 0x000100 0x01) + let tup#2: bytes = (concat 0x000003 updated_target%0#0) + let item_start_offset%3#0: uint64 = (extract_uint16 tup#2 1u) + let item_end_offset%3#0: uint64 = (len tup#2) + let tmp%4#0: bytes = (substring3 tup#2 item_start_offset%3#0 item_end_offset%3#0) + let tmp%6#0: bool = (!= tmp%4#0 0x000100) + (assert tmp%6#0) + return program clear-state: subroutine test_cases.arc4_types.tuples.Arc4TuplesTypeContract.clear_state_program() -> bool: - block@0: // L51 + block@0: // L53 return 1u \ No newline at end of file diff --git a/test_cases/arc4_types/out/Arc4TuplesTypeContract.ssa.opt_pass_17.ir b/test_cases/arc4_types/out/Arc4TuplesTypeContract.ssa.opt_pass_17.ir index 6567fa808a..2c1ad0b4da 100644 --- a/test_cases/arc4_types/out/Arc4TuplesTypeContract.ssa.opt_pass_17.ir +++ b/test_cases/arc4_types/out/Arc4TuplesTypeContract.ssa.opt_pass_17.ir @@ -17,10 +17,11 @@ contract test_cases.arc4_types.tuples.Arc4TuplesTypeContract: (assert tmp%19#0) let tmp%20#0: bool = (== total#0 258u) (assert tmp%20#0) + test_cases.arc4_types.tuples.Arc4TuplesTypeContract.test_copy() return 1u subroutine test_cases.arc4_types.tuples.Arc4TuplesTypeContract.test_stuff(test_tuple: bytes) -> : - block@0: // L54 + block@0: // L56 let a#0: bytes = ((extract 0 1) test_tuple#0) // on error: Index access is out of bounds let b#0: bytes = ((extract 1 1) test_tuple#0) // on error: Index access is out of bounds let item_start_offset%0#0: uint64 = (extract_uint16 test_tuple#0 2u) @@ -43,8 +44,19 @@ contract test_cases.arc4_types.tuples.Arc4TuplesTypeContract: let length_uint16%0#0: bytes = ((extract 6 2) as_bytes%0#0) let encoded_value%0#0: bytes = (concat length_uint16%0#0 text#0) return total#0 encoded_value%0#0 + + subroutine test_cases.arc4_types.tuples.Arc4TuplesTypeContract.test_copy() -> void: + block@0: // L69 + let updated_target%0#0: bytes = ((replace2 2) 0x000100 0x01) + let tup#2: bytes = (concat 0x000003 updated_target%0#0) + let item_start_offset%3#0: uint64 = (extract_uint16 tup#2 1u) + let item_end_offset%3#0: uint64 = (len tup#2) + let tmp%4#0: bytes = (substring3 tup#2 item_start_offset%3#0 item_end_offset%3#0) + let tmp%6#0: bool = (!= tmp%4#0 0x000100) + (assert tmp%6#0) + return program clear-state: subroutine test_cases.arc4_types.tuples.Arc4TuplesTypeContract.clear_state_program() -> bool: - block@0: // L51 + block@0: // L53 return 1u \ No newline at end of file diff --git a/test_cases/arc4_types/out/Arc4TuplesTypeContract.ssa.opt_pass_18.ir b/test_cases/arc4_types/out/Arc4TuplesTypeContract.ssa.opt_pass_18.ir index 0d9ca91b2f..5916b56caf 100644 --- a/test_cases/arc4_types/out/Arc4TuplesTypeContract.ssa.opt_pass_18.ir +++ b/test_cases/arc4_types/out/Arc4TuplesTypeContract.ssa.opt_pass_18.ir @@ -16,10 +16,11 @@ contract test_cases.arc4_types.tuples.Arc4TuplesTypeContract: (assert tmp%19#0) let tmp%20#0: bool = (== total#0 258u) (assert tmp%20#0) + test_cases.arc4_types.tuples.Arc4TuplesTypeContract.test_copy() return 1u subroutine test_cases.arc4_types.tuples.Arc4TuplesTypeContract.test_stuff(test_tuple: bytes) -> : - block@0: // L54 + block@0: // L56 let a#0: bytes = ((extract 0 1) test_tuple#0) // on error: Index access is out of bounds let b#0: bytes = ((extract 1 1) test_tuple#0) // on error: Index access is out of bounds let item_start_offset%0#0: uint64 = (extract_uint16 test_tuple#0 2u) @@ -42,8 +43,19 @@ contract test_cases.arc4_types.tuples.Arc4TuplesTypeContract: let length_uint16%0#0: bytes = ((extract 6 2) as_bytes%0#0) let encoded_value%0#0: bytes = (concat length_uint16%0#0 text#0) return total#0 encoded_value%0#0 + + subroutine test_cases.arc4_types.tuples.Arc4TuplesTypeContract.test_copy() -> void: + block@0: // L69 + let updated_target%0#0: bytes = ((replace2 2) 0x000100 0x01) + let tup#2: bytes = (concat 0x000003 updated_target%0#0) + let item_start_offset%3#0: uint64 = (extract_uint16 tup#2 1u) + let item_end_offset%3#0: uint64 = (len tup#2) + let tmp%4#0: bytes = (substring3 tup#2 item_start_offset%3#0 item_end_offset%3#0) + let tmp%6#0: bool = (!= tmp%4#0 0x000100) + (assert tmp%6#0) + return program clear-state: subroutine test_cases.arc4_types.tuples.Arc4TuplesTypeContract.clear_state_program() -> bool: - block@0: // L51 + block@0: // L53 return 1u \ No newline at end of file diff --git a/test_cases/arc4_types/out/Arc4TuplesTypeContract.ssa.opt_pass_19.ir b/test_cases/arc4_types/out/Arc4TuplesTypeContract.ssa.opt_pass_19.ir index cacba276ef..218464e3d9 100644 --- a/test_cases/arc4_types/out/Arc4TuplesTypeContract.ssa.opt_pass_19.ir +++ b/test_cases/arc4_types/out/Arc4TuplesTypeContract.ssa.opt_pass_19.ir @@ -15,10 +15,11 @@ contract test_cases.arc4_types.tuples.Arc4TuplesTypeContract: (assert tmp%19#0) let tmp%20#0: bool = (== total#0 258u) (assert tmp%20#0) + test_cases.arc4_types.tuples.Arc4TuplesTypeContract.test_copy() return 1u subroutine test_cases.arc4_types.tuples.Arc4TuplesTypeContract.test_stuff(test_tuple: bytes) -> : - block@0: // L54 + block@0: // L56 let a#0: bytes = ((extract 0 1) test_tuple#0) // on error: Index access is out of bounds let b#0: bytes = ((extract 1 1) test_tuple#0) // on error: Index access is out of bounds let item_start_offset%0#0: uint64 = (extract_uint16 test_tuple#0 2u) @@ -41,8 +42,19 @@ contract test_cases.arc4_types.tuples.Arc4TuplesTypeContract: let length_uint16%0#0: bytes = ((extract 6 2) as_bytes%0#0) let encoded_value%0#0: bytes = (concat length_uint16%0#0 text#0) return total#0 encoded_value%0#0 + + subroutine test_cases.arc4_types.tuples.Arc4TuplesTypeContract.test_copy() -> void: + block@0: // L69 + let updated_target%0#0: bytes = ((replace2 2) 0x000100 0x01) + let tup#2: bytes = (concat 0x000003 updated_target%0#0) + let item_start_offset%3#0: uint64 = (extract_uint16 tup#2 1u) + let item_end_offset%3#0: uint64 = (len tup#2) + let tmp%4#0: bytes = (substring3 tup#2 item_start_offset%3#0 item_end_offset%3#0) + let tmp%6#0: bool = (!= tmp%4#0 0x000100) + (assert tmp%6#0) + return program clear-state: subroutine test_cases.arc4_types.tuples.Arc4TuplesTypeContract.clear_state_program() -> bool: - block@0: // L51 + block@0: // L53 return 1u \ No newline at end of file diff --git a/test_cases/arc4_types/out/Arc4TuplesTypeContract.ssa.opt_pass_2.ir b/test_cases/arc4_types/out/Arc4TuplesTypeContract.ssa.opt_pass_2.ir index 1c000aad7b..967b171da8 100644 --- a/test_cases/arc4_types/out/Arc4TuplesTypeContract.ssa.opt_pass_2.ir +++ b/test_cases/arc4_types/out/Arc4TuplesTypeContract.ssa.opt_pass_2.ir @@ -134,10 +134,11 @@ contract test_cases.arc4_types.tuples.Arc4TuplesTypeContract: (assert tmp%19#0) let tmp%20#0: bool = (== total#0 258u) (assert tmp%20#0) + test_cases.arc4_types.tuples.Arc4TuplesTypeContract.test_copy() return 1u subroutine test_cases.arc4_types.tuples.Arc4TuplesTypeContract.test_stuff(test_tuple: bytes) -> : - block@0: // L54 + block@0: // L56 let a#0: bytes = ((extract 0 1) test_tuple#0) // on error: Index access is out of bounds let b#0: bytes = ((extract 1 1) test_tuple#0) // on error: Index access is out of bounds let item_start_offset%0#0: uint64 = (extract_uint16 test_tuple#0 2u) @@ -166,8 +167,42 @@ contract test_cases.arc4_types.tuples.Arc4TuplesTypeContract: let length_uint16%0#0: bytes = ((extract 6 2) as_bytes%0#0) let encoded_value%0#0: bytes = (concat length_uint16%0#0 text#0) return total#0 encoded_value%0#0 + + subroutine test_cases.arc4_types.tuples.Arc4TuplesTypeContract.test_copy() -> void: + block@0: // L69 + let length_uint16%0#0: bytes = 0x0000 + let encoded_tuple_buffer%2#0: bytes = 0x000003 + let tup#0: bytes = (concat encoded_tuple_buffer%2#0 length_uint16%0#0) + let item_start_offset%0#0: uint64 = (extract_uint16 tup#0 1u) + let item_end_offset%0#0: uint64 = (len tup#0) + let tmp%0#0: bytes = (substring3 tup#0 item_start_offset%0#0 item_end_offset%0#0) + let expr_value_trimmed%0#0: bytes = ((extract 2 0) tmp%0#0) + let concatenated%0#0: bytes = (concat expr_value_trimmed%0#0 0x00) + let len_%0#0: uint64 = (len concatenated%0#0) + let as_bytes%2#0: bytes = (itob len_%0#0) + let len_16_bit%0#0: bytes = ((extract 6 2) as_bytes%2#0) + let concat_result%0#0: bytes = (concat len_16_bit%0#0 concatenated%0#0) + let data_up_to_item%0#0: bytes = (extract3 tup#0 0u item_start_offset%0#0) + let tup#1: bytes = (concat data_up_to_item%0#0 concat_result%0#0) + let item_start_offset%1#0: uint64 = (extract_uint16 tup#1 1u) + let item_end_offset%1#0: uint64 = (len tup#1) + let tmp%1#0: bytes = (substring3 tup#1 item_start_offset%1#0 item_end_offset%1#0) + let array_data%0#0: bytes = 0x000100 + let tmp%2#0: bool = (== tmp%1#0 array_data%0#0) + (assert tmp%2#0) + let array_length%0#0: uint64 = (extract_uint16 tmp%1#0 0u) + (assert array_length%0#0) // Index access is out of bounds + let updated_target%0#0: bytes = ((replace2 2) tmp%1#0 0x01) + let data_up_to_item%1#0: bytes = (extract3 tup#1 0u item_start_offset%1#0) + let tup#2: bytes = (concat data_up_to_item%1#0 updated_target%0#0) + let item_start_offset%3#0: uint64 = (extract_uint16 tup#2 1u) + let item_end_offset%3#0: uint64 = (len tup#2) + let tmp%4#0: bytes = (substring3 tup#2 item_start_offset%3#0 item_end_offset%3#0) + let tmp%6#0: bool = (!= tmp%4#0 tmp%1#0) + (assert tmp%6#0) + return program clear-state: subroutine test_cases.arc4_types.tuples.Arc4TuplesTypeContract.clear_state_program() -> bool: - block@0: // L51 + block@0: // L53 return 1u \ No newline at end of file diff --git a/test_cases/arc4_types/out/Arc4TuplesTypeContract.ssa.opt_pass_20.ir b/test_cases/arc4_types/out/Arc4TuplesTypeContract.ssa.opt_pass_20.ir index 2b66f520ac..0c5284ed26 100644 --- a/test_cases/arc4_types/out/Arc4TuplesTypeContract.ssa.opt_pass_20.ir +++ b/test_cases/arc4_types/out/Arc4TuplesTypeContract.ssa.opt_pass_20.ir @@ -14,10 +14,11 @@ contract test_cases.arc4_types.tuples.Arc4TuplesTypeContract: (assert tmp%19#0) let tmp%20#0: bool = (== total#0 258u) (assert tmp%20#0) + test_cases.arc4_types.tuples.Arc4TuplesTypeContract.test_copy() return 1u subroutine test_cases.arc4_types.tuples.Arc4TuplesTypeContract.test_stuff(test_tuple: bytes) -> : - block@0: // L54 + block@0: // L56 let a#0: bytes = ((extract 0 1) test_tuple#0) // on error: Index access is out of bounds let b#0: bytes = ((extract 1 1) test_tuple#0) // on error: Index access is out of bounds let item_start_offset%0#0: uint64 = (extract_uint16 test_tuple#0 2u) @@ -40,8 +41,19 @@ contract test_cases.arc4_types.tuples.Arc4TuplesTypeContract: let length_uint16%0#0: bytes = ((extract 6 2) as_bytes%0#0) let encoded_value%0#0: bytes = (concat length_uint16%0#0 text#0) return total#0 encoded_value%0#0 + + subroutine test_cases.arc4_types.tuples.Arc4TuplesTypeContract.test_copy() -> void: + block@0: // L69 + let updated_target%0#0: bytes = ((replace2 2) 0x000100 0x01) + let tup#2: bytes = (concat 0x000003 updated_target%0#0) + let item_start_offset%3#0: uint64 = (extract_uint16 tup#2 1u) + let item_end_offset%3#0: uint64 = (len tup#2) + let tmp%4#0: bytes = (substring3 tup#2 item_start_offset%3#0 item_end_offset%3#0) + let tmp%6#0: bool = (!= tmp%4#0 0x000100) + (assert tmp%6#0) + return program clear-state: subroutine test_cases.arc4_types.tuples.Arc4TuplesTypeContract.clear_state_program() -> bool: - block@0: // L51 + block@0: // L53 return 1u \ No newline at end of file diff --git a/test_cases/arc4_types/out/Arc4TuplesTypeContract.ssa.opt_pass_21.ir b/test_cases/arc4_types/out/Arc4TuplesTypeContract.ssa.opt_pass_21.ir index bb52e59f33..4da64bca71 100644 --- a/test_cases/arc4_types/out/Arc4TuplesTypeContract.ssa.opt_pass_21.ir +++ b/test_cases/arc4_types/out/Arc4TuplesTypeContract.ssa.opt_pass_21.ir @@ -13,10 +13,11 @@ contract test_cases.arc4_types.tuples.Arc4TuplesTypeContract: (assert tmp%19#0) let tmp%20#0: bool = (== total#0 258u) (assert tmp%20#0) + test_cases.arc4_types.tuples.Arc4TuplesTypeContract.test_copy() return 1u subroutine test_cases.arc4_types.tuples.Arc4TuplesTypeContract.test_stuff(test_tuple: bytes) -> : - block@0: // L54 + block@0: // L56 let a#0: bytes = ((extract 0 1) test_tuple#0) // on error: Index access is out of bounds let b#0: bytes = ((extract 1 1) test_tuple#0) // on error: Index access is out of bounds let item_start_offset%0#0: uint64 = (extract_uint16 test_tuple#0 2u) @@ -39,8 +40,19 @@ contract test_cases.arc4_types.tuples.Arc4TuplesTypeContract: let length_uint16%0#0: bytes = ((extract 6 2) as_bytes%0#0) let encoded_value%0#0: bytes = (concat length_uint16%0#0 text#0) return total#0 encoded_value%0#0 + + subroutine test_cases.arc4_types.tuples.Arc4TuplesTypeContract.test_copy() -> void: + block@0: // L69 + let updated_target%0#0: bytes = ((replace2 2) 0x000100 0x01) + let tup#2: bytes = (concat 0x000003 updated_target%0#0) + let item_start_offset%3#0: uint64 = (extract_uint16 tup#2 1u) + let item_end_offset%3#0: uint64 = (len tup#2) + let tmp%4#0: bytes = (substring3 tup#2 item_start_offset%3#0 item_end_offset%3#0) + let tmp%6#0: bool = (!= tmp%4#0 0x000100) + (assert tmp%6#0) + return program clear-state: subroutine test_cases.arc4_types.tuples.Arc4TuplesTypeContract.clear_state_program() -> bool: - block@0: // L51 + block@0: // L53 return 1u \ No newline at end of file diff --git a/test_cases/arc4_types/out/Arc4TuplesTypeContract.ssa.opt_pass_22.ir b/test_cases/arc4_types/out/Arc4TuplesTypeContract.ssa.opt_pass_22.ir index 16ee6e7cd1..ed4425b6d0 100644 --- a/test_cases/arc4_types/out/Arc4TuplesTypeContract.ssa.opt_pass_22.ir +++ b/test_cases/arc4_types/out/Arc4TuplesTypeContract.ssa.opt_pass_22.ir @@ -12,10 +12,11 @@ contract test_cases.arc4_types.tuples.Arc4TuplesTypeContract: (assert tmp%19#0) let tmp%20#0: bool = (== total#0 258u) (assert tmp%20#0) + test_cases.arc4_types.tuples.Arc4TuplesTypeContract.test_copy() return 1u subroutine test_cases.arc4_types.tuples.Arc4TuplesTypeContract.test_stuff(test_tuple: bytes) -> : - block@0: // L54 + block@0: // L56 let a#0: bytes = ((extract 0 1) test_tuple#0) // on error: Index access is out of bounds let b#0: bytes = ((extract 1 1) test_tuple#0) // on error: Index access is out of bounds let item_start_offset%0#0: uint64 = (extract_uint16 test_tuple#0 2u) @@ -38,8 +39,19 @@ contract test_cases.arc4_types.tuples.Arc4TuplesTypeContract: let length_uint16%0#0: bytes = ((extract 6 2) as_bytes%0#0) let encoded_value%0#0: bytes = (concat length_uint16%0#0 text#0) return total#0 encoded_value%0#0 + + subroutine test_cases.arc4_types.tuples.Arc4TuplesTypeContract.test_copy() -> void: + block@0: // L69 + let updated_target%0#0: bytes = ((replace2 2) 0x000100 0x01) + let tup#2: bytes = (concat 0x000003 updated_target%0#0) + let item_start_offset%3#0: uint64 = (extract_uint16 tup#2 1u) + let item_end_offset%3#0: uint64 = (len tup#2) + let tmp%4#0: bytes = (substring3 tup#2 item_start_offset%3#0 item_end_offset%3#0) + let tmp%6#0: bool = (!= tmp%4#0 0x000100) + (assert tmp%6#0) + return program clear-state: subroutine test_cases.arc4_types.tuples.Arc4TuplesTypeContract.clear_state_program() -> bool: - block@0: // L51 + block@0: // L53 return 1u \ No newline at end of file diff --git a/test_cases/arc4_types/out/Arc4TuplesTypeContract.ssa.opt_pass_23.ir b/test_cases/arc4_types/out/Arc4TuplesTypeContract.ssa.opt_pass_23.ir index 2084acba93..cb1ef59638 100644 --- a/test_cases/arc4_types/out/Arc4TuplesTypeContract.ssa.opt_pass_23.ir +++ b/test_cases/arc4_types/out/Arc4TuplesTypeContract.ssa.opt_pass_23.ir @@ -11,10 +11,11 @@ contract test_cases.arc4_types.tuples.Arc4TuplesTypeContract: (assert tmp%19#0) let tmp%20#0: bool = (== total#0 258u) (assert tmp%20#0) + test_cases.arc4_types.tuples.Arc4TuplesTypeContract.test_copy() return 1u subroutine test_cases.arc4_types.tuples.Arc4TuplesTypeContract.test_stuff(test_tuple: bytes) -> : - block@0: // L54 + block@0: // L56 let a#0: bytes = ((extract 0 1) test_tuple#0) // on error: Index access is out of bounds let b#0: bytes = ((extract 1 1) test_tuple#0) // on error: Index access is out of bounds let item_start_offset%0#0: uint64 = (extract_uint16 test_tuple#0 2u) @@ -37,8 +38,19 @@ contract test_cases.arc4_types.tuples.Arc4TuplesTypeContract: let length_uint16%0#0: bytes = ((extract 6 2) as_bytes%0#0) let encoded_value%0#0: bytes = (concat length_uint16%0#0 text#0) return total#0 encoded_value%0#0 + + subroutine test_cases.arc4_types.tuples.Arc4TuplesTypeContract.test_copy() -> void: + block@0: // L69 + let updated_target%0#0: bytes = ((replace2 2) 0x000100 0x01) + let tup#2: bytes = (concat 0x000003 updated_target%0#0) + let item_start_offset%3#0: uint64 = (extract_uint16 tup#2 1u) + let item_end_offset%3#0: uint64 = (len tup#2) + let tmp%4#0: bytes = (substring3 tup#2 item_start_offset%3#0 item_end_offset%3#0) + let tmp%6#0: bool = (!= tmp%4#0 0x000100) + (assert tmp%6#0) + return program clear-state: subroutine test_cases.arc4_types.tuples.Arc4TuplesTypeContract.clear_state_program() -> bool: - block@0: // L51 + block@0: // L53 return 1u \ No newline at end of file diff --git a/test_cases/arc4_types/out/Arc4TuplesTypeContract.ssa.opt_pass_24.ir b/test_cases/arc4_types/out/Arc4TuplesTypeContract.ssa.opt_pass_24.ir index d992143e3d..e5a188bfad 100644 --- a/test_cases/arc4_types/out/Arc4TuplesTypeContract.ssa.opt_pass_24.ir +++ b/test_cases/arc4_types/out/Arc4TuplesTypeContract.ssa.opt_pass_24.ir @@ -10,10 +10,11 @@ contract test_cases.arc4_types.tuples.Arc4TuplesTypeContract: (assert tmp%19#0) let tmp%20#0: bool = (== total#0 258u) (assert tmp%20#0) + test_cases.arc4_types.tuples.Arc4TuplesTypeContract.test_copy() return 1u subroutine test_cases.arc4_types.tuples.Arc4TuplesTypeContract.test_stuff(test_tuple: bytes) -> : - block@0: // L54 + block@0: // L56 let a#0: bytes = ((extract 0 1) test_tuple#0) // on error: Index access is out of bounds let b#0: bytes = ((extract 1 1) test_tuple#0) // on error: Index access is out of bounds let item_start_offset%0#0: uint64 = (extract_uint16 test_tuple#0 2u) @@ -36,8 +37,19 @@ contract test_cases.arc4_types.tuples.Arc4TuplesTypeContract: let length_uint16%0#0: bytes = ((extract 6 2) as_bytes%0#0) let encoded_value%0#0: bytes = (concat length_uint16%0#0 text#0) return total#0 encoded_value%0#0 + + subroutine test_cases.arc4_types.tuples.Arc4TuplesTypeContract.test_copy() -> void: + block@0: // L69 + let updated_target%0#0: bytes = ((replace2 2) 0x000100 0x01) + let tup#2: bytes = (concat 0x000003 updated_target%0#0) + let item_start_offset%3#0: uint64 = (extract_uint16 tup#2 1u) + let item_end_offset%3#0: uint64 = (len tup#2) + let tmp%4#0: bytes = (substring3 tup#2 item_start_offset%3#0 item_end_offset%3#0) + let tmp%6#0: bool = (!= tmp%4#0 0x000100) + (assert tmp%6#0) + return program clear-state: subroutine test_cases.arc4_types.tuples.Arc4TuplesTypeContract.clear_state_program() -> bool: - block@0: // L51 + block@0: // L53 return 1u \ No newline at end of file diff --git a/test_cases/arc4_types/out/Arc4TuplesTypeContract.ssa.opt_pass_25.ir b/test_cases/arc4_types/out/Arc4TuplesTypeContract.ssa.opt_pass_25.ir index fef8f00d02..72898b4c87 100644 --- a/test_cases/arc4_types/out/Arc4TuplesTypeContract.ssa.opt_pass_25.ir +++ b/test_cases/arc4_types/out/Arc4TuplesTypeContract.ssa.opt_pass_25.ir @@ -8,10 +8,11 @@ contract test_cases.arc4_types.tuples.Arc4TuplesTypeContract: (assert tmp%19#0) let tmp%20#0: bool = (== total#0 258u) (assert tmp%20#0) + test_cases.arc4_types.tuples.Arc4TuplesTypeContract.test_copy() return 1u subroutine test_cases.arc4_types.tuples.Arc4TuplesTypeContract.test_stuff(test_tuple: bytes) -> : - block@0: // L54 + block@0: // L56 let a#0: bytes = ((extract 0 1) test_tuple#0) // on error: Index access is out of bounds let b#0: bytes = ((extract 1 1) test_tuple#0) // on error: Index access is out of bounds let item_start_offset%0#0: uint64 = (extract_uint16 test_tuple#0 2u) @@ -34,8 +35,19 @@ contract test_cases.arc4_types.tuples.Arc4TuplesTypeContract: let length_uint16%0#0: bytes = ((extract 6 2) as_bytes%0#0) let encoded_value%0#0: bytes = (concat length_uint16%0#0 text#0) return total#0 encoded_value%0#0 + + subroutine test_cases.arc4_types.tuples.Arc4TuplesTypeContract.test_copy() -> void: + block@0: // L69 + let updated_target%0#0: bytes = ((replace2 2) 0x000100 0x01) + let tup#2: bytes = (concat 0x000003 updated_target%0#0) + let item_start_offset%3#0: uint64 = (extract_uint16 tup#2 1u) + let item_end_offset%3#0: uint64 = (len tup#2) + let tmp%4#0: bytes = (substring3 tup#2 item_start_offset%3#0 item_end_offset%3#0) + let tmp%6#0: bool = (!= tmp%4#0 0x000100) + (assert tmp%6#0) + return program clear-state: subroutine test_cases.arc4_types.tuples.Arc4TuplesTypeContract.clear_state_program() -> bool: - block@0: // L51 + block@0: // L53 return 1u \ No newline at end of file diff --git a/test_cases/arc4_types/out/Arc4TuplesTypeContract.ssa.opt_pass_3.ir b/test_cases/arc4_types/out/Arc4TuplesTypeContract.ssa.opt_pass_3.ir index ab7b4a7714..caede4dcfd 100644 --- a/test_cases/arc4_types/out/Arc4TuplesTypeContract.ssa.opt_pass_3.ir +++ b/test_cases/arc4_types/out/Arc4TuplesTypeContract.ssa.opt_pass_3.ir @@ -121,10 +121,11 @@ contract test_cases.arc4_types.tuples.Arc4TuplesTypeContract: (assert tmp%19#0) let tmp%20#0: bool = (== total#0 258u) (assert tmp%20#0) + test_cases.arc4_types.tuples.Arc4TuplesTypeContract.test_copy() return 1u subroutine test_cases.arc4_types.tuples.Arc4TuplesTypeContract.test_stuff(test_tuple: bytes) -> : - block@0: // L54 + block@0: // L56 let a#0: bytes = ((extract 0 1) test_tuple#0) // on error: Index access is out of bounds let b#0: bytes = ((extract 1 1) test_tuple#0) // on error: Index access is out of bounds let item_start_offset%0#0: uint64 = (extract_uint16 test_tuple#0 2u) @@ -147,8 +148,39 @@ contract test_cases.arc4_types.tuples.Arc4TuplesTypeContract: let length_uint16%0#0: bytes = ((extract 6 2) as_bytes%0#0) let encoded_value%0#0: bytes = (concat length_uint16%0#0 text#0) return total#0 encoded_value%0#0 + + subroutine test_cases.arc4_types.tuples.Arc4TuplesTypeContract.test_copy() -> void: + block@0: // L69 + let tup#0: bytes = 0x0000030000 + let item_start_offset%0#0: uint64 = (extract_uint16 tup#0 1u) + let item_end_offset%0#0: uint64 = (len tup#0) + let tmp%0#0: bytes = (substring3 tup#0 item_start_offset%0#0 item_end_offset%0#0) + let expr_value_trimmed%0#0: bytes = ((extract 2 0) tmp%0#0) + let concatenated%0#0: bytes = (concat expr_value_trimmed%0#0 0x00) + let len_%0#0: uint64 = (len concatenated%0#0) + let as_bytes%2#0: bytes = (itob len_%0#0) + let len_16_bit%0#0: bytes = ((extract 6 2) as_bytes%2#0) + let concat_result%0#0: bytes = (concat len_16_bit%0#0 concatenated%0#0) + let data_up_to_item%0#0: bytes = (extract3 tup#0 0u item_start_offset%0#0) + let tup#1: bytes = (concat data_up_to_item%0#0 concat_result%0#0) + let item_start_offset%1#0: uint64 = (extract_uint16 tup#1 1u) + let item_end_offset%1#0: uint64 = (len tup#1) + let tmp%1#0: bytes = (substring3 tup#1 item_start_offset%1#0 item_end_offset%1#0) + let tmp%2#0: bool = (== tmp%1#0 0x000100) + (assert tmp%2#0) + let array_length%0#0: uint64 = (extract_uint16 tmp%1#0 0u) + (assert array_length%0#0) // Index access is out of bounds + let updated_target%0#0: bytes = ((replace2 2) tmp%1#0 0x01) + let data_up_to_item%1#0: bytes = (extract3 tup#1 0u item_start_offset%1#0) + let tup#2: bytes = (concat data_up_to_item%1#0 updated_target%0#0) + let item_start_offset%3#0: uint64 = (extract_uint16 tup#2 1u) + let item_end_offset%3#0: uint64 = (len tup#2) + let tmp%4#0: bytes = (substring3 tup#2 item_start_offset%3#0 item_end_offset%3#0) + let tmp%6#0: bool = (!= tmp%4#0 tmp%1#0) + (assert tmp%6#0) + return program clear-state: subroutine test_cases.arc4_types.tuples.Arc4TuplesTypeContract.clear_state_program() -> bool: - block@0: // L51 + block@0: // L53 return 1u \ No newline at end of file diff --git a/test_cases/arc4_types/out/Arc4TuplesTypeContract.ssa.opt_pass_4.ir b/test_cases/arc4_types/out/Arc4TuplesTypeContract.ssa.opt_pass_4.ir index bc0d57fca4..3af3122c64 100644 --- a/test_cases/arc4_types/out/Arc4TuplesTypeContract.ssa.opt_pass_4.ir +++ b/test_cases/arc4_types/out/Arc4TuplesTypeContract.ssa.opt_pass_4.ir @@ -117,10 +117,11 @@ contract test_cases.arc4_types.tuples.Arc4TuplesTypeContract: (assert tmp%19#0) let tmp%20#0: bool = (== total#0 258u) (assert tmp%20#0) + test_cases.arc4_types.tuples.Arc4TuplesTypeContract.test_copy() return 1u subroutine test_cases.arc4_types.tuples.Arc4TuplesTypeContract.test_stuff(test_tuple: bytes) -> : - block@0: // L54 + block@0: // L56 let a#0: bytes = ((extract 0 1) test_tuple#0) // on error: Index access is out of bounds let b#0: bytes = ((extract 1 1) test_tuple#0) // on error: Index access is out of bounds let item_start_offset%0#0: uint64 = (extract_uint16 test_tuple#0 2u) @@ -143,8 +144,38 @@ contract test_cases.arc4_types.tuples.Arc4TuplesTypeContract: let length_uint16%0#0: bytes = ((extract 6 2) as_bytes%0#0) let encoded_value%0#0: bytes = (concat length_uint16%0#0 text#0) return total#0 encoded_value%0#0 + + subroutine test_cases.arc4_types.tuples.Arc4TuplesTypeContract.test_copy() -> void: + block@0: // L69 + let item_start_offset%0#0: uint64 = 3u + let item_end_offset%0#0: uint64 = 5u + let tmp%0#0: bytes = (substring3 0x0000030000 item_start_offset%0#0 item_end_offset%0#0) + let expr_value_trimmed%0#0: bytes = ((extract 2 0) tmp%0#0) + let concatenated%0#0: bytes = (concat expr_value_trimmed%0#0 0x00) + let len_%0#0: uint64 = (len concatenated%0#0) + let as_bytes%2#0: bytes = (itob len_%0#0) + let len_16_bit%0#0: bytes = ((extract 6 2) as_bytes%2#0) + let concat_result%0#0: bytes = (concat len_16_bit%0#0 concatenated%0#0) + let data_up_to_item%0#0: bytes = (extract3 0x0000030000 0u item_start_offset%0#0) + let tup#1: bytes = (concat data_up_to_item%0#0 concat_result%0#0) + let item_start_offset%1#0: uint64 = (extract_uint16 tup#1 1u) + let item_end_offset%1#0: uint64 = (len tup#1) + let tmp%1#0: bytes = (substring3 tup#1 item_start_offset%1#0 item_end_offset%1#0) + let tmp%2#0: bool = (== tmp%1#0 0x000100) + (assert tmp%2#0) + let array_length%0#0: uint64 = (extract_uint16 tmp%1#0 0u) + (assert array_length%0#0) // Index access is out of bounds + let updated_target%0#0: bytes = ((replace2 2) tmp%1#0 0x01) + let data_up_to_item%1#0: bytes = (extract3 tup#1 0u item_start_offset%1#0) + let tup#2: bytes = (concat data_up_to_item%1#0 updated_target%0#0) + let item_start_offset%3#0: uint64 = (extract_uint16 tup#2 1u) + let item_end_offset%3#0: uint64 = (len tup#2) + let tmp%4#0: bytes = (substring3 tup#2 item_start_offset%3#0 item_end_offset%3#0) + let tmp%6#0: bool = (!= tmp%4#0 tmp%1#0) + (assert tmp%6#0) + return program clear-state: subroutine test_cases.arc4_types.tuples.Arc4TuplesTypeContract.clear_state_program() -> bool: - block@0: // L51 + block@0: // L53 return 1u \ No newline at end of file diff --git a/test_cases/arc4_types/out/Arc4TuplesTypeContract.ssa.opt_pass_5.ir b/test_cases/arc4_types/out/Arc4TuplesTypeContract.ssa.opt_pass_5.ir index dbc048164e..519dca143a 100644 --- a/test_cases/arc4_types/out/Arc4TuplesTypeContract.ssa.opt_pass_5.ir +++ b/test_cases/arc4_types/out/Arc4TuplesTypeContract.ssa.opt_pass_5.ir @@ -115,10 +115,11 @@ contract test_cases.arc4_types.tuples.Arc4TuplesTypeContract: (assert tmp%19#0) let tmp%20#0: bool = (== total#0 258u) (assert tmp%20#0) + test_cases.arc4_types.tuples.Arc4TuplesTypeContract.test_copy() return 1u subroutine test_cases.arc4_types.tuples.Arc4TuplesTypeContract.test_stuff(test_tuple: bytes) -> : - block@0: // L54 + block@0: // L56 let a#0: bytes = ((extract 0 1) test_tuple#0) // on error: Index access is out of bounds let b#0: bytes = ((extract 1 1) test_tuple#0) // on error: Index access is out of bounds let item_start_offset%0#0: uint64 = (extract_uint16 test_tuple#0 2u) @@ -141,8 +142,36 @@ contract test_cases.arc4_types.tuples.Arc4TuplesTypeContract: let length_uint16%0#0: bytes = ((extract 6 2) as_bytes%0#0) let encoded_value%0#0: bytes = (concat length_uint16%0#0 text#0) return total#0 encoded_value%0#0 + + subroutine test_cases.arc4_types.tuples.Arc4TuplesTypeContract.test_copy() -> void: + block@0: // L69 + let tmp%0#0: bytes = 0x0000 + let expr_value_trimmed%0#0: bytes = ((extract 2 0) tmp%0#0) + let concatenated%0#0: bytes = (concat expr_value_trimmed%0#0 0x00) + let len_%0#0: uint64 = (len concatenated%0#0) + let as_bytes%2#0: bytes = (itob len_%0#0) + let len_16_bit%0#0: bytes = ((extract 6 2) as_bytes%2#0) + let concat_result%0#0: bytes = (concat len_16_bit%0#0 concatenated%0#0) + let data_up_to_item%0#0: bytes = 0x000003 + let tup#1: bytes = (concat data_up_to_item%0#0 concat_result%0#0) + let item_start_offset%1#0: uint64 = (extract_uint16 tup#1 1u) + let item_end_offset%1#0: uint64 = (len tup#1) + let tmp%1#0: bytes = (substring3 tup#1 item_start_offset%1#0 item_end_offset%1#0) + let tmp%2#0: bool = (== tmp%1#0 0x000100) + (assert tmp%2#0) + let array_length%0#0: uint64 = (extract_uint16 tmp%1#0 0u) + (assert array_length%0#0) // Index access is out of bounds + let updated_target%0#0: bytes = ((replace2 2) tmp%1#0 0x01) + let data_up_to_item%1#0: bytes = (extract3 tup#1 0u item_start_offset%1#0) + let tup#2: bytes = (concat data_up_to_item%1#0 updated_target%0#0) + let item_start_offset%3#0: uint64 = (extract_uint16 tup#2 1u) + let item_end_offset%3#0: uint64 = (len tup#2) + let tmp%4#0: bytes = (substring3 tup#2 item_start_offset%3#0 item_end_offset%3#0) + let tmp%6#0: bool = (!= tmp%4#0 tmp%1#0) + (assert tmp%6#0) + return program clear-state: subroutine test_cases.arc4_types.tuples.Arc4TuplesTypeContract.clear_state_program() -> bool: - block@0: // L51 + block@0: // L53 return 1u \ No newline at end of file diff --git a/test_cases/arc4_types/out/Arc4TuplesTypeContract.ssa.opt_pass_6.ir b/test_cases/arc4_types/out/Arc4TuplesTypeContract.ssa.opt_pass_6.ir index f78f237292..52d6a736e1 100644 --- a/test_cases/arc4_types/out/Arc4TuplesTypeContract.ssa.opt_pass_6.ir +++ b/test_cases/arc4_types/out/Arc4TuplesTypeContract.ssa.opt_pass_6.ir @@ -112,10 +112,11 @@ contract test_cases.arc4_types.tuples.Arc4TuplesTypeContract: (assert tmp%19#0) let tmp%20#0: bool = (== total#0 258u) (assert tmp%20#0) + test_cases.arc4_types.tuples.Arc4TuplesTypeContract.test_copy() return 1u subroutine test_cases.arc4_types.tuples.Arc4TuplesTypeContract.test_stuff(test_tuple: bytes) -> : - block@0: // L54 + block@0: // L56 let a#0: bytes = ((extract 0 1) test_tuple#0) // on error: Index access is out of bounds let b#0: bytes = ((extract 1 1) test_tuple#0) // on error: Index access is out of bounds let item_start_offset%0#0: uint64 = (extract_uint16 test_tuple#0 2u) @@ -138,8 +139,34 @@ contract test_cases.arc4_types.tuples.Arc4TuplesTypeContract: let length_uint16%0#0: bytes = ((extract 6 2) as_bytes%0#0) let encoded_value%0#0: bytes = (concat length_uint16%0#0 text#0) return total#0 encoded_value%0#0 + + subroutine test_cases.arc4_types.tuples.Arc4TuplesTypeContract.test_copy() -> void: + block@0: // L69 + let expr_value_trimmed%0#0: bytes = 0x + let concatenated%0#0: bytes = (concat expr_value_trimmed%0#0 0x00) + let len_%0#0: uint64 = (len concatenated%0#0) + let as_bytes%2#0: bytes = (itob len_%0#0) + let len_16_bit%0#0: bytes = ((extract 6 2) as_bytes%2#0) + let concat_result%0#0: bytes = (concat len_16_bit%0#0 concatenated%0#0) + let tup#1: bytes = (concat 0x000003 concat_result%0#0) + let item_start_offset%1#0: uint64 = (extract_uint16 tup#1 1u) + let item_end_offset%1#0: uint64 = (len tup#1) + let tmp%1#0: bytes = (substring3 tup#1 item_start_offset%1#0 item_end_offset%1#0) + let tmp%2#0: bool = (== tmp%1#0 0x000100) + (assert tmp%2#0) + let array_length%0#0: uint64 = (extract_uint16 tmp%1#0 0u) + (assert array_length%0#0) // Index access is out of bounds + let updated_target%0#0: bytes = ((replace2 2) tmp%1#0 0x01) + let data_up_to_item%1#0: bytes = (extract3 tup#1 0u item_start_offset%1#0) + let tup#2: bytes = (concat data_up_to_item%1#0 updated_target%0#0) + let item_start_offset%3#0: uint64 = (extract_uint16 tup#2 1u) + let item_end_offset%3#0: uint64 = (len tup#2) + let tmp%4#0: bytes = (substring3 tup#2 item_start_offset%3#0 item_end_offset%3#0) + let tmp%6#0: bool = (!= tmp%4#0 tmp%1#0) + (assert tmp%6#0) + return program clear-state: subroutine test_cases.arc4_types.tuples.Arc4TuplesTypeContract.clear_state_program() -> bool: - block@0: // L51 + block@0: // L53 return 1u \ No newline at end of file diff --git a/test_cases/arc4_types/out/Arc4TuplesTypeContract.ssa.opt_pass_7.ir b/test_cases/arc4_types/out/Arc4TuplesTypeContract.ssa.opt_pass_7.ir index 47aa8bf6a4..2afb2ed199 100644 --- a/test_cases/arc4_types/out/Arc4TuplesTypeContract.ssa.opt_pass_7.ir +++ b/test_cases/arc4_types/out/Arc4TuplesTypeContract.ssa.opt_pass_7.ir @@ -110,10 +110,11 @@ contract test_cases.arc4_types.tuples.Arc4TuplesTypeContract: (assert tmp%19#0) let tmp%20#0: bool = (== total#0 258u) (assert tmp%20#0) + test_cases.arc4_types.tuples.Arc4TuplesTypeContract.test_copy() return 1u subroutine test_cases.arc4_types.tuples.Arc4TuplesTypeContract.test_stuff(test_tuple: bytes) -> : - block@0: // L54 + block@0: // L56 let a#0: bytes = ((extract 0 1) test_tuple#0) // on error: Index access is out of bounds let b#0: bytes = ((extract 1 1) test_tuple#0) // on error: Index access is out of bounds let item_start_offset%0#0: uint64 = (extract_uint16 test_tuple#0 2u) @@ -136,8 +137,33 @@ contract test_cases.arc4_types.tuples.Arc4TuplesTypeContract: let length_uint16%0#0: bytes = ((extract 6 2) as_bytes%0#0) let encoded_value%0#0: bytes = (concat length_uint16%0#0 text#0) return total#0 encoded_value%0#0 + + subroutine test_cases.arc4_types.tuples.Arc4TuplesTypeContract.test_copy() -> void: + block@0: // L69 + let concatenated%0#0: bytes = 0x00 + let len_%0#0: uint64 = (len concatenated%0#0) + let as_bytes%2#0: bytes = (itob len_%0#0) + let len_16_bit%0#0: bytes = ((extract 6 2) as_bytes%2#0) + let concat_result%0#0: bytes = (concat len_16_bit%0#0 concatenated%0#0) + let tup#1: bytes = (concat 0x000003 concat_result%0#0) + let item_start_offset%1#0: uint64 = (extract_uint16 tup#1 1u) + let item_end_offset%1#0: uint64 = (len tup#1) + let tmp%1#0: bytes = (substring3 tup#1 item_start_offset%1#0 item_end_offset%1#0) + let tmp%2#0: bool = (== tmp%1#0 0x000100) + (assert tmp%2#0) + let array_length%0#0: uint64 = (extract_uint16 tmp%1#0 0u) + (assert array_length%0#0) // Index access is out of bounds + let updated_target%0#0: bytes = ((replace2 2) tmp%1#0 0x01) + let data_up_to_item%1#0: bytes = (extract3 tup#1 0u item_start_offset%1#0) + let tup#2: bytes = (concat data_up_to_item%1#0 updated_target%0#0) + let item_start_offset%3#0: uint64 = (extract_uint16 tup#2 1u) + let item_end_offset%3#0: uint64 = (len tup#2) + let tmp%4#0: bytes = (substring3 tup#2 item_start_offset%3#0 item_end_offset%3#0) + let tmp%6#0: bool = (!= tmp%4#0 tmp%1#0) + (assert tmp%6#0) + return program clear-state: subroutine test_cases.arc4_types.tuples.Arc4TuplesTypeContract.clear_state_program() -> bool: - block@0: // L51 + block@0: // L53 return 1u \ No newline at end of file diff --git a/test_cases/arc4_types/out/Arc4TuplesTypeContract.ssa.opt_pass_8.ir b/test_cases/arc4_types/out/Arc4TuplesTypeContract.ssa.opt_pass_8.ir index 26acacc3b0..fb8946c487 100644 --- a/test_cases/arc4_types/out/Arc4TuplesTypeContract.ssa.opt_pass_8.ir +++ b/test_cases/arc4_types/out/Arc4TuplesTypeContract.ssa.opt_pass_8.ir @@ -108,10 +108,11 @@ contract test_cases.arc4_types.tuples.Arc4TuplesTypeContract: (assert tmp%19#0) let tmp%20#0: bool = (== total#0 258u) (assert tmp%20#0) + test_cases.arc4_types.tuples.Arc4TuplesTypeContract.test_copy() return 1u subroutine test_cases.arc4_types.tuples.Arc4TuplesTypeContract.test_stuff(test_tuple: bytes) -> : - block@0: // L54 + block@0: // L56 let a#0: bytes = ((extract 0 1) test_tuple#0) // on error: Index access is out of bounds let b#0: bytes = ((extract 1 1) test_tuple#0) // on error: Index access is out of bounds let item_start_offset%0#0: uint64 = (extract_uint16 test_tuple#0 2u) @@ -134,8 +135,32 @@ contract test_cases.arc4_types.tuples.Arc4TuplesTypeContract: let length_uint16%0#0: bytes = ((extract 6 2) as_bytes%0#0) let encoded_value%0#0: bytes = (concat length_uint16%0#0 text#0) return total#0 encoded_value%0#0 + + subroutine test_cases.arc4_types.tuples.Arc4TuplesTypeContract.test_copy() -> void: + block@0: // L69 + let len_%0#0: uint64 = 1u + let as_bytes%2#0: bytes = (itob len_%0#0) + let len_16_bit%0#0: bytes = ((extract 6 2) as_bytes%2#0) + let concat_result%0#0: bytes = (concat len_16_bit%0#0 0x00) + let tup#1: bytes = (concat 0x000003 concat_result%0#0) + let item_start_offset%1#0: uint64 = (extract_uint16 tup#1 1u) + let item_end_offset%1#0: uint64 = (len tup#1) + let tmp%1#0: bytes = (substring3 tup#1 item_start_offset%1#0 item_end_offset%1#0) + let tmp%2#0: bool = (== tmp%1#0 0x000100) + (assert tmp%2#0) + let array_length%0#0: uint64 = (extract_uint16 tmp%1#0 0u) + (assert array_length%0#0) // Index access is out of bounds + let updated_target%0#0: bytes = ((replace2 2) tmp%1#0 0x01) + let data_up_to_item%1#0: bytes = (extract3 tup#1 0u item_start_offset%1#0) + let tup#2: bytes = (concat data_up_to_item%1#0 updated_target%0#0) + let item_start_offset%3#0: uint64 = (extract_uint16 tup#2 1u) + let item_end_offset%3#0: uint64 = (len tup#2) + let tmp%4#0: bytes = (substring3 tup#2 item_start_offset%3#0 item_end_offset%3#0) + let tmp%6#0: bool = (!= tmp%4#0 tmp%1#0) + (assert tmp%6#0) + return program clear-state: subroutine test_cases.arc4_types.tuples.Arc4TuplesTypeContract.clear_state_program() -> bool: - block@0: // L51 + block@0: // L53 return 1u \ No newline at end of file diff --git a/test_cases/arc4_types/out/Arc4TuplesTypeContract.ssa.opt_pass_9.ir b/test_cases/arc4_types/out/Arc4TuplesTypeContract.ssa.opt_pass_9.ir index 51e667831e..df6b0ed861 100644 --- a/test_cases/arc4_types/out/Arc4TuplesTypeContract.ssa.opt_pass_9.ir +++ b/test_cases/arc4_types/out/Arc4TuplesTypeContract.ssa.opt_pass_9.ir @@ -106,10 +106,11 @@ contract test_cases.arc4_types.tuples.Arc4TuplesTypeContract: (assert tmp%19#0) let tmp%20#0: bool = (== total#0 258u) (assert tmp%20#0) + test_cases.arc4_types.tuples.Arc4TuplesTypeContract.test_copy() return 1u subroutine test_cases.arc4_types.tuples.Arc4TuplesTypeContract.test_stuff(test_tuple: bytes) -> : - block@0: // L54 + block@0: // L56 let a#0: bytes = ((extract 0 1) test_tuple#0) // on error: Index access is out of bounds let b#0: bytes = ((extract 1 1) test_tuple#0) // on error: Index access is out of bounds let item_start_offset%0#0: uint64 = (extract_uint16 test_tuple#0 2u) @@ -132,8 +133,30 @@ contract test_cases.arc4_types.tuples.Arc4TuplesTypeContract: let length_uint16%0#0: bytes = ((extract 6 2) as_bytes%0#0) let encoded_value%0#0: bytes = (concat length_uint16%0#0 text#0) return total#0 encoded_value%0#0 + + subroutine test_cases.arc4_types.tuples.Arc4TuplesTypeContract.test_copy() -> void: + block@0: // L69 + let len_16_bit%0#0: bytes = 0x0001 + let concat_result%0#0: bytes = (concat len_16_bit%0#0 0x00) + let tup#1: bytes = (concat 0x000003 concat_result%0#0) + let item_start_offset%1#0: uint64 = (extract_uint16 tup#1 1u) + let item_end_offset%1#0: uint64 = (len tup#1) + let tmp%1#0: bytes = (substring3 tup#1 item_start_offset%1#0 item_end_offset%1#0) + let tmp%2#0: bool = (== tmp%1#0 0x000100) + (assert tmp%2#0) + let array_length%0#0: uint64 = (extract_uint16 tmp%1#0 0u) + (assert array_length%0#0) // Index access is out of bounds + let updated_target%0#0: bytes = ((replace2 2) tmp%1#0 0x01) + let data_up_to_item%1#0: bytes = (extract3 tup#1 0u item_start_offset%1#0) + let tup#2: bytes = (concat data_up_to_item%1#0 updated_target%0#0) + let item_start_offset%3#0: uint64 = (extract_uint16 tup#2 1u) + let item_end_offset%3#0: uint64 = (len tup#2) + let tmp%4#0: bytes = (substring3 tup#2 item_start_offset%3#0 item_end_offset%3#0) + let tmp%6#0: bool = (!= tmp%4#0 tmp%1#0) + (assert tmp%6#0) + return program clear-state: subroutine test_cases.arc4_types.tuples.Arc4TuplesTypeContract.clear_state_program() -> bool: - block@0: // L51 + block@0: // L53 return 1u \ No newline at end of file diff --git a/test_cases/arc4_types/out/module.awst b/test_cases/arc4_types/out/module.awst index cf598578a9..7343ce3ba9 100644 --- a/test_cases/arc4_types/out/module.awst +++ b/test_cases/arc4_types/out/module.awst @@ -19,6 +19,7 @@ contract Arc4TuplesTypeContract (total, concat): tuple> = this::test_stuff(my_tuple) assert(arc4_decode(concat, string) == 'hello world') assert(total == 258u) + this::test_copy() return true } @@ -37,6 +38,16 @@ contract Arc4TuplesTypeContract text: string = arc4_decode(c, string) + ' ' + arc4_decode(d, string) return (total, arc4_encode(text, arc4.dynamic_array)) } + + subroutine test_cases.arc4_types.tuples.Arc4TuplesTypeContract.test_copy(): void + { + tup: arc4.tuple> = arc4_encode((0_arc4u8, arc4_encode(hex<"">, arc4.dynamic_array)), arc4.tuple>) + tup[1].extend((0_arc4u8)) + assert(tup[1] == new arc4.dynamic_array(0_arc4u8)) + tup2: arc4.tuple> = tup.copy() + tup[1][0u]: arc4.uint8 = 1_arc4u8 + assert(tup[1] != tup2[1]) + } } contract Arc4StructsTypeContract diff --git a/test_cases/arc4_types/out/tuples.O0.log b/test_cases/arc4_types/out/tuples.O0.log index 2a740995a1..54955d1378 100644 --- a/test_cases/arc4_types/out/tuples.O0.log +++ b/test_cases/arc4_types/out/tuples.O0.log @@ -436,92 +436,92 @@ PC Teal Stack 627 assert 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10 628 dig 10 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x01020007000EFF000568656C6C6F0005776F726C64 630 callsub test_stuff 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x01020007000EFF000568656C6C6F0005776F726C64 -658 proto 1 2 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x01020007000EFF000568656C6C6F0005776F726C64 -661 frame_dig -1 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x01020007000EFF000568656C6C6F0005776F726C64, 0x01020007000EFF000568656C6C6F0005776F726C64 -663 intc_0 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x01020007000EFF000568656C6C6F0005776F726C64, 0x01020007000EFF000568656C6C6F0005776F726C64, 0 -664 intc_1 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x01020007000EFF000568656C6C6F0005776F726C64, 0x01020007000EFF000568656C6C6F0005776F726C64, 0, 1 -665 extract3 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x01020007000EFF000568656C6C6F0005776F726C64, 0x01 -666 frame_dig -1 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x01020007000EFF000568656C6C6F0005776F726C64, 0x01, 0x01020007000EFF000568656C6C6F0005776F726C64 -668 intc_1 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x01020007000EFF000568656C6C6F0005776F726C64, 0x01, 0x01020007000EFF000568656C6C6F0005776F726C64, 1 -669 dup 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x01020007000EFF000568656C6C6F0005776F726C64, 0x01, 0x01020007000EFF000568656C6C6F0005776F726C64, 1, 1 -670 extract3 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x01020007000EFF000568656C6C6F0005776F726C64, 0x01, 0x02 -671 frame_dig -1 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x01020007000EFF000568656C6C6F0005776F726C64, 0x01, 0x02, 0x01020007000EFF000568656C6C6F0005776F726C64 -673 pushint 2 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x01020007000EFF000568656C6C6F0005776F726C64, 0x01, 0x02, 0x01020007000EFF000568656C6C6F0005776F726C64, 2 -675 extract_uint16 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x01020007000EFF000568656C6C6F0005776F726C64, 0x01, 0x02, 7 -676 frame_dig -1 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x01020007000EFF000568656C6C6F0005776F726C64, 0x01, 0x02, 7, 0x01020007000EFF000568656C6C6F0005776F726C64 -678 pushint 4 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x01020007000EFF000568656C6C6F0005776F726C64, 0x01, 0x02, 7, 0x01020007000EFF000568656C6C6F0005776F726C64, 4 -680 extract_uint16 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x01020007000EFF000568656C6C6F0005776F726C64, 0x01, 0x02, 7, 14 -681 frame_dig -1 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x01020007000EFF000568656C6C6F0005776F726C64, 0x01, 0x02, 7, 14, 0x01020007000EFF000568656C6C6F0005776F726C64 -683 uncover 2 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x01020007000EFF000568656C6C6F0005776F726C64, 0x01, 0x02, 14, 0x01020007000EFF000568656C6C6F0005776F726C64, 7 -685 uncover 2 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x01020007000EFF000568656C6C6F0005776F726C64, 0x01, 0x02, 0x01020007000EFF000568656C6C6F0005776F726C64, 7, 14 -687 substring3 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x01020007000EFF000568656C6C6F0005776F726C64, 0x01, 0x02, 0x000568656C6C6F -688 frame_dig -1 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x01020007000EFF000568656C6C6F0005776F726C64, 0x01, 0x02, 0x000568656C6C6F, 0x01020007000EFF000568656C6C6F0005776F726C64 -690 pushint 4 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x01020007000EFF000568656C6C6F0005776F726C64, 0x01, 0x02, 0x000568656C6C6F, 0x01020007000EFF000568656C6C6F0005776F726C64, 4 -692 extract_uint16 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x01020007000EFF000568656C6C6F0005776F726C64, 0x01, 0x02, 0x000568656C6C6F, 14 -693 frame_dig -1 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x01020007000EFF000568656C6C6F0005776F726C64, 0x01, 0x02, 0x000568656C6C6F, 14, 0x01020007000EFF000568656C6C6F0005776F726C64 -695 len 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x01020007000EFF000568656C6C6F0005776F726C64, 0x01, 0x02, 0x000568656C6C6F, 14, 21 -696 frame_dig -1 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x01020007000EFF000568656C6C6F0005776F726C64, 0x01, 0x02, 0x000568656C6C6F, 14, 21, 0x01020007000EFF000568656C6C6F0005776F726C64 -698 uncover 2 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x01020007000EFF000568656C6C6F0005776F726C64, 0x01, 0x02, 0x000568656C6C6F, 21, 0x01020007000EFF000568656C6C6F0005776F726C64, 14 -700 uncover 2 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x01020007000EFF000568656C6C6F0005776F726C64, 0x01, 0x02, 0x000568656C6C6F, 0x01020007000EFF000568656C6C6F0005776F726C64, 14, 21 -702 substring3 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x01020007000EFF000568656C6C6F0005776F726C64, 0x01, 0x02, 0x000568656C6C6F, 0x0005776F726C64 -703 frame_dig -1 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x01020007000EFF000568656C6C6F0005776F726C64, 0x01, 0x02, 0x000568656C6C6F, 0x0005776F726C64, 0x01020007000EFF000568656C6C6F0005776F726C64 -705 pushint 6 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x01020007000EFF000568656C6C6F0005776F726C64, 0x01, 0x02, 0x000568656C6C6F, 0x0005776F726C64, 0x01020007000EFF000568656C6C6F0005776F726C64, 6 -707 intc_1 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x01020007000EFF000568656C6C6F0005776F726C64, 0x01, 0x02, 0x000568656C6C6F, 0x0005776F726C64, 0x01020007000EFF000568656C6C6F0005776F726C64, 6, 1 -708 extract3 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x01020007000EFF000568656C6C6F0005776F726C64, 0x01, 0x02, 0x000568656C6C6F, 0x0005776F726C64, 0xFF -709 uncover 4 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x01020007000EFF000568656C6C6F0005776F726C64, 0x02, 0x000568656C6C6F, 0x0005776F726C64, 0xFF, 0x01 -711 cover 2 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x01020007000EFF000568656C6C6F0005776F726C64, 0x02, 0x000568656C6C6F, 0x01, 0x0005776F726C64, 0xFF -713 uncover 3 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x01020007000EFF000568656C6C6F0005776F726C64, 0x02, 0x01, 0x0005776F726C64, 0xFF, 0x000568656C6C6F -715 cover 4 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x01020007000EFF000568656C6C6F0005776F726C64, 0x000568656C6C6F, 0x02, 0x01, 0x0005776F726C64, 0xFF -717 swap 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x01020007000EFF000568656C6C6F0005776F726C64, 0x000568656C6C6F, 0x02, 0x01, 0xFF, 0x0005776F726C64 -718 cover 2 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x01020007000EFF000568656C6C6F0005776F726C64, 0x000568656C6C6F, 0x02, 0x0005776F726C64, 0x01, 0xFF -720 swap 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x01020007000EFF000568656C6C6F0005776F726C64, 0x000568656C6C6F, 0x02, 0x0005776F726C64, 0xFF, 0x01 -721 frame_dig -1 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x01020007000EFF000568656C6C6F0005776F726C64, 0x000568656C6C6F, 0x02, 0x0005776F726C64, 0xFF, 0x01, 0x01020007000EFF000568656C6C6F0005776F726C64 -723 intc_0 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x01020007000EFF000568656C6C6F0005776F726C64, 0x000568656C6C6F, 0x02, 0x0005776F726C64, 0xFF, 0x01, 0x01020007000EFF000568656C6C6F0005776F726C64, 0 -724 intc_1 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x01020007000EFF000568656C6C6F0005776F726C64, 0x000568656C6C6F, 0x02, 0x0005776F726C64, 0xFF, 0x01, 0x01020007000EFF000568656C6C6F0005776F726C64, 0, 1 -725 extract3 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x01020007000EFF000568656C6C6F0005776F726C64, 0x000568656C6C6F, 0x02, 0x0005776F726C64, 0xFF, 0x01, 0x01 -726 dig 1 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x01020007000EFF000568656C6C6F0005776F726C64, 0x000568656C6C6F, 0x02, 0x0005776F726C64, 0xFF, 0x01, 0x01, 0x01 -728 b== 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x01020007000EFF000568656C6C6F0005776F726C64, 0x000568656C6C6F, 0x02, 0x0005776F726C64, 0xFF, 0x01, 1 -729 assert 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x01020007000EFF000568656C6C6F0005776F726C64, 0x000568656C6C6F, 0x02, 0x0005776F726C64, 0xFF, 0x01 -730 frame_dig -1 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x01020007000EFF000568656C6C6F0005776F726C64, 0x000568656C6C6F, 0x02, 0x0005776F726C64, 0xFF, 0x01, 0x01020007000EFF000568656C6C6F0005776F726C64 -732 pushint 6 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x01020007000EFF000568656C6C6F0005776F726C64, 0x000568656C6C6F, 0x02, 0x0005776F726C64, 0xFF, 0x01, 0x01020007000EFF000568656C6C6F0005776F726C64, 6 -734 intc_1 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x01020007000EFF000568656C6C6F0005776F726C64, 0x000568656C6C6F, 0x02, 0x0005776F726C64, 0xFF, 0x01, 0x01020007000EFF000568656C6C6F0005776F726C64, 6, 1 -735 extract3 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x01020007000EFF000568656C6C6F0005776F726C64, 0x000568656C6C6F, 0x02, 0x0005776F726C64, 0xFF, 0x01, 0xFF -736 dig 2 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x01020007000EFF000568656C6C6F0005776F726C64, 0x000568656C6C6F, 0x02, 0x0005776F726C64, 0xFF, 0x01, 0xFF, 0xFF -738 b== 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x01020007000EFF000568656C6C6F0005776F726C64, 0x000568656C6C6F, 0x02, 0x0005776F726C64, 0xFF, 0x01, 1 -739 assert 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x01020007000EFF000568656C6C6F0005776F726C64, 0x000568656C6C6F, 0x02, 0x0005776F726C64, 0xFF, 0x01 -740 frame_dig -1 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x01020007000EFF000568656C6C6F0005776F726C64, 0x000568656C6C6F, 0x02, 0x0005776F726C64, 0xFF, 0x01, 0x01020007000EFF000568656C6C6F0005776F726C64 -742 pushint 4 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x01020007000EFF000568656C6C6F0005776F726C64, 0x000568656C6C6F, 0x02, 0x0005776F726C64, 0xFF, 0x01, 0x01020007000EFF000568656C6C6F0005776F726C64, 4 -744 extract_uint16 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x01020007000EFF000568656C6C6F0005776F726C64, 0x000568656C6C6F, 0x02, 0x0005776F726C64, 0xFF, 0x01, 14 -745 frame_dig -1 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x01020007000EFF000568656C6C6F0005776F726C64, 0x000568656C6C6F, 0x02, 0x0005776F726C64, 0xFF, 0x01, 14, 0x01020007000EFF000568656C6C6F0005776F726C64 -747 len 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x01020007000EFF000568656C6C6F0005776F726C64, 0x000568656C6C6F, 0x02, 0x0005776F726C64, 0xFF, 0x01, 14, 21 -748 frame_dig -1 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x01020007000EFF000568656C6C6F0005776F726C64, 0x000568656C6C6F, 0x02, 0x0005776F726C64, 0xFF, 0x01, 14, 21, 0x01020007000EFF000568656C6C6F0005776F726C64 -750 uncover 2 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x01020007000EFF000568656C6C6F0005776F726C64, 0x000568656C6C6F, 0x02, 0x0005776F726C64, 0xFF, 0x01, 21, 0x01020007000EFF000568656C6C6F0005776F726C64, 14 -752 uncover 2 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x01020007000EFF000568656C6C6F0005776F726C64, 0x000568656C6C6F, 0x02, 0x0005776F726C64, 0xFF, 0x01, 0x01020007000EFF000568656C6C6F0005776F726C64, 14, 21 -754 substring3 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x01020007000EFF000568656C6C6F0005776F726C64, 0x000568656C6C6F, 0x02, 0x0005776F726C64, 0xFF, 0x01, 0x0005776F726C64 -755 dig 3 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x01020007000EFF000568656C6C6F0005776F726C64, 0x000568656C6C6F, 0x02, 0x0005776F726C64, 0xFF, 0x01, 0x0005776F726C64, 0x0005776F726C64 -757 == 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x01020007000EFF000568656C6C6F0005776F726C64, 0x000568656C6C6F, 0x02, 0x0005776F726C64, 0xFF, 0x01, 1 -758 assert 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x01020007000EFF000568656C6C6F0005776F726C64, 0x000568656C6C6F, 0x02, 0x0005776F726C64, 0xFF, 0x01 -759 btoi 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x01020007000EFF000568656C6C6F0005776F726C64, 0x000568656C6C6F, 0x02, 0x0005776F726C64, 0xFF, 1 -760 uncover 3 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x01020007000EFF000568656C6C6F0005776F726C64, 0x000568656C6C6F, 0x0005776F726C64, 0xFF, 1, 0x02 -762 btoi 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x01020007000EFF000568656C6C6F0005776F726C64, 0x000568656C6C6F, 0x0005776F726C64, 0xFF, 1, 2 -763 + 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x01020007000EFF000568656C6C6F0005776F726C64, 0x000568656C6C6F, 0x0005776F726C64, 0xFF, 3 -764 swap 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x01020007000EFF000568656C6C6F0005776F726C64, 0x000568656C6C6F, 0x0005776F726C64, 3, 0xFF -765 btoi 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x01020007000EFF000568656C6C6F0005776F726C64, 0x000568656C6C6F, 0x0005776F726C64, 3, 255 -766 + 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x01020007000EFF000568656C6C6F0005776F726C64, 0x000568656C6C6F, 0x0005776F726C64, 258 -767 uncover 2 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x01020007000EFF000568656C6C6F0005776F726C64, 0x0005776F726C64, 258, 0x000568656C6C6F -769 extract 2 0 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x01020007000EFF000568656C6C6F0005776F726C64, 0x0005776F726C64, 258, "hello" -772 pushbytes " " 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x01020007000EFF000568656C6C6F0005776F726C64, 0x0005776F726C64, 258, "hello", " " -775 concat 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x01020007000EFF000568656C6C6F0005776F726C64, 0x0005776F726C64, 258, "hello " -776 uncover 2 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x01020007000EFF000568656C6C6F0005776F726C64, 258, "hello ", 0x0005776F726C64 -778 extract 2 0 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x01020007000EFF000568656C6C6F0005776F726C64, 258, "hello ", "world" -781 concat 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x01020007000EFF000568656C6C6F0005776F726C64, 258, "hello world" -782 dup 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x01020007000EFF000568656C6C6F0005776F726C64, 258, "hello world", "hello world" -783 len 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x01020007000EFF000568656C6C6F0005776F726C64, 258, "hello world", 11 -784 itob 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x01020007000EFF000568656C6C6F0005776F726C64, 258, "hello world", 0x000000000000000B -785 extract 6 2 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x01020007000EFF000568656C6C6F0005776F726C64, 258, "hello world", 0x000B -788 swap 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x01020007000EFF000568656C6C6F0005776F726C64, 258, 0x000B, "hello world" -789 concat 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x01020007000EFF000568656C6C6F0005776F726C64, 258, 0x000B68656C6C6F20776F726C64 -790 retsub 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 258, 0x000B68656C6C6F20776F726C64 +661 proto 1 2 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x01020007000EFF000568656C6C6F0005776F726C64 +664 frame_dig -1 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x01020007000EFF000568656C6C6F0005776F726C64, 0x01020007000EFF000568656C6C6F0005776F726C64 +666 intc_0 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x01020007000EFF000568656C6C6F0005776F726C64, 0x01020007000EFF000568656C6C6F0005776F726C64, 0 +667 intc_1 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x01020007000EFF000568656C6C6F0005776F726C64, 0x01020007000EFF000568656C6C6F0005776F726C64, 0, 1 +668 extract3 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x01020007000EFF000568656C6C6F0005776F726C64, 0x01 +669 frame_dig -1 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x01020007000EFF000568656C6C6F0005776F726C64, 0x01, 0x01020007000EFF000568656C6C6F0005776F726C64 +671 intc_1 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x01020007000EFF000568656C6C6F0005776F726C64, 0x01, 0x01020007000EFF000568656C6C6F0005776F726C64, 1 +672 dup 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x01020007000EFF000568656C6C6F0005776F726C64, 0x01, 0x01020007000EFF000568656C6C6F0005776F726C64, 1, 1 +673 extract3 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x01020007000EFF000568656C6C6F0005776F726C64, 0x01, 0x02 +674 frame_dig -1 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x01020007000EFF000568656C6C6F0005776F726C64, 0x01, 0x02, 0x01020007000EFF000568656C6C6F0005776F726C64 +676 pushint 2 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x01020007000EFF000568656C6C6F0005776F726C64, 0x01, 0x02, 0x01020007000EFF000568656C6C6F0005776F726C64, 2 +678 extract_uint16 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x01020007000EFF000568656C6C6F0005776F726C64, 0x01, 0x02, 7 +679 frame_dig -1 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x01020007000EFF000568656C6C6F0005776F726C64, 0x01, 0x02, 7, 0x01020007000EFF000568656C6C6F0005776F726C64 +681 pushint 4 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x01020007000EFF000568656C6C6F0005776F726C64, 0x01, 0x02, 7, 0x01020007000EFF000568656C6C6F0005776F726C64, 4 +683 extract_uint16 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x01020007000EFF000568656C6C6F0005776F726C64, 0x01, 0x02, 7, 14 +684 frame_dig -1 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x01020007000EFF000568656C6C6F0005776F726C64, 0x01, 0x02, 7, 14, 0x01020007000EFF000568656C6C6F0005776F726C64 +686 uncover 2 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x01020007000EFF000568656C6C6F0005776F726C64, 0x01, 0x02, 14, 0x01020007000EFF000568656C6C6F0005776F726C64, 7 +688 uncover 2 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x01020007000EFF000568656C6C6F0005776F726C64, 0x01, 0x02, 0x01020007000EFF000568656C6C6F0005776F726C64, 7, 14 +690 substring3 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x01020007000EFF000568656C6C6F0005776F726C64, 0x01, 0x02, 0x000568656C6C6F +691 frame_dig -1 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x01020007000EFF000568656C6C6F0005776F726C64, 0x01, 0x02, 0x000568656C6C6F, 0x01020007000EFF000568656C6C6F0005776F726C64 +693 pushint 4 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x01020007000EFF000568656C6C6F0005776F726C64, 0x01, 0x02, 0x000568656C6C6F, 0x01020007000EFF000568656C6C6F0005776F726C64, 4 +695 extract_uint16 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x01020007000EFF000568656C6C6F0005776F726C64, 0x01, 0x02, 0x000568656C6C6F, 14 +696 frame_dig -1 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x01020007000EFF000568656C6C6F0005776F726C64, 0x01, 0x02, 0x000568656C6C6F, 14, 0x01020007000EFF000568656C6C6F0005776F726C64 +698 len 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x01020007000EFF000568656C6C6F0005776F726C64, 0x01, 0x02, 0x000568656C6C6F, 14, 21 +699 frame_dig -1 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x01020007000EFF000568656C6C6F0005776F726C64, 0x01, 0x02, 0x000568656C6C6F, 14, 21, 0x01020007000EFF000568656C6C6F0005776F726C64 +701 uncover 2 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x01020007000EFF000568656C6C6F0005776F726C64, 0x01, 0x02, 0x000568656C6C6F, 21, 0x01020007000EFF000568656C6C6F0005776F726C64, 14 +703 uncover 2 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x01020007000EFF000568656C6C6F0005776F726C64, 0x01, 0x02, 0x000568656C6C6F, 0x01020007000EFF000568656C6C6F0005776F726C64, 14, 21 +705 substring3 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x01020007000EFF000568656C6C6F0005776F726C64, 0x01, 0x02, 0x000568656C6C6F, 0x0005776F726C64 +706 frame_dig -1 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x01020007000EFF000568656C6C6F0005776F726C64, 0x01, 0x02, 0x000568656C6C6F, 0x0005776F726C64, 0x01020007000EFF000568656C6C6F0005776F726C64 +708 pushint 6 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x01020007000EFF000568656C6C6F0005776F726C64, 0x01, 0x02, 0x000568656C6C6F, 0x0005776F726C64, 0x01020007000EFF000568656C6C6F0005776F726C64, 6 +710 intc_1 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x01020007000EFF000568656C6C6F0005776F726C64, 0x01, 0x02, 0x000568656C6C6F, 0x0005776F726C64, 0x01020007000EFF000568656C6C6F0005776F726C64, 6, 1 +711 extract3 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x01020007000EFF000568656C6C6F0005776F726C64, 0x01, 0x02, 0x000568656C6C6F, 0x0005776F726C64, 0xFF +712 uncover 4 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x01020007000EFF000568656C6C6F0005776F726C64, 0x02, 0x000568656C6C6F, 0x0005776F726C64, 0xFF, 0x01 +714 cover 2 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x01020007000EFF000568656C6C6F0005776F726C64, 0x02, 0x000568656C6C6F, 0x01, 0x0005776F726C64, 0xFF +716 uncover 3 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x01020007000EFF000568656C6C6F0005776F726C64, 0x02, 0x01, 0x0005776F726C64, 0xFF, 0x000568656C6C6F +718 cover 4 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x01020007000EFF000568656C6C6F0005776F726C64, 0x000568656C6C6F, 0x02, 0x01, 0x0005776F726C64, 0xFF +720 swap 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x01020007000EFF000568656C6C6F0005776F726C64, 0x000568656C6C6F, 0x02, 0x01, 0xFF, 0x0005776F726C64 +721 cover 2 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x01020007000EFF000568656C6C6F0005776F726C64, 0x000568656C6C6F, 0x02, 0x0005776F726C64, 0x01, 0xFF +723 swap 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x01020007000EFF000568656C6C6F0005776F726C64, 0x000568656C6C6F, 0x02, 0x0005776F726C64, 0xFF, 0x01 +724 frame_dig -1 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x01020007000EFF000568656C6C6F0005776F726C64, 0x000568656C6C6F, 0x02, 0x0005776F726C64, 0xFF, 0x01, 0x01020007000EFF000568656C6C6F0005776F726C64 +726 intc_0 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x01020007000EFF000568656C6C6F0005776F726C64, 0x000568656C6C6F, 0x02, 0x0005776F726C64, 0xFF, 0x01, 0x01020007000EFF000568656C6C6F0005776F726C64, 0 +727 intc_1 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x01020007000EFF000568656C6C6F0005776F726C64, 0x000568656C6C6F, 0x02, 0x0005776F726C64, 0xFF, 0x01, 0x01020007000EFF000568656C6C6F0005776F726C64, 0, 1 +728 extract3 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x01020007000EFF000568656C6C6F0005776F726C64, 0x000568656C6C6F, 0x02, 0x0005776F726C64, 0xFF, 0x01, 0x01 +729 dig 1 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x01020007000EFF000568656C6C6F0005776F726C64, 0x000568656C6C6F, 0x02, 0x0005776F726C64, 0xFF, 0x01, 0x01, 0x01 +731 b== 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x01020007000EFF000568656C6C6F0005776F726C64, 0x000568656C6C6F, 0x02, 0x0005776F726C64, 0xFF, 0x01, 1 +732 assert 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x01020007000EFF000568656C6C6F0005776F726C64, 0x000568656C6C6F, 0x02, 0x0005776F726C64, 0xFF, 0x01 +733 frame_dig -1 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x01020007000EFF000568656C6C6F0005776F726C64, 0x000568656C6C6F, 0x02, 0x0005776F726C64, 0xFF, 0x01, 0x01020007000EFF000568656C6C6F0005776F726C64 +735 pushint 6 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x01020007000EFF000568656C6C6F0005776F726C64, 0x000568656C6C6F, 0x02, 0x0005776F726C64, 0xFF, 0x01, 0x01020007000EFF000568656C6C6F0005776F726C64, 6 +737 intc_1 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x01020007000EFF000568656C6C6F0005776F726C64, 0x000568656C6C6F, 0x02, 0x0005776F726C64, 0xFF, 0x01, 0x01020007000EFF000568656C6C6F0005776F726C64, 6, 1 +738 extract3 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x01020007000EFF000568656C6C6F0005776F726C64, 0x000568656C6C6F, 0x02, 0x0005776F726C64, 0xFF, 0x01, 0xFF +739 dig 2 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x01020007000EFF000568656C6C6F0005776F726C64, 0x000568656C6C6F, 0x02, 0x0005776F726C64, 0xFF, 0x01, 0xFF, 0xFF +741 b== 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x01020007000EFF000568656C6C6F0005776F726C64, 0x000568656C6C6F, 0x02, 0x0005776F726C64, 0xFF, 0x01, 1 +742 assert 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x01020007000EFF000568656C6C6F0005776F726C64, 0x000568656C6C6F, 0x02, 0x0005776F726C64, 0xFF, 0x01 +743 frame_dig -1 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x01020007000EFF000568656C6C6F0005776F726C64, 0x000568656C6C6F, 0x02, 0x0005776F726C64, 0xFF, 0x01, 0x01020007000EFF000568656C6C6F0005776F726C64 +745 pushint 4 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x01020007000EFF000568656C6C6F0005776F726C64, 0x000568656C6C6F, 0x02, 0x0005776F726C64, 0xFF, 0x01, 0x01020007000EFF000568656C6C6F0005776F726C64, 4 +747 extract_uint16 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x01020007000EFF000568656C6C6F0005776F726C64, 0x000568656C6C6F, 0x02, 0x0005776F726C64, 0xFF, 0x01, 14 +748 frame_dig -1 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x01020007000EFF000568656C6C6F0005776F726C64, 0x000568656C6C6F, 0x02, 0x0005776F726C64, 0xFF, 0x01, 14, 0x01020007000EFF000568656C6C6F0005776F726C64 +750 len 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x01020007000EFF000568656C6C6F0005776F726C64, 0x000568656C6C6F, 0x02, 0x0005776F726C64, 0xFF, 0x01, 14, 21 +751 frame_dig -1 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x01020007000EFF000568656C6C6F0005776F726C64, 0x000568656C6C6F, 0x02, 0x0005776F726C64, 0xFF, 0x01, 14, 21, 0x01020007000EFF000568656C6C6F0005776F726C64 +753 uncover 2 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x01020007000EFF000568656C6C6F0005776F726C64, 0x000568656C6C6F, 0x02, 0x0005776F726C64, 0xFF, 0x01, 21, 0x01020007000EFF000568656C6C6F0005776F726C64, 14 +755 uncover 2 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x01020007000EFF000568656C6C6F0005776F726C64, 0x000568656C6C6F, 0x02, 0x0005776F726C64, 0xFF, 0x01, 0x01020007000EFF000568656C6C6F0005776F726C64, 14, 21 +757 substring3 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x01020007000EFF000568656C6C6F0005776F726C64, 0x000568656C6C6F, 0x02, 0x0005776F726C64, 0xFF, 0x01, 0x0005776F726C64 +758 dig 3 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x01020007000EFF000568656C6C6F0005776F726C64, 0x000568656C6C6F, 0x02, 0x0005776F726C64, 0xFF, 0x01, 0x0005776F726C64, 0x0005776F726C64 +760 == 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x01020007000EFF000568656C6C6F0005776F726C64, 0x000568656C6C6F, 0x02, 0x0005776F726C64, 0xFF, 0x01, 1 +761 assert 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x01020007000EFF000568656C6C6F0005776F726C64, 0x000568656C6C6F, 0x02, 0x0005776F726C64, 0xFF, 0x01 +762 btoi 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x01020007000EFF000568656C6C6F0005776F726C64, 0x000568656C6C6F, 0x02, 0x0005776F726C64, 0xFF, 1 +763 uncover 3 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x01020007000EFF000568656C6C6F0005776F726C64, 0x000568656C6C6F, 0x0005776F726C64, 0xFF, 1, 0x02 +765 btoi 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x01020007000EFF000568656C6C6F0005776F726C64, 0x000568656C6C6F, 0x0005776F726C64, 0xFF, 1, 2 +766 + 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x01020007000EFF000568656C6C6F0005776F726C64, 0x000568656C6C6F, 0x0005776F726C64, 0xFF, 3 +767 swap 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x01020007000EFF000568656C6C6F0005776F726C64, 0x000568656C6C6F, 0x0005776F726C64, 3, 0xFF +768 btoi 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x01020007000EFF000568656C6C6F0005776F726C64, 0x000568656C6C6F, 0x0005776F726C64, 3, 255 +769 + 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x01020007000EFF000568656C6C6F0005776F726C64, 0x000568656C6C6F, 0x0005776F726C64, 258 +770 uncover 2 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x01020007000EFF000568656C6C6F0005776F726C64, 0x0005776F726C64, 258, 0x000568656C6C6F +772 extract 2 0 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x01020007000EFF000568656C6C6F0005776F726C64, 0x0005776F726C64, 258, "hello" +775 pushbytes " " 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x01020007000EFF000568656C6C6F0005776F726C64, 0x0005776F726C64, 258, "hello", " " +778 concat 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x01020007000EFF000568656C6C6F0005776F726C64, 0x0005776F726C64, 258, "hello " +779 uncover 2 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x01020007000EFF000568656C6C6F0005776F726C64, 258, "hello ", 0x0005776F726C64 +781 extract 2 0 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x01020007000EFF000568656C6C6F0005776F726C64, 258, "hello ", "world" +784 concat 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x01020007000EFF000568656C6C6F0005776F726C64, 258, "hello world" +785 dup 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x01020007000EFF000568656C6C6F0005776F726C64, 258, "hello world", "hello world" +786 len 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x01020007000EFF000568656C6C6F0005776F726C64, 258, "hello world", 11 +787 itob 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x01020007000EFF000568656C6C6F0005776F726C64, 258, "hello world", 0x000000000000000B +788 extract 6 2 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x01020007000EFF000568656C6C6F0005776F726C64, 258, "hello world", 0x000B +791 swap 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x01020007000EFF000568656C6C6F0005776F726C64, 258, 0x000B, "hello world" +792 concat 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x01020007000EFF000568656C6C6F0005776F726C64, 258, 0x000B68656C6C6F20776F726C64 +793 retsub 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 258, 0x000B68656C6C6F20776F726C64 633 extract 2 0 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 258, "hello world" 636 pushbytes "hello world" 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 258, "hello world", "hello world" 649 == 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 258, 1 @@ -529,5 +529,125 @@ PC Teal Stack 651 pushint 258 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 258, 258 654 == 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 1 655 assert 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10 -656 intc_1 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 1 -657 return 1 \ No newline at end of file +656 callsub test_copy 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10 +794 proto 0 0 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10 +797 bytec_1 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x +798 len 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0 +799 itob 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x0000000000000000 +800 extract 6 2 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x0000 +803 bytec_1 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x0000, 0x +804 concat 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x0000 +805 bytec_1 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x0000, 0x +806 bytec_0 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x0000, 0x, 0x00 +807 concat 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x0000, 0x00 +808 pushint 3 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x0000, 0x00, 3 +810 itob 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x0000, 0x00, 0x0000000000000003 +811 extract 6 2 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x0000, 0x00, 0x0003 +814 concat 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x0000, 0x000003 +815 swap 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x000003, 0x0000 +816 concat 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x0000030000 +817 dup 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x0000030000, 0x0000030000 +818 intc_1 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x0000030000, 0x0000030000, 1 +819 extract_uint16 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x0000030000, 3 +820 swap 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 3, 0x0000030000 +821 dup 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 3, 0x0000030000, 0x0000030000 +822 len 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 3, 0x0000030000, 5 +823 swap 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 3, 5, 0x0000030000 +824 dup 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 3, 5, 0x0000030000, 0x0000030000 +825 uncover 3 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 5, 0x0000030000, 0x0000030000, 3 +827 uncover 3 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x0000030000, 0x0000030000, 3, 5 +829 substring3 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x0000030000, 0x0000 +830 extract 2 0 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x0000030000, 0x +833 bytec_1 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x0000030000, 0x, 0x +834 bytec_0 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x0000030000, 0x, 0x, 0x00 +835 concat 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x0000030000, 0x, 0x00 +836 concat 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x0000030000, 0x00 +837 dup 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x0000030000, 0x00, 0x00 +838 len 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x0000030000, 0x00, 1 +839 itob 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x0000030000, 0x00, 0x0000000000000001 +840 extract 6 2 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x0000030000, 0x00, 0x0001 +843 swap 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x0000030000, 0x0001, 0x00 +844 concat 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x0000030000, 0x000100 +845 dig 1 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x0000030000, 0x000100, 0x0000030000 +847 intc_1 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x0000030000, 0x000100, 0x0000030000, 1 +848 extract_uint16 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x0000030000, 0x000100, 3 +849 uncover 2 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x000100, 3, 0x0000030000 +851 intc_0 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x000100, 3, 0x0000030000, 0 +852 uncover 2 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x000100, 0x0000030000, 0, 3 +854 extract3 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x000100, 0x000003 +855 swap 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x000003, 0x000100 +856 concat 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x000003000100 +857 dup 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x000003000100, 0x000003000100 +858 intc_1 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x000003000100, 0x000003000100, 1 +859 extract_uint16 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x000003000100, 3 +860 swap 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 3, 0x000003000100 +861 dup 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 3, 0x000003000100, 0x000003000100 +862 len 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 3, 0x000003000100, 6 +863 swap 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 3, 6, 0x000003000100 +864 dup 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 3, 6, 0x000003000100, 0x000003000100 +865 uncover 3 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 6, 0x000003000100, 0x000003000100, 3 +867 uncover 3 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x000003000100, 0x000003000100, 3, 6 +869 substring3 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x000003000100, 0x000100 +870 bytec_1 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x000003000100, 0x000100, 0x +871 bytec_0 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x000003000100, 0x000100, 0x, 0x00 +872 concat 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x000003000100, 0x000100, 0x00 +873 pushbytes 0x0001 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x000003000100, 0x000100, 0x00, 0x0001 +877 swap 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x000003000100, 0x000100, 0x0001, 0x00 +878 concat 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x000003000100, 0x000100, 0x000100 +879 == 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x000003000100, 1 +880 assert 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x000003000100 +881 dupn 2 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x000003000100, 0x000003000100, 0x000003000100 +883 intc_1 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x000003000100, 0x000003000100, 0x000003000100, 1 +884 extract_uint16 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x000003000100, 0x000003000100, 3 +885 swap 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x000003000100, 3, 0x000003000100 +886 dup 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x000003000100, 3, 0x000003000100, 0x000003000100 +887 len 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x000003000100, 3, 0x000003000100, 6 +888 swap 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x000003000100, 3, 6, 0x000003000100 +889 dup 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x000003000100, 3, 6, 0x000003000100, 0x000003000100 +890 uncover 3 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x000003000100, 6, 0x000003000100, 0x000003000100, 3 +892 uncover 3 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x000003000100, 0x000003000100, 0x000003000100, 3, 6 +894 substring3 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x000003000100, 0x000003000100, 0x000100 +895 dup 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x000003000100, 0x000003000100, 0x000100, 0x000100 +896 intc_0 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x000003000100, 0x000003000100, 0x000100, 0x000100, 0 +897 extract_uint16 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x000003000100, 0x000003000100, 0x000100, 1 +898 intc_0 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x000003000100, 0x000003000100, 0x000100, 1, 0 +899 > 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x000003000100, 0x000003000100, 0x000100, 1 +900 assert 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x000003000100, 0x000003000100, 0x000100 +901 pushint 2 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x000003000100, 0x000003000100, 0x000100, 2 +903 pushbytes 0x01 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x000003000100, 0x000003000100, 0x000100, 2, 0x01 +906 replace3 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x000003000100, 0x000003000100, 0x000101 +907 dig 1 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x000003000100, 0x000003000100, 0x000101, 0x000003000100 +909 intc_1 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x000003000100, 0x000003000100, 0x000101, 0x000003000100, 1 +910 extract_uint16 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x000003000100, 0x000003000100, 0x000101, 3 +911 uncover 2 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x000003000100, 0x000101, 3, 0x000003000100 +913 intc_0 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x000003000100, 0x000101, 3, 0x000003000100, 0 +914 uncover 2 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x000003000100, 0x000101, 0x000003000100, 0, 3 +916 extract3 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x000003000100, 0x000101, 0x000003 +917 swap 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x000003000100, 0x000003, 0x000101 +918 concat 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x000003000100, 0x000003000101 +919 dup 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x000003000100, 0x000003000101, 0x000003000101 +920 intc_1 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x000003000100, 0x000003000101, 0x000003000101, 1 +921 extract_uint16 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x000003000100, 0x000003000101, 3 +922 swap 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x000003000100, 3, 0x000003000101 +923 dup 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x000003000100, 3, 0x000003000101, 0x000003000101 +924 len 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x000003000100, 3, 0x000003000101, 6 +925 swap 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x000003000100, 3, 6, 0x000003000101 +926 uncover 2 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x000003000100, 6, 0x000003000101, 3 +928 uncover 2 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x000003000100, 0x000003000101, 3, 6 +930 substring3 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x000003000100, 0x000101 +931 dig 1 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x000003000100, 0x000101, 0x000003000100 +933 intc_1 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x000003000100, 0x000101, 0x000003000100, 1 +934 extract_uint16 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x000003000100, 0x000101, 3 +935 swap 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x000003000100, 3, 0x000101 +936 dig 2 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x000003000100, 3, 0x000101, 0x000003000100 +938 len 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x000003000100, 3, 0x000101, 6 +939 swap 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x000003000100, 3, 6, 0x000101 +940 uncover 3 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 3, 6, 0x000101, 0x000003000100 +942 uncover 3 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 6, 0x000101, 0x000003000100, 3 +944 uncover 3 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x000101, 0x000003000100, 3, 6 +946 substring3 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 0x000101, 0x000100 +947 != 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 1 +948 assert 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10 +949 retsub 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10 +659 intc_1 0x01020007000EFF000568656C6C6F0005776F726C64, 0x04BD8010, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x10, 1 +660 return 1 \ No newline at end of file diff --git a/test_cases/arc4_types/out/tuples.O1.log b/test_cases/arc4_types/out/tuples.O1.log index 1dcd41b336..f182ca54ee 100644 --- a/test_cases/arc4_types/out/tuples.O1.log +++ b/test_cases/arc4_types/out/tuples.O1.log @@ -1,57 +1,76 @@ PC Teal Stack -1 pushbytes 0x01020007000eff000568656c6c6f0005776f726c64 0x01020007000EFF000568656C6C6F0005776F726C64 -24 callsub test_stuff 0x01020007000EFF000568656C6C6F0005776F726C64 -53 proto 1 2 0x01020007000EFF000568656C6C6F0005776F726C64 -56 frame_dig -1 0x01020007000EFF000568656C6C6F0005776F726C64, 0x01020007000EFF000568656C6C6F0005776F726C64 -58 extract 0 1 0x01020007000EFF000568656C6C6F0005776F726C64, 0x01 -61 frame_dig -1 0x01020007000EFF000568656C6C6F0005776F726C64, 0x01, 0x01020007000EFF000568656C6C6F0005776F726C64 -63 extract 1 1 0x01020007000EFF000568656C6C6F0005776F726C64, 0x01, 0x02 -66 frame_dig -1 0x01020007000EFF000568656C6C6F0005776F726C64, 0x01, 0x02, 0x01020007000EFF000568656C6C6F0005776F726C64 -68 pushint 2 0x01020007000EFF000568656C6C6F0005776F726C64, 0x01, 0x02, 0x01020007000EFF000568656C6C6F0005776F726C64, 2 -70 extract_uint16 0x01020007000EFF000568656C6C6F0005776F726C64, 0x01, 0x02, 7 -71 frame_dig -1 0x01020007000EFF000568656C6C6F0005776F726C64, 0x01, 0x02, 7, 0x01020007000EFF000568656C6C6F0005776F726C64 -73 pushint 4 0x01020007000EFF000568656C6C6F0005776F726C64, 0x01, 0x02, 7, 0x01020007000EFF000568656C6C6F0005776F726C64, 4 -75 extract_uint16 0x01020007000EFF000568656C6C6F0005776F726C64, 0x01, 0x02, 7, 14 -76 frame_dig -1 0x01020007000EFF000568656C6C6F0005776F726C64, 0x01, 0x02, 7, 14, 0x01020007000EFF000568656C6C6F0005776F726C64 -78 uncover 2 0x01020007000EFF000568656C6C6F0005776F726C64, 0x01, 0x02, 14, 0x01020007000EFF000568656C6C6F0005776F726C64, 7 -80 dig 2 0x01020007000EFF000568656C6C6F0005776F726C64, 0x01, 0x02, 14, 0x01020007000EFF000568656C6C6F0005776F726C64, 7, 14 -82 substring3 0x01020007000EFF000568656C6C6F0005776F726C64, 0x01, 0x02, 14, 0x000568656C6C6F -83 frame_dig -1 0x01020007000EFF000568656C6C6F0005776F726C64, 0x01, 0x02, 14, 0x000568656C6C6F, 0x01020007000EFF000568656C6C6F0005776F726C64 -85 len 0x01020007000EFF000568656C6C6F0005776F726C64, 0x01, 0x02, 14, 0x000568656C6C6F, 21 -86 frame_dig -1 0x01020007000EFF000568656C6C6F0005776F726C64, 0x01, 0x02, 14, 0x000568656C6C6F, 21, 0x01020007000EFF000568656C6C6F0005776F726C64 -88 uncover 3 0x01020007000EFF000568656C6C6F0005776F726C64, 0x01, 0x02, 0x000568656C6C6F, 21, 0x01020007000EFF000568656C6C6F0005776F726C64, 14 -90 uncover 2 0x01020007000EFF000568656C6C6F0005776F726C64, 0x01, 0x02, 0x000568656C6C6F, 0x01020007000EFF000568656C6C6F0005776F726C64, 14, 21 -92 substring3 0x01020007000EFF000568656C6C6F0005776F726C64, 0x01, 0x02, 0x000568656C6C6F, 0x0005776F726C64 -93 frame_dig -1 0x01020007000EFF000568656C6C6F0005776F726C64, 0x01, 0x02, 0x000568656C6C6F, 0x0005776F726C64, 0x01020007000EFF000568656C6C6F0005776F726C64 -95 extract 6 1 0x01020007000EFF000568656C6C6F0005776F726C64, 0x01, 0x02, 0x000568656C6C6F, 0x0005776F726C64, 0xFF -98 uncover 4 0x01020007000EFF000568656C6C6F0005776F726C64, 0x02, 0x000568656C6C6F, 0x0005776F726C64, 0xFF, 0x01 -100 btoi 0x01020007000EFF000568656C6C6F0005776F726C64, 0x02, 0x000568656C6C6F, 0x0005776F726C64, 0xFF, 1 -101 uncover 4 0x01020007000EFF000568656C6C6F0005776F726C64, 0x000568656C6C6F, 0x0005776F726C64, 0xFF, 1, 0x02 -103 btoi 0x01020007000EFF000568656C6C6F0005776F726C64, 0x000568656C6C6F, 0x0005776F726C64, 0xFF, 1, 2 -104 + 0x01020007000EFF000568656C6C6F0005776F726C64, 0x000568656C6C6F, 0x0005776F726C64, 0xFF, 3 -105 swap 0x01020007000EFF000568656C6C6F0005776F726C64, 0x000568656C6C6F, 0x0005776F726C64, 3, 0xFF -106 btoi 0x01020007000EFF000568656C6C6F0005776F726C64, 0x000568656C6C6F, 0x0005776F726C64, 3, 255 -107 + 0x01020007000EFF000568656C6C6F0005776F726C64, 0x000568656C6C6F, 0x0005776F726C64, 258 -108 uncover 2 0x01020007000EFF000568656C6C6F0005776F726C64, 0x0005776F726C64, 258, 0x000568656C6C6F -110 extract 2 0 0x01020007000EFF000568656C6C6F0005776F726C64, 0x0005776F726C64, 258, "hello" -113 pushbytes " " 0x01020007000EFF000568656C6C6F0005776F726C64, 0x0005776F726C64, 258, "hello", " " -116 concat 0x01020007000EFF000568656C6C6F0005776F726C64, 0x0005776F726C64, 258, "hello " -117 uncover 2 0x01020007000EFF000568656C6C6F0005776F726C64, 258, "hello ", 0x0005776F726C64 -119 extract 2 0 0x01020007000EFF000568656C6C6F0005776F726C64, 258, "hello ", "world" -122 concat 0x01020007000EFF000568656C6C6F0005776F726C64, 258, "hello world" -123 dup 0x01020007000EFF000568656C6C6F0005776F726C64, 258, "hello world", "hello world" -124 len 0x01020007000EFF000568656C6C6F0005776F726C64, 258, "hello world", 11 -125 itob 0x01020007000EFF000568656C6C6F0005776F726C64, 258, "hello world", 0x000000000000000B -126 extract 6 2 0x01020007000EFF000568656C6C6F0005776F726C64, 258, "hello world", 0x000B -129 swap 0x01020007000EFF000568656C6C6F0005776F726C64, 258, 0x000B, "hello world" -130 concat 0x01020007000EFF000568656C6C6F0005776F726C64, 258, 0x000B68656C6C6F20776F726C64 -131 retsub 258, 0x000B68656C6C6F20776F726C64 -27 extract 2 0 258, "hello world" -30 pushbytes "hello world" 258, "hello world", "hello world" -43 == 258, 1 -44 assert 258 -45 pushint 258 258, 258 -48 == 1 -49 assert -50 pushint 1 1 -52 return 1 \ No newline at end of file +1 bytecblock 0x000100 +7 pushbytes 0x01020007000eff000568656c6c6f0005776f726c64 0x01020007000EFF000568656C6C6F0005776F726C64 +30 callsub test_stuff 0x01020007000EFF000568656C6C6F0005776F726C64 +62 proto 1 2 0x01020007000EFF000568656C6C6F0005776F726C64 +65 frame_dig -1 0x01020007000EFF000568656C6C6F0005776F726C64, 0x01020007000EFF000568656C6C6F0005776F726C64 +67 extract 0 1 0x01020007000EFF000568656C6C6F0005776F726C64, 0x01 +70 frame_dig -1 0x01020007000EFF000568656C6C6F0005776F726C64, 0x01, 0x01020007000EFF000568656C6C6F0005776F726C64 +72 extract 1 1 0x01020007000EFF000568656C6C6F0005776F726C64, 0x01, 0x02 +75 frame_dig -1 0x01020007000EFF000568656C6C6F0005776F726C64, 0x01, 0x02, 0x01020007000EFF000568656C6C6F0005776F726C64 +77 pushint 2 0x01020007000EFF000568656C6C6F0005776F726C64, 0x01, 0x02, 0x01020007000EFF000568656C6C6F0005776F726C64, 2 +79 extract_uint16 0x01020007000EFF000568656C6C6F0005776F726C64, 0x01, 0x02, 7 +80 frame_dig -1 0x01020007000EFF000568656C6C6F0005776F726C64, 0x01, 0x02, 7, 0x01020007000EFF000568656C6C6F0005776F726C64 +82 pushint 4 0x01020007000EFF000568656C6C6F0005776F726C64, 0x01, 0x02, 7, 0x01020007000EFF000568656C6C6F0005776F726C64, 4 +84 extract_uint16 0x01020007000EFF000568656C6C6F0005776F726C64, 0x01, 0x02, 7, 14 +85 frame_dig -1 0x01020007000EFF000568656C6C6F0005776F726C64, 0x01, 0x02, 7, 14, 0x01020007000EFF000568656C6C6F0005776F726C64 +87 uncover 2 0x01020007000EFF000568656C6C6F0005776F726C64, 0x01, 0x02, 14, 0x01020007000EFF000568656C6C6F0005776F726C64, 7 +89 dig 2 0x01020007000EFF000568656C6C6F0005776F726C64, 0x01, 0x02, 14, 0x01020007000EFF000568656C6C6F0005776F726C64, 7, 14 +91 substring3 0x01020007000EFF000568656C6C6F0005776F726C64, 0x01, 0x02, 14, 0x000568656C6C6F +92 frame_dig -1 0x01020007000EFF000568656C6C6F0005776F726C64, 0x01, 0x02, 14, 0x000568656C6C6F, 0x01020007000EFF000568656C6C6F0005776F726C64 +94 len 0x01020007000EFF000568656C6C6F0005776F726C64, 0x01, 0x02, 14, 0x000568656C6C6F, 21 +95 frame_dig -1 0x01020007000EFF000568656C6C6F0005776F726C64, 0x01, 0x02, 14, 0x000568656C6C6F, 21, 0x01020007000EFF000568656C6C6F0005776F726C64 +97 uncover 3 0x01020007000EFF000568656C6C6F0005776F726C64, 0x01, 0x02, 0x000568656C6C6F, 21, 0x01020007000EFF000568656C6C6F0005776F726C64, 14 +99 uncover 2 0x01020007000EFF000568656C6C6F0005776F726C64, 0x01, 0x02, 0x000568656C6C6F, 0x01020007000EFF000568656C6C6F0005776F726C64, 14, 21 +101 substring3 0x01020007000EFF000568656C6C6F0005776F726C64, 0x01, 0x02, 0x000568656C6C6F, 0x0005776F726C64 +102 frame_dig -1 0x01020007000EFF000568656C6C6F0005776F726C64, 0x01, 0x02, 0x000568656C6C6F, 0x0005776F726C64, 0x01020007000EFF000568656C6C6F0005776F726C64 +104 extract 6 1 0x01020007000EFF000568656C6C6F0005776F726C64, 0x01, 0x02, 0x000568656C6C6F, 0x0005776F726C64, 0xFF +107 uncover 4 0x01020007000EFF000568656C6C6F0005776F726C64, 0x02, 0x000568656C6C6F, 0x0005776F726C64, 0xFF, 0x01 +109 btoi 0x01020007000EFF000568656C6C6F0005776F726C64, 0x02, 0x000568656C6C6F, 0x0005776F726C64, 0xFF, 1 +110 uncover 4 0x01020007000EFF000568656C6C6F0005776F726C64, 0x000568656C6C6F, 0x0005776F726C64, 0xFF, 1, 0x02 +112 btoi 0x01020007000EFF000568656C6C6F0005776F726C64, 0x000568656C6C6F, 0x0005776F726C64, 0xFF, 1, 2 +113 + 0x01020007000EFF000568656C6C6F0005776F726C64, 0x000568656C6C6F, 0x0005776F726C64, 0xFF, 3 +114 swap 0x01020007000EFF000568656C6C6F0005776F726C64, 0x000568656C6C6F, 0x0005776F726C64, 3, 0xFF +115 btoi 0x01020007000EFF000568656C6C6F0005776F726C64, 0x000568656C6C6F, 0x0005776F726C64, 3, 255 +116 + 0x01020007000EFF000568656C6C6F0005776F726C64, 0x000568656C6C6F, 0x0005776F726C64, 258 +117 uncover 2 0x01020007000EFF000568656C6C6F0005776F726C64, 0x0005776F726C64, 258, 0x000568656C6C6F +119 extract 2 0 0x01020007000EFF000568656C6C6F0005776F726C64, 0x0005776F726C64, 258, "hello" +122 pushbytes " " 0x01020007000EFF000568656C6C6F0005776F726C64, 0x0005776F726C64, 258, "hello", " " +125 concat 0x01020007000EFF000568656C6C6F0005776F726C64, 0x0005776F726C64, 258, "hello " +126 uncover 2 0x01020007000EFF000568656C6C6F0005776F726C64, 258, "hello ", 0x0005776F726C64 +128 extract 2 0 0x01020007000EFF000568656C6C6F0005776F726C64, 258, "hello ", "world" +131 concat 0x01020007000EFF000568656C6C6F0005776F726C64, 258, "hello world" +132 dup 0x01020007000EFF000568656C6C6F0005776F726C64, 258, "hello world", "hello world" +133 len 0x01020007000EFF000568656C6C6F0005776F726C64, 258, "hello world", 11 +134 itob 0x01020007000EFF000568656C6C6F0005776F726C64, 258, "hello world", 0x000000000000000B +135 extract 6 2 0x01020007000EFF000568656C6C6F0005776F726C64, 258, "hello world", 0x000B +138 swap 0x01020007000EFF000568656C6C6F0005776F726C64, 258, 0x000B, "hello world" +139 concat 0x01020007000EFF000568656C6C6F0005776F726C64, 258, 0x000B68656C6C6F20776F726C64 +140 retsub 258, 0x000B68656C6C6F20776F726C64 +33 extract 2 0 258, "hello world" +36 pushbytes "hello world" 258, "hello world", "hello world" +49 == 258, 1 +50 assert 258 +51 pushint 258 258, 258 +54 == 1 +55 assert +56 callsub test_copy +141 proto 0 0 +144 bytec_0 0x000100 +145 pushbytes 0x01 0x000100, 0x01 +148 replace2 2 0x000101 +150 pushbytes 0x000003 0x000101, 0x000003 +155 swap 0x000003, 0x000101 +156 concat 0x000003000101 +157 dup 0x000003000101, 0x000003000101 +158 pushint 1 0x000003000101, 0x000003000101, 1 +160 extract_uint16 0x000003000101, 3 +161 dig 1 0x000003000101, 3, 0x000003000101 +163 len 0x000003000101, 3, 6 +164 substring3 0x000101 +165 bytec_0 0x000101, 0x000100 +166 != 1 +167 assert +168 retsub +59 pushint 1 1 +61 return 1 \ No newline at end of file diff --git a/test_cases/arc4_types/out/tuples.O2.log b/test_cases/arc4_types/out/tuples.O2.log index 1dcd41b336..f182ca54ee 100644 --- a/test_cases/arc4_types/out/tuples.O2.log +++ b/test_cases/arc4_types/out/tuples.O2.log @@ -1,57 +1,76 @@ PC Teal Stack -1 pushbytes 0x01020007000eff000568656c6c6f0005776f726c64 0x01020007000EFF000568656C6C6F0005776F726C64 -24 callsub test_stuff 0x01020007000EFF000568656C6C6F0005776F726C64 -53 proto 1 2 0x01020007000EFF000568656C6C6F0005776F726C64 -56 frame_dig -1 0x01020007000EFF000568656C6C6F0005776F726C64, 0x01020007000EFF000568656C6C6F0005776F726C64 -58 extract 0 1 0x01020007000EFF000568656C6C6F0005776F726C64, 0x01 -61 frame_dig -1 0x01020007000EFF000568656C6C6F0005776F726C64, 0x01, 0x01020007000EFF000568656C6C6F0005776F726C64 -63 extract 1 1 0x01020007000EFF000568656C6C6F0005776F726C64, 0x01, 0x02 -66 frame_dig -1 0x01020007000EFF000568656C6C6F0005776F726C64, 0x01, 0x02, 0x01020007000EFF000568656C6C6F0005776F726C64 -68 pushint 2 0x01020007000EFF000568656C6C6F0005776F726C64, 0x01, 0x02, 0x01020007000EFF000568656C6C6F0005776F726C64, 2 -70 extract_uint16 0x01020007000EFF000568656C6C6F0005776F726C64, 0x01, 0x02, 7 -71 frame_dig -1 0x01020007000EFF000568656C6C6F0005776F726C64, 0x01, 0x02, 7, 0x01020007000EFF000568656C6C6F0005776F726C64 -73 pushint 4 0x01020007000EFF000568656C6C6F0005776F726C64, 0x01, 0x02, 7, 0x01020007000EFF000568656C6C6F0005776F726C64, 4 -75 extract_uint16 0x01020007000EFF000568656C6C6F0005776F726C64, 0x01, 0x02, 7, 14 -76 frame_dig -1 0x01020007000EFF000568656C6C6F0005776F726C64, 0x01, 0x02, 7, 14, 0x01020007000EFF000568656C6C6F0005776F726C64 -78 uncover 2 0x01020007000EFF000568656C6C6F0005776F726C64, 0x01, 0x02, 14, 0x01020007000EFF000568656C6C6F0005776F726C64, 7 -80 dig 2 0x01020007000EFF000568656C6C6F0005776F726C64, 0x01, 0x02, 14, 0x01020007000EFF000568656C6C6F0005776F726C64, 7, 14 -82 substring3 0x01020007000EFF000568656C6C6F0005776F726C64, 0x01, 0x02, 14, 0x000568656C6C6F -83 frame_dig -1 0x01020007000EFF000568656C6C6F0005776F726C64, 0x01, 0x02, 14, 0x000568656C6C6F, 0x01020007000EFF000568656C6C6F0005776F726C64 -85 len 0x01020007000EFF000568656C6C6F0005776F726C64, 0x01, 0x02, 14, 0x000568656C6C6F, 21 -86 frame_dig -1 0x01020007000EFF000568656C6C6F0005776F726C64, 0x01, 0x02, 14, 0x000568656C6C6F, 21, 0x01020007000EFF000568656C6C6F0005776F726C64 -88 uncover 3 0x01020007000EFF000568656C6C6F0005776F726C64, 0x01, 0x02, 0x000568656C6C6F, 21, 0x01020007000EFF000568656C6C6F0005776F726C64, 14 -90 uncover 2 0x01020007000EFF000568656C6C6F0005776F726C64, 0x01, 0x02, 0x000568656C6C6F, 0x01020007000EFF000568656C6C6F0005776F726C64, 14, 21 -92 substring3 0x01020007000EFF000568656C6C6F0005776F726C64, 0x01, 0x02, 0x000568656C6C6F, 0x0005776F726C64 -93 frame_dig -1 0x01020007000EFF000568656C6C6F0005776F726C64, 0x01, 0x02, 0x000568656C6C6F, 0x0005776F726C64, 0x01020007000EFF000568656C6C6F0005776F726C64 -95 extract 6 1 0x01020007000EFF000568656C6C6F0005776F726C64, 0x01, 0x02, 0x000568656C6C6F, 0x0005776F726C64, 0xFF -98 uncover 4 0x01020007000EFF000568656C6C6F0005776F726C64, 0x02, 0x000568656C6C6F, 0x0005776F726C64, 0xFF, 0x01 -100 btoi 0x01020007000EFF000568656C6C6F0005776F726C64, 0x02, 0x000568656C6C6F, 0x0005776F726C64, 0xFF, 1 -101 uncover 4 0x01020007000EFF000568656C6C6F0005776F726C64, 0x000568656C6C6F, 0x0005776F726C64, 0xFF, 1, 0x02 -103 btoi 0x01020007000EFF000568656C6C6F0005776F726C64, 0x000568656C6C6F, 0x0005776F726C64, 0xFF, 1, 2 -104 + 0x01020007000EFF000568656C6C6F0005776F726C64, 0x000568656C6C6F, 0x0005776F726C64, 0xFF, 3 -105 swap 0x01020007000EFF000568656C6C6F0005776F726C64, 0x000568656C6C6F, 0x0005776F726C64, 3, 0xFF -106 btoi 0x01020007000EFF000568656C6C6F0005776F726C64, 0x000568656C6C6F, 0x0005776F726C64, 3, 255 -107 + 0x01020007000EFF000568656C6C6F0005776F726C64, 0x000568656C6C6F, 0x0005776F726C64, 258 -108 uncover 2 0x01020007000EFF000568656C6C6F0005776F726C64, 0x0005776F726C64, 258, 0x000568656C6C6F -110 extract 2 0 0x01020007000EFF000568656C6C6F0005776F726C64, 0x0005776F726C64, 258, "hello" -113 pushbytes " " 0x01020007000EFF000568656C6C6F0005776F726C64, 0x0005776F726C64, 258, "hello", " " -116 concat 0x01020007000EFF000568656C6C6F0005776F726C64, 0x0005776F726C64, 258, "hello " -117 uncover 2 0x01020007000EFF000568656C6C6F0005776F726C64, 258, "hello ", 0x0005776F726C64 -119 extract 2 0 0x01020007000EFF000568656C6C6F0005776F726C64, 258, "hello ", "world" -122 concat 0x01020007000EFF000568656C6C6F0005776F726C64, 258, "hello world" -123 dup 0x01020007000EFF000568656C6C6F0005776F726C64, 258, "hello world", "hello world" -124 len 0x01020007000EFF000568656C6C6F0005776F726C64, 258, "hello world", 11 -125 itob 0x01020007000EFF000568656C6C6F0005776F726C64, 258, "hello world", 0x000000000000000B -126 extract 6 2 0x01020007000EFF000568656C6C6F0005776F726C64, 258, "hello world", 0x000B -129 swap 0x01020007000EFF000568656C6C6F0005776F726C64, 258, 0x000B, "hello world" -130 concat 0x01020007000EFF000568656C6C6F0005776F726C64, 258, 0x000B68656C6C6F20776F726C64 -131 retsub 258, 0x000B68656C6C6F20776F726C64 -27 extract 2 0 258, "hello world" -30 pushbytes "hello world" 258, "hello world", "hello world" -43 == 258, 1 -44 assert 258 -45 pushint 258 258, 258 -48 == 1 -49 assert -50 pushint 1 1 -52 return 1 \ No newline at end of file +1 bytecblock 0x000100 +7 pushbytes 0x01020007000eff000568656c6c6f0005776f726c64 0x01020007000EFF000568656C6C6F0005776F726C64 +30 callsub test_stuff 0x01020007000EFF000568656C6C6F0005776F726C64 +62 proto 1 2 0x01020007000EFF000568656C6C6F0005776F726C64 +65 frame_dig -1 0x01020007000EFF000568656C6C6F0005776F726C64, 0x01020007000EFF000568656C6C6F0005776F726C64 +67 extract 0 1 0x01020007000EFF000568656C6C6F0005776F726C64, 0x01 +70 frame_dig -1 0x01020007000EFF000568656C6C6F0005776F726C64, 0x01, 0x01020007000EFF000568656C6C6F0005776F726C64 +72 extract 1 1 0x01020007000EFF000568656C6C6F0005776F726C64, 0x01, 0x02 +75 frame_dig -1 0x01020007000EFF000568656C6C6F0005776F726C64, 0x01, 0x02, 0x01020007000EFF000568656C6C6F0005776F726C64 +77 pushint 2 0x01020007000EFF000568656C6C6F0005776F726C64, 0x01, 0x02, 0x01020007000EFF000568656C6C6F0005776F726C64, 2 +79 extract_uint16 0x01020007000EFF000568656C6C6F0005776F726C64, 0x01, 0x02, 7 +80 frame_dig -1 0x01020007000EFF000568656C6C6F0005776F726C64, 0x01, 0x02, 7, 0x01020007000EFF000568656C6C6F0005776F726C64 +82 pushint 4 0x01020007000EFF000568656C6C6F0005776F726C64, 0x01, 0x02, 7, 0x01020007000EFF000568656C6C6F0005776F726C64, 4 +84 extract_uint16 0x01020007000EFF000568656C6C6F0005776F726C64, 0x01, 0x02, 7, 14 +85 frame_dig -1 0x01020007000EFF000568656C6C6F0005776F726C64, 0x01, 0x02, 7, 14, 0x01020007000EFF000568656C6C6F0005776F726C64 +87 uncover 2 0x01020007000EFF000568656C6C6F0005776F726C64, 0x01, 0x02, 14, 0x01020007000EFF000568656C6C6F0005776F726C64, 7 +89 dig 2 0x01020007000EFF000568656C6C6F0005776F726C64, 0x01, 0x02, 14, 0x01020007000EFF000568656C6C6F0005776F726C64, 7, 14 +91 substring3 0x01020007000EFF000568656C6C6F0005776F726C64, 0x01, 0x02, 14, 0x000568656C6C6F +92 frame_dig -1 0x01020007000EFF000568656C6C6F0005776F726C64, 0x01, 0x02, 14, 0x000568656C6C6F, 0x01020007000EFF000568656C6C6F0005776F726C64 +94 len 0x01020007000EFF000568656C6C6F0005776F726C64, 0x01, 0x02, 14, 0x000568656C6C6F, 21 +95 frame_dig -1 0x01020007000EFF000568656C6C6F0005776F726C64, 0x01, 0x02, 14, 0x000568656C6C6F, 21, 0x01020007000EFF000568656C6C6F0005776F726C64 +97 uncover 3 0x01020007000EFF000568656C6C6F0005776F726C64, 0x01, 0x02, 0x000568656C6C6F, 21, 0x01020007000EFF000568656C6C6F0005776F726C64, 14 +99 uncover 2 0x01020007000EFF000568656C6C6F0005776F726C64, 0x01, 0x02, 0x000568656C6C6F, 0x01020007000EFF000568656C6C6F0005776F726C64, 14, 21 +101 substring3 0x01020007000EFF000568656C6C6F0005776F726C64, 0x01, 0x02, 0x000568656C6C6F, 0x0005776F726C64 +102 frame_dig -1 0x01020007000EFF000568656C6C6F0005776F726C64, 0x01, 0x02, 0x000568656C6C6F, 0x0005776F726C64, 0x01020007000EFF000568656C6C6F0005776F726C64 +104 extract 6 1 0x01020007000EFF000568656C6C6F0005776F726C64, 0x01, 0x02, 0x000568656C6C6F, 0x0005776F726C64, 0xFF +107 uncover 4 0x01020007000EFF000568656C6C6F0005776F726C64, 0x02, 0x000568656C6C6F, 0x0005776F726C64, 0xFF, 0x01 +109 btoi 0x01020007000EFF000568656C6C6F0005776F726C64, 0x02, 0x000568656C6C6F, 0x0005776F726C64, 0xFF, 1 +110 uncover 4 0x01020007000EFF000568656C6C6F0005776F726C64, 0x000568656C6C6F, 0x0005776F726C64, 0xFF, 1, 0x02 +112 btoi 0x01020007000EFF000568656C6C6F0005776F726C64, 0x000568656C6C6F, 0x0005776F726C64, 0xFF, 1, 2 +113 + 0x01020007000EFF000568656C6C6F0005776F726C64, 0x000568656C6C6F, 0x0005776F726C64, 0xFF, 3 +114 swap 0x01020007000EFF000568656C6C6F0005776F726C64, 0x000568656C6C6F, 0x0005776F726C64, 3, 0xFF +115 btoi 0x01020007000EFF000568656C6C6F0005776F726C64, 0x000568656C6C6F, 0x0005776F726C64, 3, 255 +116 + 0x01020007000EFF000568656C6C6F0005776F726C64, 0x000568656C6C6F, 0x0005776F726C64, 258 +117 uncover 2 0x01020007000EFF000568656C6C6F0005776F726C64, 0x0005776F726C64, 258, 0x000568656C6C6F +119 extract 2 0 0x01020007000EFF000568656C6C6F0005776F726C64, 0x0005776F726C64, 258, "hello" +122 pushbytes " " 0x01020007000EFF000568656C6C6F0005776F726C64, 0x0005776F726C64, 258, "hello", " " +125 concat 0x01020007000EFF000568656C6C6F0005776F726C64, 0x0005776F726C64, 258, "hello " +126 uncover 2 0x01020007000EFF000568656C6C6F0005776F726C64, 258, "hello ", 0x0005776F726C64 +128 extract 2 0 0x01020007000EFF000568656C6C6F0005776F726C64, 258, "hello ", "world" +131 concat 0x01020007000EFF000568656C6C6F0005776F726C64, 258, "hello world" +132 dup 0x01020007000EFF000568656C6C6F0005776F726C64, 258, "hello world", "hello world" +133 len 0x01020007000EFF000568656C6C6F0005776F726C64, 258, "hello world", 11 +134 itob 0x01020007000EFF000568656C6C6F0005776F726C64, 258, "hello world", 0x000000000000000B +135 extract 6 2 0x01020007000EFF000568656C6C6F0005776F726C64, 258, "hello world", 0x000B +138 swap 0x01020007000EFF000568656C6C6F0005776F726C64, 258, 0x000B, "hello world" +139 concat 0x01020007000EFF000568656C6C6F0005776F726C64, 258, 0x000B68656C6C6F20776F726C64 +140 retsub 258, 0x000B68656C6C6F20776F726C64 +33 extract 2 0 258, "hello world" +36 pushbytes "hello world" 258, "hello world", "hello world" +49 == 258, 1 +50 assert 258 +51 pushint 258 258, 258 +54 == 1 +55 assert +56 callsub test_copy +141 proto 0 0 +144 bytec_0 0x000100 +145 pushbytes 0x01 0x000100, 0x01 +148 replace2 2 0x000101 +150 pushbytes 0x000003 0x000101, 0x000003 +155 swap 0x000003, 0x000101 +156 concat 0x000003000101 +157 dup 0x000003000101, 0x000003000101 +158 pushint 1 0x000003000101, 0x000003000101, 1 +160 extract_uint16 0x000003000101, 3 +161 dig 1 0x000003000101, 3, 0x000003000101 +163 len 0x000003000101, 3, 6 +164 substring3 0x000101 +165 bytec_0 0x000101, 0x000100 +166 != 1 +167 assert +168 retsub +59 pushint 1 1 +61 return 1 \ No newline at end of file diff --git a/test_cases/arc4_types/out_O2/Arc4TuplesTypeContract.approval.teal b/test_cases/arc4_types/out_O2/Arc4TuplesTypeContract.approval.teal index 2212fb11a5..e4e343a315 100644 --- a/test_cases/arc4_types/out_O2/Arc4TuplesTypeContract.approval.teal +++ b/test_cases/arc4_types/out_O2/Arc4TuplesTypeContract.approval.teal @@ -1,6 +1,7 @@ #pragma version 10 test_cases.arc4_types.tuples.Arc4TuplesTypeContract.approval_program: + bytecblock 0x000100 pushbytes 0x01020007000eff000568656c6c6f0005776f726c64 callsub test_stuff extract 2 0 @@ -10,6 +11,7 @@ test_cases.arc4_types.tuples.Arc4TuplesTypeContract.approval_program: pushint 258 // 258 == assert + callsub test_copy pushint 1 // 1 return @@ -61,3 +63,24 @@ test_stuff: swap concat retsub + + +// test_cases.arc4_types.tuples.Arc4TuplesTypeContract.test_copy() -> void: +test_copy: + proto 0 0 + bytec_0 // 0x000100 + pushbytes 0x01 + replace2 2 + pushbytes 0x000003 + swap + concat + dup + pushint 1 // 1 + extract_uint16 + dig 1 + len + substring3 + bytec_0 // 0x000100 + != + assert + retsub diff --git a/test_cases/arc4_types/out_O2/Arc4TuplesTypeContract.destructured.ir b/test_cases/arc4_types/out_O2/Arc4TuplesTypeContract.destructured.ir index fef8f00d02..72898b4c87 100644 --- a/test_cases/arc4_types/out_O2/Arc4TuplesTypeContract.destructured.ir +++ b/test_cases/arc4_types/out_O2/Arc4TuplesTypeContract.destructured.ir @@ -8,10 +8,11 @@ contract test_cases.arc4_types.tuples.Arc4TuplesTypeContract: (assert tmp%19#0) let tmp%20#0: bool = (== total#0 258u) (assert tmp%20#0) + test_cases.arc4_types.tuples.Arc4TuplesTypeContract.test_copy() return 1u subroutine test_cases.arc4_types.tuples.Arc4TuplesTypeContract.test_stuff(test_tuple: bytes) -> : - block@0: // L54 + block@0: // L56 let a#0: bytes = ((extract 0 1) test_tuple#0) // on error: Index access is out of bounds let b#0: bytes = ((extract 1 1) test_tuple#0) // on error: Index access is out of bounds let item_start_offset%0#0: uint64 = (extract_uint16 test_tuple#0 2u) @@ -34,8 +35,19 @@ contract test_cases.arc4_types.tuples.Arc4TuplesTypeContract: let length_uint16%0#0: bytes = ((extract 6 2) as_bytes%0#0) let encoded_value%0#0: bytes = (concat length_uint16%0#0 text#0) return total#0 encoded_value%0#0 + + subroutine test_cases.arc4_types.tuples.Arc4TuplesTypeContract.test_copy() -> void: + block@0: // L69 + let updated_target%0#0: bytes = ((replace2 2) 0x000100 0x01) + let tup#2: bytes = (concat 0x000003 updated_target%0#0) + let item_start_offset%3#0: uint64 = (extract_uint16 tup#2 1u) + let item_end_offset%3#0: uint64 = (len tup#2) + let tmp%4#0: bytes = (substring3 tup#2 item_start_offset%3#0 item_end_offset%3#0) + let tmp%6#0: bool = (!= tmp%4#0 0x000100) + (assert tmp%6#0) + return program clear-state: subroutine test_cases.arc4_types.tuples.Arc4TuplesTypeContract.clear_state_program() -> bool: - block@0: // L51 + block@0: // L53 return 1u \ No newline at end of file diff --git a/test_cases/arc4_types/out_unoptimized/Arc4TuplesTypeContract.approval.teal b/test_cases/arc4_types/out_unoptimized/Arc4TuplesTypeContract.approval.teal index 056fa06e28..00be061272 100644 --- a/test_cases/arc4_types/out_unoptimized/Arc4TuplesTypeContract.approval.teal +++ b/test_cases/arc4_types/out_unoptimized/Arc4TuplesTypeContract.approval.teal @@ -563,6 +563,9 @@ main_bool_merge@13: == assert // arc4_types/tuples.py:49 + // self.test_copy() + callsub test_copy + // arc4_types/tuples.py:51 // return True intc_1 // 1 return @@ -570,11 +573,11 @@ main_bool_merge@13: // test_cases.arc4_types.tuples.Arc4TuplesTypeContract.test_stuff(test_tuple: bytes) -> uint64, bytes: test_stuff: - // arc4_types/tuples.py:54-55 + // arc4_types/tuples.py:56-57 // @subroutine // def test_stuff(self, test_tuple: TestTuple) -> tuple[UInt64, String]: proto 1 2 - // arc4_types/tuples.py:56 + // arc4_types/tuples.py:58 // a, b, c, d, e = test_tuple.native frame_dig -1 intc_0 // 0 @@ -614,7 +617,7 @@ test_stuff: swap cover 2 swap - // arc4_types/tuples.py:58 + // arc4_types/tuples.py:60 // assert test_tuple[-0] == a frame_dig -1 intc_0 // 0 @@ -623,7 +626,7 @@ test_stuff: dig 1 b== assert - // arc4_types/tuples.py:59 + // arc4_types/tuples.py:61 // assert test_tuple[-1] == e frame_dig -1 pushint 6 // 6 @@ -632,7 +635,7 @@ test_stuff: dig 2 b== assert - // arc4_types/tuples.py:60 + // arc4_types/tuples.py:62 // assert test_tuple[-2] == d frame_dig -1 pushint 4 // 4 @@ -646,7 +649,7 @@ test_stuff: dig 3 == assert - // arc4_types/tuples.py:62 + // arc4_types/tuples.py:64 // total = a.native + b.native + e.native btoi uncover 3 @@ -655,7 +658,7 @@ test_stuff: swap btoi + - // arc4_types/tuples.py:63 + // arc4_types/tuples.py:65 // text = c.native + " " + d.native uncover 2 extract 2 0 @@ -664,7 +667,7 @@ test_stuff: uncover 2 extract 2 0 concat - // arc4_types/tuples.py:65 + // arc4_types/tuples.py:67 // return total, String(text) dup len @@ -673,3 +676,141 @@ test_stuff: swap concat retsub + + +// test_cases.arc4_types.tuples.Arc4TuplesTypeContract.test_copy() -> void: +test_copy: + // arc4_types/tuples.py:69-70 + // @subroutine + // def test_copy(self) -> None: + proto 0 0 + // arc4_types/tuples.py:71 + // tup = Tuple((UInt8(), DynamicBytes())) + bytec_1 // 0x + len + itob + extract 6 2 + bytec_1 // 0x + concat + bytec_1 // 0x + bytec_0 // 0x00 + concat + pushint 3 // 3 + itob + extract 6 2 + concat + swap + concat + // arc4_types/tuples.py:72 + // tup[1].append(Byte()) + dup + intc_1 // 1 + extract_uint16 + swap + dup + len + swap + dup + uncover 3 + uncover 3 + substring3 + extract 2 0 + bytec_1 // 0x + bytec_0 // 0x00 + concat + concat + dup + len + itob + extract 6 2 + swap + concat + dig 1 + intc_1 // 1 + extract_uint16 + uncover 2 + intc_0 // 0 + uncover 2 + extract3 + swap + concat + // arc4_types/tuples.py:74 + // assert tup[1] == DynamicBytes(0) + dup + intc_1 // 1 + extract_uint16 + swap + dup + len + swap + dup + uncover 3 + uncover 3 + substring3 + bytec_1 // 0x + bytec_0 // 0x00 + concat + pushbytes 0x0001 + swap + concat + == + assert + // arc4_types/tuples.py:76 + // tup2 = tup.copy() + dupn 2 + // arc4_types/tuples.py:77 + // tup[1][0] = Byte(1) + intc_1 // 1 + extract_uint16 + swap + dup + len + swap + dup + uncover 3 + uncover 3 + substring3 + dup + intc_0 // 0 + extract_uint16 + intc_0 // 0 + > + assert // Index access is out of bounds + pushint 2 // 2 + pushbytes 0x01 + replace3 + dig 1 + intc_1 // 1 + extract_uint16 + uncover 2 + intc_0 // 0 + uncover 2 + extract3 + swap + concat + // arc4_types/tuples.py:79 + // assert tup[1] != tup2[1] + dup + intc_1 // 1 + extract_uint16 + swap + dup + len + swap + uncover 2 + uncover 2 + substring3 + dig 1 + intc_1 // 1 + extract_uint16 + swap + dig 2 + len + swap + uncover 3 + uncover 3 + uncover 3 + substring3 + != + assert + retsub diff --git a/test_cases/arc4_types/out_unoptimized/Arc4TuplesTypeContract.clear.teal b/test_cases/arc4_types/out_unoptimized/Arc4TuplesTypeContract.clear.teal index ea52beb6e0..1a5dffc0f4 100644 --- a/test_cases/arc4_types/out_unoptimized/Arc4TuplesTypeContract.clear.teal +++ b/test_cases/arc4_types/out_unoptimized/Arc4TuplesTypeContract.clear.teal @@ -1,7 +1,7 @@ #pragma version 10 test_cases.arc4_types.tuples.Arc4TuplesTypeContract.clear_state_program: - // arc4_types/tuples.py:52 + // arc4_types/tuples.py:54 // return True pushint 1 // 1 return diff --git a/test_cases/arc4_types/out_unoptimized/Arc4TuplesTypeContract.destructured.ir b/test_cases/arc4_types/out_unoptimized/Arc4TuplesTypeContract.destructured.ir index 1f348154a0..17ee8a4f36 100644 --- a/test_cases/arc4_types/out_unoptimized/Arc4TuplesTypeContract.destructured.ir +++ b/test_cases/arc4_types/out_unoptimized/Arc4TuplesTypeContract.destructured.ir @@ -205,10 +205,11 @@ contract test_cases.arc4_types.tuples.Arc4TuplesTypeContract: (assert tmp%19#0) let tmp%20#0: bool = (== total#0 258u) (assert tmp%20#0) + test_cases.arc4_types.tuples.Arc4TuplesTypeContract.test_copy() return 1u subroutine test_cases.arc4_types.tuples.Arc4TuplesTypeContract.test_stuff(test_tuple: bytes) -> : - block@0: // L54 + block@0: // L56 let item0%0#0: bytes = (extract3 test_tuple#0 0u 1u) // on error: Index access is out of bounds let item1%0#0: bytes = (extract3 test_tuple#0 1u 1u) // on error: Index access is out of bounds let item_start_offset%0#0: uint64 = (extract_uint16 test_tuple#0 2u) @@ -250,8 +251,66 @@ contract test_cases.arc4_types.tuples.Arc4TuplesTypeContract: let length_uint16%0#0: bytes = ((extract 6 2) as_bytes%0#0) let encoded_value%0#0: bytes = (concat length_uint16%0#0 text#0) return total#0 encoded_value%0#0 + + subroutine test_cases.arc4_types.tuples.Arc4TuplesTypeContract.test_copy() -> void: + block@0: // L69 + let length%0#0: uint64 = (len 0x) + let as_bytes%0#0: bytes = (itob length%0#0) + let length_uint16%0#0: bytes = ((extract 6 2) as_bytes%0#0) + let encoded_value%0#0: bytes = (concat length_uint16%0#0 0x) + let encoded_tuple_buffer%1#0: bytes = (concat 0x 0x00) + let as_bytes%1#0: bytes = (itob 3u) + let offset_as_uint16%0#0: bytes = ((extract 6 2) as_bytes%1#0) + let encoded_tuple_buffer%2#0: bytes = (concat encoded_tuple_buffer%1#0 offset_as_uint16%0#0) + let encoded_tuple_buffer%3#0: bytes = (concat encoded_tuple_buffer%2#0 encoded_value%0#0) + let tup#0: bytes = encoded_tuple_buffer%3#0 + let item_start_offset%0#0: uint64 = (extract_uint16 tup#0 1u) + let item_end_offset%0#0: uint64 = (len tup#0) + let tmp%0#0: bytes = (substring3 tup#0 item_start_offset%0#0 item_end_offset%0#0) + let expr_value_trimmed%0#0: bytes = ((extract 2 0) tmp%0#0) + let data%0#0: bytes = (concat 0x 0x00) + let concatenated%0#0: bytes = (concat expr_value_trimmed%0#0 data%0#0) + let len_%0#0: uint64 = (len concatenated%0#0) + let as_bytes%2#0: bytes = (itob len_%0#0) + let len_16_bit%0#0: bytes = ((extract 6 2) as_bytes%2#0) + let concat_result%0#0: bytes = (concat len_16_bit%0#0 concatenated%0#0) + let assigned_value%0#0: bytes = concat_result%0#0 + let item_offset%0#0: uint64 = (extract_uint16 tup#0 1u) + let data_up_to_item%0#0: bytes = (extract3 tup#0 0u item_offset%0#0) + let updated_data%0#0: bytes = (concat data_up_to_item%0#0 assigned_value%0#0) + let tup#0: bytes = updated_data%0#0 + let item_start_offset%1#0: uint64 = (extract_uint16 tup#0 1u) + let item_end_offset%1#0: uint64 = (len tup#0) + let tmp%1#0: bytes = (substring3 tup#0 item_start_offset%1#0 item_end_offset%1#0) + let result%0#0: bytes = (concat 0x 0x00) + let array_data%0#0: bytes = (concat 0x0001 result%0#0) + let tmp%2#0: bool = (== tmp%1#0 array_data%0#0) + (assert tmp%2#0) + let copy%0#0: bytes = tup#0 + let tup2#0: bytes = copy%0#0 + let item_start_offset%2#0: uint64 = (extract_uint16 tup#0 1u) + let item_end_offset%2#0: uint64 = (len tup#0) + let tmp%3#0: bytes = (substring3 tup#0 item_start_offset%2#0 item_end_offset%2#0) + let array_length%0#0: uint64 = (extract_uint16 tmp%3#0 0u) + let index_is_in_bounds%0#0: bool = (< 0u array_length%0#0) + (assert index_is_in_bounds%0#0) // Index access is out of bounds + let updated_target%0#0: bytes = (replace3 tmp%3#0 2u 0x01) + let assigned_value%2#0: bytes = updated_target%0#0 + let item_offset%1#0: uint64 = (extract_uint16 tup#0 1u) + let data_up_to_item%1#0: bytes = (extract3 tup#0 0u item_offset%1#0) + let updated_data%1#0: bytes = (concat data_up_to_item%1#0 assigned_value%2#0) + let tup#0: bytes = updated_data%1#0 + let item_start_offset%3#0: uint64 = (extract_uint16 tup#0 1u) + let item_end_offset%3#0: uint64 = (len tup#0) + let tmp%4#0: bytes = (substring3 tup#0 item_start_offset%3#0 item_end_offset%3#0) + let item_start_offset%4#0: uint64 = (extract_uint16 tup2#0 1u) + let item_end_offset%4#0: uint64 = (len tup2#0) + let tmp%5#0: bytes = (substring3 tup2#0 item_start_offset%4#0 item_end_offset%4#0) + let tmp%6#0: bool = (!= tmp%4#0 tmp%5#0) + (assert tmp%6#0) + return program clear-state: subroutine test_cases.arc4_types.tuples.Arc4TuplesTypeContract.clear_state_program() -> bool: - block@0: // L51 + block@0: // L53 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 870b42f462..38e9362492 100644 --- a/test_cases/arc4_types/puya.log +++ b/test_cases/arc4_types/puya.log @@ -363,8 +363,10 @@ debug: Sealing block@2: // bare_routing_L13 debug: Terminated block@2: // bare_routing_L13 debug: Sealing block@3: // after_if_else_L13 debug: Terminated block@3: // after_if_else_L13 -debug: Sealing block@0: // L54 -debug: Terminated block@0: // L54 +debug: Sealing block@0: // L56 +debug: Terminated block@0: // L56 +debug: Sealing block@0: // L69 +debug: Terminated block@0: // L69 debug: Sealing block@0: // L14 debug: Terminated block@0: // L14 debug: Sealing block@1: // and_contd_L39 @@ -520,8 +522,8 @@ debug: Replacing trivial Phi node: let my_tuple#1: bytes = φ(my_tuple#0 <- bloc debug: Deleting Phi assignment: let my_tuple#1: bytes = φ(my_tuple#0 <- block@11, my_tuple#0 <- block@12) debug: Replaced trivial Phi node: let my_tuple#1: bytes = φ(my_tuple#0 <- block@11, my_tuple#0 <- block@12) (my_tuple#1) with my_tuple#0 in current definition for 1 blocks debug: Terminated block@13: // bool_merge_L40 -debug: Sealing block@0: // L51 -debug: Terminated block@0: // L51 +debug: Sealing block@0: // L53 +debug: Terminated block@0: // L53 debug: Sealing block@0: // L34 debug: Terminated block@0: // L34 debug: Sealing block@1: // abi_routing_L34 @@ -2083,11 +2085,11 @@ debug: Optimizer: Remove Linear Jump debug: Optimizer: Remove Empty Blocks debug: Optimizer: Remove Unreachable Blocks debug: Optimizer: Repeated Expression Elimination -debug: Replacing redundant declaration let item_start_offset%1#0: uint64 = (extract_uint16 test_tuple#0 4u) with copy of existing registers (Register(source_location=arc4_types/tuples.py:56:24-41, ir_type=uint64, name='item_end_offset%0', version=0),) -debug: Replacing redundant declaration let reinterpret_biguint%0#0: biguint = ((extract 0 1) test_tuple#0) // on error: Index access is out of bounds with copy of existing registers (Register(source_location=arc4_types/tuples.py:56:8-9, ir_type=bytes, name='a', version=0),) -debug: Replacing redundant declaration let reinterpret_biguint%2#0: biguint = ((extract 6 1) test_tuple#0) // on error: Index access is out of bounds with copy of existing registers (Register(source_location=arc4_types/tuples.py:56:20-21, ir_type=bytes, name='e', version=0),) -debug: Replacing redundant declaration let item_start_offset%2#0: uint64 = (extract_uint16 test_tuple#0 4u) with copy of existing registers (Register(source_location=arc4_types/tuples.py:56:24-41, ir_type=uint64, name='item_end_offset%0', version=0),) -debug: Replacing redundant declaration let item_end_offset%2#0: uint64 = (len test_tuple#0) with copy of existing registers (Register(source_location=arc4_types/tuples.py:56:24-41, ir_type=uint64, name='item_end_offset%1', version=0),) +debug: Replacing redundant declaration let item_start_offset%1#0: uint64 = (extract_uint16 test_tuple#0 4u) with copy of existing registers (Register(source_location=arc4_types/tuples.py:58:24-41, ir_type=uint64, name='item_end_offset%0', version=0),) +debug: Replacing redundant declaration let reinterpret_biguint%0#0: biguint = ((extract 0 1) test_tuple#0) // on error: Index access is out of bounds with copy of existing registers (Register(source_location=arc4_types/tuples.py:58:8-9, ir_type=bytes, name='a', version=0),) +debug: Replacing redundant declaration let reinterpret_biguint%2#0: biguint = ((extract 6 1) test_tuple#0) // on error: Index access is out of bounds with copy of existing registers (Register(source_location=arc4_types/tuples.py:58:20-21, ir_type=bytes, name='e', version=0),) +debug: Replacing redundant declaration let item_start_offset%2#0: uint64 = (extract_uint16 test_tuple#0 4u) with copy of existing registers (Register(source_location=arc4_types/tuples.py:58:24-41, ir_type=uint64, name='item_end_offset%0', version=0),) +debug: Replacing redundant declaration let item_end_offset%2#0: uint64 = (len test_tuple#0) with copy of existing registers (Register(source_location=arc4_types/tuples.py:58:24-41, ir_type=uint64, name='item_end_offset%1', version=0),) debug: Found equivalence set: item_end_offset%0#0, item_start_offset%1#0, item_start_offset%2#0 debug: Replacing {item_start_offset%1#0, item_start_offset%2#0} with item_end_offset%0#0 made 2 modifications debug: Found equivalence set: a#0, reinterpret_biguint%0#0 @@ -2096,10 +2098,65 @@ debug: Found equivalence set: e#0, reinterpret_biguint%2#0 debug: Replacing {reinterpret_biguint%2#0} with e#0 made 1 modifications debug: Found equivalence set: item_end_offset%1#0, item_end_offset%2#0 debug: Replacing {item_end_offset%2#0} with item_end_offset%1#0 made 1 modifications -debug: Replacing redundant declaration let tmp%2#0: bytes = (substring3 test_tuple#0 item_end_offset%0#0 item_end_offset%1#0) with copy of existing registers (Register(source_location=arc4_types/tuples.py:56:17-18, ir_type=bytes, name='d', version=0),) +debug: Replacing redundant declaration let tmp%2#0: bytes = (substring3 test_tuple#0 item_end_offset%0#0 item_end_offset%1#0) with copy of existing registers (Register(source_location=arc4_types/tuples.py:58:17-18, ir_type=bytes, name='d', version=0),) debug: Found equivalence set: d#0, tmp%2#0 debug: Replacing {tmp%2#0} with d#0 made 1 modifications debug: Optimizer: Remove Calls To No Op Subroutines +debug: Optimizing subroutine test_cases.arc4_types.tuples.Arc4TuplesTypeContract.test_copy +debug: Splitting parallel copies prior to optimization +debug: Optimizer: Constant Replacer +debug: Optimizer: Copy Propagation +debug: Found equivalence set: encoded_tuple_buffer%3#0, tup#0 +debug: Replacing {encoded_tuple_buffer%3#0} with tup#0 made 1 modifications +debug: Found equivalence set: concat_result%0#0, assigned_value%0#0 +debug: Replacing {assigned_value%0#0} with concat_result%0#0 made 1 modifications +debug: Found equivalence set: updated_data%0#0, tup#1, copy%0#0, tup2#0 +debug: Replacing {updated_data%0#0, copy%0#0, tup2#0} with tup#1 made 4 modifications +debug: Found equivalence set: updated_target%0#0, assigned_value%2#0 +debug: Replacing {assigned_value%2#0} with updated_target%0#0 made 1 modifications +debug: Found equivalence set: updated_data%1#0, tup#2 +debug: Replacing {updated_data%1#0} with tup#2 made 1 modifications +debug: Optimizer: Intrinsic Simplifier +debug: Simplified (len 0x) to 0u +debug: Simplified (concat length_uint16%0#0 0x) to length_uint16%0#0 +debug: Simplified (concat 0x 0x00) to 0x00 +debug: Simplified ((extract 6 2) as_bytes%1#0) to 0x0003 +debug: Simplified (concat 0x 0x00) to 0x00 +debug: Simplified (concat 0x 0x00) to 0x00 +debug: Simplified (replace3 tmp%3#0 2u 0x01) to ((replace2 2) tmp%3#0 0x01) +debug: Optimizer: Remove Unused Variables +debug: Removing unused variable current_tail_offset%0#0 +debug: Removing unused variable encoded_tuple_buffer%0#0 +debug: Removing unused variable as_bytes%1#0 +debug: Removing unused variable current_tail_offset%1#0 +debug: Removing unused variable assigned_value%1#0 +debug: Removing unused variable index_is_in_bounds%0#0 +debug: Optimizer: Inner Txn Field Replacer +debug: Optimizer: Replace Compiled References +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: Replacing redundant declaration let item_offset%0#0: uint64 = (extract_uint16 tup#0 1u) with copy of existing registers (Register(source_location=arc4_types/tuples.py:72:8-14, ir_type=uint64, name='item_start_offset%0', version=0),) +debug: Replacing redundant declaration let item_start_offset%2#0: uint64 = (extract_uint16 tup#1 1u) with copy of existing registers (Register(source_location=arc4_types/tuples.py:74:15-21, ir_type=uint64, name='item_start_offset%1', version=0),) +debug: Replacing redundant declaration let item_end_offset%2#0: uint64 = (len tup#1) with copy of existing registers (Register(source_location=arc4_types/tuples.py:74:15-21, ir_type=uint64, name='item_end_offset%1', version=0),) +debug: Replacing redundant declaration let item_offset%1#0: uint64 = (extract_uint16 tup#1 1u) with copy of existing registers (Register(source_location=arc4_types/tuples.py:74:15-21, ir_type=uint64, name='item_start_offset%1', version=0),) +debug: Replacing redundant declaration let item_start_offset%4#0: uint64 = (extract_uint16 tup#1 1u) with copy of existing registers (Register(source_location=arc4_types/tuples.py:74:15-21, ir_type=uint64, name='item_start_offset%1', version=0),) +debug: Replacing redundant declaration let item_end_offset%4#0: uint64 = (len tup#1) with copy of existing registers (Register(source_location=arc4_types/tuples.py:74:15-21, ir_type=uint64, name='item_end_offset%1', version=0),) +debug: Found equivalence set: length_uint16%0#0, encoded_value%0#0 +debug: Replacing {encoded_value%0#0} with length_uint16%0#0 made 2 modifications +debug: Found equivalence set: item_start_offset%0#0, item_offset%0#0 +debug: Replacing {item_offset%0#0} with item_start_offset%0#0 made 1 modifications +debug: Found equivalence set: item_start_offset%1#0, item_start_offset%2#0, item_offset%1#0, item_start_offset%4#0 +debug: Replacing {item_start_offset%2#0, item_offset%1#0, item_start_offset%4#0} with item_start_offset%1#0 made 3 modifications +debug: Found equivalence set: item_end_offset%1#0, item_end_offset%2#0, item_end_offset%4#0 +debug: Replacing {item_end_offset%2#0, item_end_offset%4#0} with item_end_offset%1#0 made 2 modifications +debug: Replacing redundant declaration let tmp%3#0: bytes = (substring3 tup#1 item_start_offset%1#0 item_end_offset%1#0) with copy of existing registers (Register(source_location=arc4_types/tuples.py:74:15-21, ir_type=bytes, name='tmp%1', version=0),) +debug: Replacing redundant declaration let tmp%5#0: bytes = (substring3 tup#1 item_start_offset%1#0 item_end_offset%1#0) with copy of existing registers (Register(source_location=arc4_types/tuples.py:74:15-21, ir_type=bytes, name='tmp%1', version=0),) +debug: Found equivalence set: tmp%1#0, tmp%3#0, tmp%5#0 +debug: Replacing {tmp%3#0, tmp%5#0} with tmp%1#0 made 3 modifications +debug: Optimizer: Remove Calls To No Op Subroutines debug: Optimizing subroutine test_cases.arc4_types.tuples.Arc4TuplesTypeContract.clear_state_program debug: Splitting parallel copies prior to optimization debug: Optimizer: Constant Replacer @@ -2174,6 +2231,29 @@ debug: Optimizer: Remove Empty Blocks debug: Optimizer: Remove Unreachable Blocks debug: Optimizer: Repeated Expression Elimination debug: Optimizer: Remove Calls To No Op Subroutines +debug: Optimizing subroutine test_cases.arc4_types.tuples.Arc4TuplesTypeContract.test_copy +debug: Optimizer: Constant Replacer +debug: Optimizer: Copy Propagation +debug: Optimizer: Intrinsic Simplifier +debug: Simplified ((extract 6 2) as_bytes%0#0) to 0x0000 +debug: Simplified (concat 0x00 0x0003) to 0x000003 +debug: Simplified (concat 0x0001 0x00) to 0x000100 +debug: Optimizer: Remove Unused Variables +debug: Removing unused variable length%0#0 +debug: Removing unused variable as_bytes%0#0 +debug: Removing unused variable encoded_tuple_buffer%1#0 +debug: Removing unused variable offset_as_uint16%0#0 +debug: Removing unused variable data_length%0#0 +debug: Removing unused variable data%0#0 +debug: Removing unused variable result%0#0 +debug: Optimizer: Inner Txn Field Replacer +debug: Optimizer: Replace Compiled References +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: Optimizer: Remove Calls To No Op Subroutines debug: Optimizing subroutine test_cases.arc4_types.tuples.Arc4TuplesTypeContract.clear_state_program debug: Optimizer: Constant Replacer debug: Optimizer: Copy Propagation @@ -2234,6 +2314,23 @@ debug: Optimizer: Remove Empty Blocks debug: Optimizer: Remove Unreachable Blocks debug: Optimizer: Repeated Expression Elimination debug: Optimizer: Remove Calls To No Op Subroutines +debug: Optimizing subroutine test_cases.arc4_types.tuples.Arc4TuplesTypeContract.test_copy +debug: Optimizer: Constant Replacer +debug: Optimizer: Copy Propagation +debug: Optimizer: Intrinsic Simplifier +debug: Simplified (concat 0x000003 0x0000) to 0x0000030000 +debug: Optimizer: Remove Unused Variables +debug: Removing unused variable length_uint16%0#0 +debug: Removing unused variable encoded_tuple_buffer%2#0 +debug: Removing unused variable array_data%0#0 +debug: Optimizer: Inner Txn Field Replacer +debug: Optimizer: Replace Compiled References +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: Optimizer: Remove Calls To No Op Subroutines debug: Optimizing subroutine test_cases.arc4_types.tuples.Arc4TuplesTypeContract.clear_state_program debug: Optimizer: Constant Replacer debug: Optimizer: Copy Propagation @@ -2281,6 +2378,22 @@ debug: Optimizer: Remove Empty Blocks debug: Optimizer: Remove Unreachable Blocks debug: Optimizer: Repeated Expression Elimination debug: Optimizer: Remove Calls To No Op Subroutines +debug: Optimizing subroutine test_cases.arc4_types.tuples.Arc4TuplesTypeContract.test_copy +debug: Optimizer: Constant Replacer +debug: Optimizer: Copy Propagation +debug: Optimizer: Intrinsic Simplifier +debug: Simplified (extract_uint16 0x0000030000 1u) to 3u +debug: Simplified (len 0x0000030000) to 5u +debug: Optimizer: Remove Unused Variables +debug: Removing unused variable tup#0 +debug: Optimizer: Inner Txn Field Replacer +debug: Optimizer: Replace Compiled References +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: Optimizer: Remove Calls To No Op Subroutines debug: Optimizing subroutine test_cases.arc4_types.tuples.Arc4TuplesTypeContract.clear_state_program debug: Optimizer: Constant Replacer debug: Optimizer: Copy Propagation @@ -2326,6 +2439,23 @@ debug: Optimizer: Remove Empty Blocks debug: Optimizer: Remove Unreachable Blocks debug: Optimizer: Repeated Expression Elimination debug: Optimizer: Remove Calls To No Op Subroutines +debug: Optimizing subroutine test_cases.arc4_types.tuples.Arc4TuplesTypeContract.test_copy +debug: Optimizer: Constant Replacer +debug: Optimizer: Copy Propagation +debug: Optimizer: Intrinsic Simplifier +debug: Simplified (substring3 0x0000030000 3u 5u) to 0x0000 +debug: Simplified (extract3 0x0000030000 0u 3u) to 0x000003 +debug: Optimizer: Remove Unused Variables +debug: Removing unused variable item_start_offset%0#0 +debug: Removing unused variable item_end_offset%0#0 +debug: Optimizer: Inner Txn Field Replacer +debug: Optimizer: Replace Compiled References +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: Optimizer: Remove Calls To No Op Subroutines debug: Optimizing subroutine test_cases.arc4_types.tuples.Arc4TuplesTypeContract.clear_state_program debug: Optimizer: Constant Replacer debug: Optimizer: Copy Propagation @@ -2372,6 +2502,22 @@ debug: Optimizer: Remove Empty Blocks debug: Optimizer: Remove Unreachable Blocks debug: Optimizer: Repeated Expression Elimination debug: Optimizer: Remove Calls To No Op Subroutines +debug: Optimizing subroutine test_cases.arc4_types.tuples.Arc4TuplesTypeContract.test_copy +debug: Optimizer: Constant Replacer +debug: Optimizer: Copy Propagation +debug: Optimizer: Intrinsic Simplifier +debug: Simplified ((extract 2 0) 0x0000) to 0x +debug: Optimizer: Remove Unused Variables +debug: Removing unused variable tmp%0#0 +debug: Removing unused variable data_up_to_item%0#0 +debug: Optimizer: Inner Txn Field Replacer +debug: Optimizer: Replace Compiled References +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: Optimizer: Remove Calls To No Op Subroutines debug: Optimizing subroutine test_cases.arc4_types.tuples.Arc4TuplesTypeContract.clear_state_program debug: Optimizer: Constant Replacer debug: Optimizer: Copy Propagation @@ -2417,6 +2563,21 @@ debug: Optimizer: Remove Empty Blocks debug: Optimizer: Remove Unreachable Blocks debug: Optimizer: Repeated Expression Elimination debug: Optimizer: Remove Calls To No Op Subroutines +debug: Optimizing subroutine test_cases.arc4_types.tuples.Arc4TuplesTypeContract.test_copy +debug: Optimizer: Constant Replacer +debug: Optimizer: Copy Propagation +debug: Optimizer: Intrinsic Simplifier +debug: Simplified (concat 0x 0x00) to 0x00 +debug: Optimizer: Remove Unused Variables +debug: Removing unused variable expr_value_trimmed%0#0 +debug: Optimizer: Inner Txn Field Replacer +debug: Optimizer: Replace Compiled References +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: Optimizer: Remove Calls To No Op Subroutines debug: Optimizing subroutine test_cases.arc4_types.tuples.Arc4TuplesTypeContract.clear_state_program debug: Optimizer: Constant Replacer debug: Optimizer: Copy Propagation @@ -2462,6 +2623,21 @@ debug: Optimizer: Remove Empty Blocks debug: Optimizer: Remove Unreachable Blocks debug: Optimizer: Repeated Expression Elimination debug: Optimizer: Remove Calls To No Op Subroutines +debug: Optimizing subroutine test_cases.arc4_types.tuples.Arc4TuplesTypeContract.test_copy +debug: Optimizer: Constant Replacer +debug: Optimizer: Copy Propagation +debug: Optimizer: Intrinsic Simplifier +debug: Simplified (len 0x00) to 1u +debug: Optimizer: Remove Unused Variables +debug: Removing unused variable concatenated%0#0 +debug: Optimizer: Inner Txn Field Replacer +debug: Optimizer: Replace Compiled References +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: Optimizer: Remove Calls To No Op Subroutines debug: Optimizing subroutine test_cases.arc4_types.tuples.Arc4TuplesTypeContract.clear_state_program debug: Optimizer: Constant Replacer debug: Optimizer: Copy Propagation @@ -2507,6 +2683,22 @@ debug: Optimizer: Remove Empty Blocks debug: Optimizer: Remove Unreachable Blocks debug: Optimizer: Repeated Expression Elimination debug: Optimizer: Remove Calls To No Op Subroutines +debug: Optimizing subroutine test_cases.arc4_types.tuples.Arc4TuplesTypeContract.test_copy +debug: Optimizer: Constant Replacer +debug: Optimizer: Copy Propagation +debug: Optimizer: Intrinsic Simplifier +debug: Simplified ((extract 6 2) as_bytes%2#0) to 0x0001 +debug: Optimizer: Remove Unused Variables +debug: Removing unused variable len_%0#0 +debug: Removing unused variable as_bytes%2#0 +debug: Optimizer: Inner Txn Field Replacer +debug: Optimizer: Replace Compiled References +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: Optimizer: Remove Calls To No Op Subroutines debug: Optimizing subroutine test_cases.arc4_types.tuples.Arc4TuplesTypeContract.clear_state_program debug: Optimizer: Constant Replacer debug: Optimizer: Copy Propagation @@ -2552,6 +2744,21 @@ debug: Optimizer: Remove Empty Blocks debug: Optimizer: Remove Unreachable Blocks debug: Optimizer: Repeated Expression Elimination debug: Optimizer: Remove Calls To No Op Subroutines +debug: Optimizing subroutine test_cases.arc4_types.tuples.Arc4TuplesTypeContract.test_copy +debug: Optimizer: Constant Replacer +debug: Optimizer: Copy Propagation +debug: Optimizer: Intrinsic Simplifier +debug: Simplified (concat 0x0001 0x00) to 0x000100 +debug: Optimizer: Remove Unused Variables +debug: Removing unused variable len_16_bit%0#0 +debug: Optimizer: Inner Txn Field Replacer +debug: Optimizer: Replace Compiled References +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: Optimizer: Remove Calls To No Op Subroutines debug: Optimizing subroutine test_cases.arc4_types.tuples.Arc4TuplesTypeContract.clear_state_program debug: Optimizer: Constant Replacer debug: Optimizer: Copy Propagation @@ -2597,6 +2804,21 @@ debug: Optimizer: Remove Empty Blocks debug: Optimizer: Remove Unreachable Blocks debug: Optimizer: Repeated Expression Elimination debug: Optimizer: Remove Calls To No Op Subroutines +debug: Optimizing subroutine test_cases.arc4_types.tuples.Arc4TuplesTypeContract.test_copy +debug: Optimizer: Constant Replacer +debug: Optimizer: Copy Propagation +debug: Optimizer: Intrinsic Simplifier +debug: Simplified (concat 0x000003 0x000100) to 0x000003000100 +debug: Optimizer: Remove Unused Variables +debug: Removing unused variable concat_result%0#0 +debug: Optimizer: Inner Txn Field Replacer +debug: Optimizer: Replace Compiled References +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: Optimizer: Remove Calls To No Op Subroutines debug: Optimizing subroutine test_cases.arc4_types.tuples.Arc4TuplesTypeContract.clear_state_program debug: Optimizer: Constant Replacer debug: Optimizer: Copy Propagation @@ -2652,6 +2874,22 @@ debug: Optimizer: Remove Empty Blocks debug: Optimizer: Remove Unreachable Blocks debug: Optimizer: Repeated Expression Elimination debug: Optimizer: Remove Calls To No Op Subroutines +debug: Optimizing subroutine test_cases.arc4_types.tuples.Arc4TuplesTypeContract.test_copy +debug: Optimizer: Constant Replacer +debug: Optimizer: Copy Propagation +debug: Optimizer: Intrinsic Simplifier +debug: Simplified (extract_uint16 0x000003000100 1u) to 3u +debug: Simplified (len 0x000003000100) to 6u +debug: Optimizer: Remove Unused Variables +debug: Removing unused variable tup#1 +debug: Optimizer: Inner Txn Field Replacer +debug: Optimizer: Replace Compiled References +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: Optimizer: Remove Calls To No Op Subroutines debug: Optimizing subroutine test_cases.arc4_types.tuples.Arc4TuplesTypeContract.clear_state_program debug: Optimizer: Constant Replacer debug: Optimizer: Copy Propagation @@ -2716,6 +2954,23 @@ debug: Optimizer: Remove Empty Blocks debug: Optimizer: Remove Unreachable Blocks debug: Optimizer: Repeated Expression Elimination debug: Optimizer: Remove Calls To No Op Subroutines +debug: Optimizing subroutine test_cases.arc4_types.tuples.Arc4TuplesTypeContract.test_copy +debug: Optimizer: Constant Replacer +debug: Optimizer: Copy Propagation +debug: Optimizer: Intrinsic Simplifier +debug: Simplified (substring3 0x000003000100 3u 6u) to 0x000100 +debug: Simplified (extract3 0x000003000100 0u 3u) to 0x000003 +debug: Optimizer: Remove Unused Variables +debug: Removing unused variable item_start_offset%1#0 +debug: Removing unused variable item_end_offset%1#0 +debug: Optimizer: Inner Txn Field Replacer +debug: Optimizer: Replace Compiled References +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: Optimizer: Remove Calls To No Op Subroutines debug: Optimizing subroutine test_cases.arc4_types.tuples.Arc4TuplesTypeContract.clear_state_program debug: Optimizer: Constant Replacer debug: Optimizer: Copy Propagation @@ -2787,6 +3042,23 @@ debug: Optimizer: Remove Empty Blocks debug: Optimizer: Remove Unreachable Blocks debug: Optimizer: Repeated Expression Elimination debug: Optimizer: Remove Calls To No Op Subroutines +debug: Optimizing subroutine test_cases.arc4_types.tuples.Arc4TuplesTypeContract.test_copy +debug: Optimizer: Constant Replacer +debug: Optimizer: Copy Propagation +debug: Optimizer: Intrinsic Simplifier +debug: Simplified (== 0x000100 0x000100) to 1u +debug: Simplified (extract_uint16 0x000100 0u) to 1u +debug: Optimizer: Remove Unused Variables +debug: Removing unused variable tmp%1#0 +debug: Removing unused variable data_up_to_item%1#0 +debug: Optimizer: Inner Txn Field Replacer +debug: Optimizer: Replace Compiled References +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: Optimizer: Remove Calls To No Op Subroutines debug: Optimizing subroutine test_cases.arc4_types.tuples.Arc4TuplesTypeContract.clear_state_program debug: Optimizer: Constant Replacer debug: Optimizer: Copy Propagation @@ -2893,6 +3165,21 @@ debug: Optimizer: Remove Empty Blocks debug: Optimizer: Remove Unreachable Blocks debug: Optimizer: Repeated Expression Elimination debug: Optimizer: Remove Calls To No Op Subroutines +debug: Optimizing subroutine test_cases.arc4_types.tuples.Arc4TuplesTypeContract.test_copy +debug: Optimizer: Constant Replacer +debug: Optimizer: Copy Propagation +debug: Optimizer: Intrinsic Simplifier +debug: Optimizer: Remove Unused Variables +debug: Removing unused variable tmp%2#0 +debug: Removing unused variable array_length%0#0 +debug: Optimizer: Inner Txn Field Replacer +debug: Optimizer: Replace Compiled References +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: Optimizer: Remove Calls To No Op Subroutines debug: Optimizing subroutine test_cases.arc4_types.tuples.Arc4TuplesTypeContract.clear_state_program debug: Optimizer: Constant Replacer debug: Optimizer: Copy Propagation @@ -2942,6 +3229,19 @@ debug: Optimizer: Remove Empty Blocks debug: Optimizer: Remove Unreachable Blocks debug: Optimizer: Repeated Expression Elimination debug: Optimizer: Remove Calls To No Op Subroutines +debug: Optimizing subroutine test_cases.arc4_types.tuples.Arc4TuplesTypeContract.test_copy +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: Replace Compiled References +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: Optimizer: Remove Calls To No Op Subroutines debug: Optimizing subroutine test_cases.arc4_types.tuples.Arc4TuplesTypeContract.clear_state_program debug: Optimizer: Constant Replacer debug: Optimizer: Copy Propagation @@ -2986,6 +3286,19 @@ debug: Optimizer: Remove Empty Blocks debug: Optimizer: Remove Unreachable Blocks debug: Optimizer: Repeated Expression Elimination debug: Optimizer: Remove Calls To No Op Subroutines +debug: Optimizing subroutine test_cases.arc4_types.tuples.Arc4TuplesTypeContract.test_copy +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: Replace Compiled References +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: Optimizer: Remove Calls To No Op Subroutines debug: Optimizing subroutine test_cases.arc4_types.tuples.Arc4TuplesTypeContract.clear_state_program debug: Optimizer: Constant Replacer debug: Optimizer: Copy Propagation @@ -3029,6 +3342,19 @@ debug: Optimizer: Remove Empty Blocks debug: Optimizer: Remove Unreachable Blocks debug: Optimizer: Repeated Expression Elimination debug: Optimizer: Remove Calls To No Op Subroutines +debug: Optimizing subroutine test_cases.arc4_types.tuples.Arc4TuplesTypeContract.test_copy +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: Replace Compiled References +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: Optimizer: Remove Calls To No Op Subroutines debug: Optimizing subroutine test_cases.arc4_types.tuples.Arc4TuplesTypeContract.clear_state_program debug: Optimizer: Constant Replacer debug: Optimizer: Copy Propagation @@ -3072,6 +3398,19 @@ debug: Optimizer: Remove Empty Blocks debug: Optimizer: Remove Unreachable Blocks debug: Optimizer: Repeated Expression Elimination debug: Optimizer: Remove Calls To No Op Subroutines +debug: Optimizing subroutine test_cases.arc4_types.tuples.Arc4TuplesTypeContract.test_copy +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: Replace Compiled References +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: Optimizer: Remove Calls To No Op Subroutines debug: Optimizing subroutine test_cases.arc4_types.tuples.Arc4TuplesTypeContract.clear_state_program debug: Optimizer: Constant Replacer debug: Optimizer: Copy Propagation @@ -3115,6 +3454,19 @@ debug: Optimizer: Remove Empty Blocks debug: Optimizer: Remove Unreachable Blocks debug: Optimizer: Repeated Expression Elimination debug: Optimizer: Remove Calls To No Op Subroutines +debug: Optimizing subroutine test_cases.arc4_types.tuples.Arc4TuplesTypeContract.test_copy +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: Replace Compiled References +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: Optimizer: Remove Calls To No Op Subroutines debug: Optimizing subroutine test_cases.arc4_types.tuples.Arc4TuplesTypeContract.clear_state_program debug: Optimizer: Constant Replacer debug: Optimizer: Copy Propagation @@ -3158,6 +3510,19 @@ debug: Optimizer: Remove Empty Blocks debug: Optimizer: Remove Unreachable Blocks debug: Optimizer: Repeated Expression Elimination debug: Optimizer: Remove Calls To No Op Subroutines +debug: Optimizing subroutine test_cases.arc4_types.tuples.Arc4TuplesTypeContract.test_copy +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: Replace Compiled References +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: Optimizer: Remove Calls To No Op Subroutines debug: Optimizing subroutine test_cases.arc4_types.tuples.Arc4TuplesTypeContract.clear_state_program debug: Optimizer: Constant Replacer debug: Optimizer: Copy Propagation @@ -3201,6 +3566,19 @@ debug: Optimizer: Remove Empty Blocks debug: Optimizer: Remove Unreachable Blocks debug: Optimizer: Repeated Expression Elimination debug: Optimizer: Remove Calls To No Op Subroutines +debug: Optimizing subroutine test_cases.arc4_types.tuples.Arc4TuplesTypeContract.test_copy +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: Replace Compiled References +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: Optimizer: Remove Calls To No Op Subroutines debug: Optimizing subroutine test_cases.arc4_types.tuples.Arc4TuplesTypeContract.clear_state_program debug: Optimizer: Constant Replacer debug: Optimizer: Copy Propagation @@ -3244,6 +3622,19 @@ debug: Optimizer: Remove Empty Blocks debug: Optimizer: Remove Unreachable Blocks debug: Optimizer: Repeated Expression Elimination debug: Optimizer: Remove Calls To No Op Subroutines +debug: Optimizing subroutine test_cases.arc4_types.tuples.Arc4TuplesTypeContract.test_copy +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: Replace Compiled References +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: Optimizer: Remove Calls To No Op Subroutines debug: Optimizing subroutine test_cases.arc4_types.tuples.Arc4TuplesTypeContract.clear_state_program debug: Optimizer: Constant Replacer debug: Optimizer: Copy Propagation @@ -3287,6 +3678,19 @@ debug: Optimizer: Remove Empty Blocks debug: Optimizer: Remove Unreachable Blocks debug: Optimizer: Repeated Expression Elimination debug: Optimizer: Remove Calls To No Op Subroutines +debug: Optimizing subroutine test_cases.arc4_types.tuples.Arc4TuplesTypeContract.test_copy +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: Replace Compiled References +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: Optimizer: Remove Calls To No Op Subroutines debug: Optimizing subroutine test_cases.arc4_types.tuples.Arc4TuplesTypeContract.clear_state_program debug: Optimizer: Constant Replacer debug: Optimizer: Copy Propagation @@ -3329,6 +3733,19 @@ debug: Optimizer: Remove Empty Blocks debug: Optimizer: Remove Unreachable Blocks debug: Optimizer: Repeated Expression Elimination debug: Optimizer: Remove Calls To No Op Subroutines +debug: Optimizing subroutine test_cases.arc4_types.tuples.Arc4TuplesTypeContract.test_copy +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: Replace Compiled References +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: Optimizer: Remove Calls To No Op Subroutines debug: Optimizing subroutine test_cases.arc4_types.tuples.Arc4TuplesTypeContract.clear_state_program debug: Optimizer: Constant Replacer debug: Optimizer: Copy Propagation @@ -3370,6 +3787,19 @@ debug: Optimizer: Remove Empty Blocks debug: Optimizer: Remove Unreachable Blocks debug: Optimizer: Repeated Expression Elimination debug: Optimizer: Remove Calls To No Op Subroutines +debug: Optimizing subroutine test_cases.arc4_types.tuples.Arc4TuplesTypeContract.test_copy +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: Replace Compiled References +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: Optimizer: Remove Calls To No Op Subroutines debug: Optimizing subroutine test_cases.arc4_types.tuples.Arc4TuplesTypeContract.clear_state_program debug: Optimizer: Constant Replacer debug: Optimizer: Copy Propagation @@ -3386,15 +3816,19 @@ debug: Optimizer: Remove Calls To No Op Subroutines debug: No optimizations performed in pass 26, ending loop debug: Removing Phis from test_cases.arc4_types.tuples.Arc4TuplesTypeContract.approval_program debug: Removing Phis from test_cases.arc4_types.tuples.Arc4TuplesTypeContract.test_stuff +debug: Removing Phis from test_cases.arc4_types.tuples.Arc4TuplesTypeContract.test_copy debug: Removing Phis from test_cases.arc4_types.tuples.Arc4TuplesTypeContract.clear_state_program debug: Coalescing local variables in test_cases.arc4_types.tuples.Arc4TuplesTypeContract.approval_program using strategy RootOperandGrouping debug: Coalescing resulted in 0 replacement/s debug: Coalescing local variables in test_cases.arc4_types.tuples.Arc4TuplesTypeContract.test_stuff using strategy RootOperandGrouping debug: Coalescing resulted in 0 replacement/s +debug: Coalescing local variables in test_cases.arc4_types.tuples.Arc4TuplesTypeContract.test_copy using strategy RootOperandGrouping +debug: Coalescing resulted in 0 replacement/s debug: Coalescing local variables in test_cases.arc4_types.tuples.Arc4TuplesTypeContract.clear_state_program using strategy RootOperandGrouping debug: Coalescing resulted in 0 replacement/s debug: Sequentializing parallel copies in test_cases.arc4_types.tuples.Arc4TuplesTypeContract.approval_program debug: Sequentializing parallel copies in test_cases.arc4_types.tuples.Arc4TuplesTypeContract.test_stuff +debug: Sequentializing parallel copies in test_cases.arc4_types.tuples.Arc4TuplesTypeContract.test_copy debug: Sequentializing parallel copies in test_cases.arc4_types.tuples.Arc4TuplesTypeContract.clear_state_program debug: Performing post-SSA optimizations debug: Output IR to arc4_types/out/Arc4TuplesTypeContract.destructured.ir @@ -3454,6 +3888,22 @@ debug: Inserted test_stuff_block@0.ops[58]: 'l-store-copy total#0 1' debug: Replaced test_stuff_block@0.ops[96]: 'v-load total#0' with 'l-load total#0' debug: Inserted test_stuff_block@0.ops[23]: 'l-store-copy c#0 3' debug: Replaced test_stuff_block@0.ops[61]: 'v-load c#0' with 'l-load c#0' +debug: Inserted test_copy_block@0.ops[7]: 'l-store-copy tup#2 0' +debug: Replaced test_copy_block@0.ops[9]: 'v-load tup#2' with 'l-load tup#2' +debug: Inserted test_copy_block@0.ops[20]: 'l-store-copy tmp%4#0 0' +debug: Replaced test_copy_block@0.ops[22]: 'v-load tmp%4#0' with 'l-load tmp%4#0' +debug: Inserted test_copy_block@0.ops[25]: 'l-store-copy tmp%6#0 0' +debug: Replaced test_copy_block@0.ops[27]: 'v-load tmp%6#0' with 'l-load tmp%6#0' +debug: Inserted test_copy_block@0.ops[3]: 'l-store-copy updated_target%0#0 0' +debug: Replaced test_copy_block@0.ops[6]: 'v-load updated_target%0#0' with 'l-load updated_target%0#0' +debug: Inserted test_copy_block@0.ops[15]: 'l-store-copy tup#2 0' +debug: Replaced test_copy_block@0.ops[18]: 'v-load tup#2' with 'l-load tup#2' +debug: Inserted test_copy_block@0.ops[17]: 'l-store-copy item_end_offset%3#0 1' +debug: Replaced test_copy_block@0.ops[21]: 'v-load item_end_offset%3#0' with 'l-load item_end_offset%3#0' +debug: Inserted test_copy_block@0.ops[11]: 'l-store-copy tup#2 0' +debug: Replaced test_copy_block@0.ops[15]: 'v-load tup#2' with 'l-load tup#2' +debug: Inserted test_copy_block@0.ops[14]: 'l-store-copy item_start_offset%3#0 1' +debug: Replaced test_copy_block@0.ops[22]: 'v-load item_start_offset%3#0' with 'l-load item_start_offset%3#0' debug: Output IR to arc4_types/out/Arc4StructsTypeContract.ssa.ir info: optimizing test_cases.arc4_types.structs.Arc4StructsTypeContract at level 1 debug: Begin optimization pass 1/100 diff --git a/test_cases/arc4_types/tuples.py b/test_cases/arc4_types/tuples.py index e8584a3ad7..20d7ad9790 100644 --- a/test_cases/arc4_types/tuples.py +++ b/test_cases/arc4_types/tuples.py @@ -1,7 +1,7 @@ import typing from algopy import Bytes, Contract, UInt64, subroutine -from algopy.arc4 import Bool, String, Tuple, UInt8 +from algopy.arc4 import Bool, Byte, DynamicBytes, String, Tuple, UInt8 TestTuple: typing.TypeAlias = Tuple[UInt8, UInt8, String, String, UInt8] @@ -46,6 +46,8 @@ def approval_program(self) -> bool: assert concat.native == "hello world" assert total == 258 + self.test_copy() + return True def clear_state_program(self) -> bool: @@ -63,3 +65,15 @@ def test_stuff(self, test_tuple: TestTuple) -> tuple[UInt64, String]: text = c.native + " " + d.native return total, String(text) + + @subroutine + def test_copy(self) -> None: + tup = Tuple((UInt8(), DynamicBytes())) + tup[1].append(Byte()) + + assert tup[1] == DynamicBytes(0) + + tup2 = tup.copy() + tup[1][0] = Byte(1) + + assert tup[1] != tup2[1]