From b48db43b5be917b534f40f7d37ec8c1ce6e34891 Mon Sep 17 00:00:00 2001 From: Adam Chidlow Date: Fri, 8 Mar 2024 10:38:28 +0800 Subject: [PATCH] feat: allow TEAL optimizer to handle dup/dupn ops when removing stack shuffling of constants, and collapse any repeated elements with a dup/dupn --- .../amm/out/ConstantProductAMM.approval.teal | 2 +- .../amm/out/ConstantProductAMM.arc32.json | 2 +- .../out_O2/ConstantProductAMM.approval.teal | 2 +- .../calculator/out/MyContract.approval.teal | 2 +- .../out_O2/MyContract.approval.teal | 2 +- examples/sizes.txt | 16 ++++---- .../voting/out/VotingRoundApp.approval.teal | 4 +- examples/voting/out/VotingRoundApp.arc32.json | 2 +- .../out_O2/VotingRoundApp.approval.teal | 4 +- .../teal/optimize/constant_stack_shuffling.py | 41 ++++++++++++------- src/puya/teal/optimize/main.py | 6 ++- .../out/Arc4ArraysContract.approval.teal | 2 +- .../out/Arc4BoolEvalContract.approval.teal | 2 +- .../Arc4DynamicBytesContract.approval.teal | 2 +- .../out/Arc4RefTypesContract.approval.teal | 16 +++++--- .../out/Arc4StructsTypeContract.approval.teal | 2 +- test_cases/arc4_types/out/array.O1.log | 2 +- test_cases/arc4_types/out/array.O2.log | 2 +- test_cases/arc4_types/out/structs.O1.log | 6 +-- test_cases/arc4_types/out/structs.O2.log | 6 +-- .../out_O2/Arc4ArraysContract.approval.teal | 2 +- .../out_O2/Arc4BoolEvalContract.approval.teal | 2 +- .../Arc4DynamicBytesContract.approval.teal | 2 +- .../out_O2/Arc4RefTypesContract.approval.teal | 5 +-- .../Arc4StructsTypeContract.approval.teal | 2 +- .../out/BooleanBinaryOps.approval.teal | 8 ++-- .../out_O2/BooleanBinaryOps.approval.teal | 8 ++-- .../contains/out/MyContract.approval.teal | 6 +-- .../contains/out_O2/MyContract.approval.teal | 6 +-- .../everything/out/MyContract.approval.teal | 4 +- .../everything/out/MyContract.arc32.json | 2 +- .../out_O2/MyContract.approval.teal | 4 +- .../out/MyContract.approval.teal | 2 +- .../out/itxn_loop.approval.teal | 2 +- .../out_O2/MyContract.approval.teal | 2 +- .../out_O2/itxn_loop.approval.teal | 2 +- .../out/ImmediateVariants.approval.teal | 2 +- .../out_O2/ImmediateVariants.approval.teal | 2 +- .../less_simple/out/MyContract.approval.teal | 2 +- .../out_O2/MyContract.approval.teal | 2 +- test_cases/log/out/MyContract.approval.teal | 3 +- .../log/out_O2/MyContract.approval.teal | 3 +- .../nested_loops/out/Nested.approval.teal | 4 +- .../nested_loops/out_O2/Nested.approval.teal | 4 +- .../out/MyContract.approval.teal | 2 +- .../reversed_iteration/out/trace.O1.log | 2 +- .../reversed_iteration/out/trace.O2.log | 2 +- .../out_O2/MyContract.approval.teal | 2 +- .../out/MyContract.approval.teal | 11 ++--- .../out_O2/MyContract.approval.teal | 7 +--- .../out/TupleSupport.approval.teal | 2 +- .../out_O2/TupleSupport.approval.teal | 2 +- .../out/Baddie.approval.teal | 12 +++--- .../out_O2/Baddie.approval.teal | 12 +++--- 54 files changed, 135 insertions(+), 123 deletions(-) diff --git a/examples/amm/out/ConstantProductAMM.approval.teal b/examples/amm/out/ConstantProductAMM.approval.teal index ee2f767797..4097c6654a 100644 --- a/examples/amm/out/ConstantProductAMM.approval.teal +++ b/examples/amm/out/ConstantProductAMM.approval.teal @@ -390,7 +390,7 @@ _create_pool_token: global CurrentApplicationAddress // amm/contract.py:279 // reserve=Global.current_application_address, - global CurrentApplicationAddress + dup // amm/contract.py:280 // fee=0, int 0 diff --git a/examples/amm/out/ConstantProductAMM.arc32.json b/examples/amm/out/ConstantProductAMM.arc32.json index a2c910efa4..d9275cf50b 100644 --- a/examples/amm/out/ConstantProductAMM.arc32.json +++ b/examples/amm/out/ConstantProductAMM.arc32.json @@ -65,7 +65,7 @@ } }, "source": { - "approval": "I3ByYWdtYSB2ZXJzaW9uIDEwCgpleGFtcGxlcy5hbW0uY29udHJhY3QuQ29uc3RhbnRQcm9kdWN0QU1NLmFwcHJvdmFsX3Byb2dyYW06CiAgICB0eG4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FtbS9jb250cmFjdC5weTo4My04OQogICAgLy8gQGFyYzQuYWJpbWV0aG9kKAogICAgLy8gICAgIGRlZmF1bHRfYXJncz17CiAgICAvLyAgICAgICAgICJwb29sX2Fzc2V0IjogInBvb2xfdG9rZW4iLAogICAgLy8gICAgICAgICAiYV9hc3NldCI6ICJhc3NldF9hIiwKICAgIC8vICAgICAgICAgImJfYXNzZXQiOiAiYXNzZXRfYiIsCiAgICAvLyAgICAgfSwKICAgIC8vICkKICAgIHR4biBPbkNvbXBsZXRpb24KICAgICEKICAgIGFzc2VydCAvLyBPbkNvbXBsZXRpb24gaXMgTm9PcAogICAgdHhuIEFwcGxpY2F0aW9uSUQKICAgIGFzc2VydCAvLyBpcyBub3QgY3JlYXRpbmcKICAgIC8vIGFtbS9jb250cmFjdC5weToyNwogICAgLy8gY2xhc3MgQ29uc3RhbnRQcm9kdWN0QU1NKEFSQzRDb250cmFjdCk6CiAgICB0eG4gR3JvdXBJbmRleAogICAgaW50IDIKICAgIC0KICAgIGR1cAogICAgZ3R4bnMgVHlwZUVudW0KICAgIGludCBheGZlcgogICAgPT0KICAgIGFzc2VydCAvLyB0cmFuc2FjdGlvbiB0eXBlIGlzIGF4ZmVyCiAgICB0eG4gR3JvdXBJbmRleAogICAgaW50IDEKICAgIC0KICAgIGR1cAogICAgZ3R4bnMgVHlwZUVudW0KICAgIGludCBheGZlcgogICAgPT0KICAgIGFzc2VydCAvLyB0cmFuc2FjdGlvbiB0eXBlIGlzIGF4ZmVyCiAgICB0eG5hIEFwcGxpY2F0aW9uQXJncyAxCiAgICBidG9pCiAgICB0eG5hcyBBc3NldHMKICAgIHR4bmEgQXBwbGljYXRpb25BcmdzIDIKICAgIGJ0b2kKICAgIHR4bmFzIEFzc2V0cwogICAgdHhuYSBBcHBsaWNhdGlvbkFyZ3MgMwogICAgYnRvaQogICAgdHhuYXMgQXNzZXRzCiAgICAvLyBhbW0vY29udHJhY3QucHk6ODMtODkKICAgIC8vIEBhcmM0LmFiaW1ldGhvZCgKICAgIC8vICAgICBkZWZhdWx0X2FyZ3M9ewogICAgLy8gICAgICAgICAicG9vbF9hc3NldCI6ICJwb29sX3Rva2VuIiwKICAgIC8vICAgICAgICAgImFfYXNzZXQiOiAiYXNzZXRfYSIsCiAgICAvLyAgICAgICAgICJiX2Fzc2V0IjogImFzc2V0X2IiLAogICAgLy8gICAgIH0sCiAgICAvLyApCiAgICBjYWxsc3ViIG1pbnQKICAgIGludCAxCiAgICByZXR1cm4KCm1haW5fYnVybl9yb3V0ZUA3OgogICAgLy8gYW1tL2NvbnRyYWN0LnB5OjE0OS0xNTUKICAgIC8vIEBhcmM0LmFiaW1ldGhvZCgKICAgIC8vICAgICBkZWZhdWx0X2FyZ3M9ewogICAgLy8gICAgICAgICAicG9vbF9hc3NldCI6ICJwb29sX3Rva2VuIiwKICAgIC8vICAgICAgICAgImFfYXNzZXQiOiAiYXNzZXRfYSIsCiAgICAvLyAgICAgICAgICJiX2Fzc2V0IjogImFzc2V0X2IiLAogICAgLy8gICAgIH0sCiAgICAvLyApCiAgICB0eG4gT25Db21wbGV0aW9uCiAgICAhCiAgICBhc3NlcnQgLy8gT25Db21wbGV0aW9uIGlzIE5vT3AKICAgIHR4biBBcHBsaWNhdGlvbklECiAgICBhc3NlcnQgLy8gaXMgbm90IGNyZWF0aW5nCiAgICAvLyBhbW0vY29udHJhY3QucHk6MjcKICAgIC8vIGNsYXNzIENvbnN0YW50UHJvZHVjdEFNTShBUkM0Q29udHJhY3QpOgogICAgdHhuIEdyb3VwSW5kZXgKICAgIGludCAxCiAgICAtCiAgICBkdXAKICAgIGd0eG5zIFR5cGVFbnVtCiAgICBpbnQgYXhmZXIKICAgID09CiAgICBhc3NlcnQgLy8gdHJhbnNhY3Rpb24gdHlwZSBpcyBheGZlcgogICAgdHhuYSBBcHBsaWNhdGlvbkFyZ3MgMQogICAgYnRvaQogICAgdHhuYXMgQXNzZXRzCiAgICB0eG5hIEFwcGxpY2F0aW9uQXJncyAyCiAgICB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gIC8vIGFtbS9jb250cmFjdC5weTo4My04OQogICAgLy8gQGFyYzQuYWJpbWV0aG9kKAogICAgLy8gICAgIGRlZmF1bHRfYXJncz17CiAgICAvLyAgICAgICAgICJwb29sX2Fzc2V0IjogInBvb2xfdG9rZW4iLAogICAgLy8gICAgICAgICAiYV9hc3NldCI6ICJhc3NldF9hIiwKICAgIC8vICAgICAgICAgImJfYXNzZXQiOiAiYXNzZXRfYiIsCiAgICAvLyAgICAgfSwKICAgIC8vICkKICAgIHR4biBPbkNvbXBsZXRpb24KICAgICEKICAgIGFzc2VydCAvLyBPbkNvbXBsZXRpb24gaXMgTm9PcAogICAgdHhuIEFwcGxpY2F0aW9uSUQKICAgIGFzc2VydCAvLyBpcyBub3QgY3JlYXRpbmcKICAgIC8vIGFtbS9jb250cmFjdC5weToyNwogICAgLy8gY2xhc3MgQ29uc3RhbnRQcm9kdWN0QU1NKEFSQzRDb250cmFjdCk6CiAgICB0eG4gR3JvdXBJbmRleAogICAgaW50IDIKICAgIC0KICAgIGR1cAogICAgZ3R4bnMgVHlwZUVudW0KICAgIGludCBheGZlcgogICAgPT0KICAgIGFzc2VydCAvLyB0cmFuc2FjdGlvbiB0eXBlIGlzIGF4ZmVyCiAgICB0eG4gR3JvdXBJbmRleAogICAgaW50IDEKICAgIC0KICAgIGR1cAogICAgZ3R4bnMgVHlwZUVudW0KICAgIGludCBheGZlcgogICAgPT0KICAgIGFzc2VydCAvLyB0cmFuc2FjdGlvbiB0eXBlIGlzIGF4ZmVyCiAgICB0eG5hIEFwcGxpY2F0aW9uQXJncyAxCiAgICBidG9pCiAgICB0eG5hcyBBc3NldHMKICAgIHR4bmEgQXBwbGljYXRpb25BcmdzIDIKICAgIGJ0b2kKICAgIHR4bmFzIEFzc2V0cwogICAgdHhuYSBBcHBsaWNhdGlvbkFyZ3MgMwogICAgYnRvaQogICAgdHhuYXMgQXNzZXRzCiAgICAvLyBhbW0vY29udHJhY3QucHk6ODMtODkKICAgIC8vIEBhcmM0LmFiaW1ldGhvZCgKICAgIC8vICAgICBkZWZhdWx0X2FyZ3M9ewogICAgLy8gICAgICAgICAicG9vbF9hc3NldCI6ICJwb29sX3Rva2VuIiwKICAgIC8vICAgICAgICAgImFfYXNzZXQiOiAiYXNzZXRfYSIsCiAgICAvLyAgICAgICAgICJiX2Fzc2V0IjogImFzc2V0X2IiLAogICAgLy8gICAgIH0sCiAgICAvLyApCiAgICBjYWxsc3ViIG1pbnQKICAgIGludCAxCiAgICByZXR1cm4KCm1haW5fYnVybl9yb3V0ZUA3OgogICAgLy8gYW1tL2NvbnRyYWN0LnB5OjE0OS0xNTUKICAgIC8vIEBhcmM0LmFiaW1ldGhvZCgKICAgIC8vICAgICBkZWZhdWx0X2FyZ3M9ewogICAgLy8gICAgICAgICAicG9vbF9hc3NldCI6ICJwb29sX3Rva2VuIiwKICAgIC8vICAgICAgICAgImFfYXNzZXQiOiAiYXNzZXRfYSIsCiAgICAvLyAgICAgICAgICJiX2Fzc2V0IjogImFzc2V0X2IiLAogICAgLy8gICAgIH0sCiAgICAvLyApCiAgICB0eG4gT25Db21wbGV0aW9uCiAgICAhCiAgICBhc3NlcnQgLy8gT25Db21wbGV0aW9uIGlzIE5vT3AKICAgIHR4biBBcHBsaWNhdGlvbklECiAgICBhc3NlcnQgLy8gaXMgbm90IGNyZWF0aW5nCiAgICAvLyBhbW0vY29udHJhY3QucHk6MjcKICAgIC8vIGNsYXNzIENvbnN0YW50UHJvZHVjdEFNTShBUkM0Q29udHJhY3QpOgogICAgdHhuIEdyb3VwSW5kZXgKICAgIGludCAxCiAgICAtCiAgICBkdXAKICAgIGd0eG5zIFR5cGVFbnVtCiAgICBpbnQgYXhmZXIKICAgID09CiAgICBhc3NlcnQgLy8gdHJhbnNhY3Rpb24gdHlwZSBpcyBheGZlcgogICAgdHhuYSBBcHBsaWNhdGlvbkFyZ3MgMQogICAgYnRvaQogICAgdHhuYXMgQXNzZXRzCiAgICB0eG5hIEFwcGxpY2F0aW9uQXJncyA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1NLmNsZWFyX3N0YXRlX3Byb2dyYW06CiAgICAvLyBhbW0vY29udHJhY3QucHk6MjcKICAgIC8vIGNsYXNzIENvbnN0YW50UHJvZHVjdEFNTShBUkM0Q29udHJhY3QpOgogICAgaW50IDEKICAgIHJldHVybgo=" }, "state": { diff --git a/examples/amm/out_O2/ConstantProductAMM.approval.teal b/examples/amm/out_O2/ConstantProductAMM.approval.teal index 1de180f63c..c560cd68d5 100644 --- a/examples/amm/out_O2/ConstantProductAMM.approval.teal +++ b/examples/amm/out_O2/ConstantProductAMM.approval.teal @@ -257,7 +257,7 @@ _create_pool_token: assert // asset exists concat global CurrentApplicationAddress - global CurrentApplicationAddress + dup int 0 itxn_field Fee itxn_field ConfigAssetReserve diff --git a/examples/calculator/out/MyContract.approval.teal b/examples/calculator/out/MyContract.approval.teal index 99c6b851bf..da739b617d 100644 --- a/examples/calculator/out/MyContract.approval.teal +++ b/examples/calculator/out/MyContract.approval.teal @@ -19,7 +19,7 @@ examples.calculator.contract.MyContract.approval_program: int 0 // calculator/contract.py:24 // action = UInt64(0) - int 0 + dup bury 3 // calculator/contract.py:22 // a = UInt64(0) diff --git a/examples/calculator/out_O2/MyContract.approval.teal b/examples/calculator/out_O2/MyContract.approval.teal index 005bc881fa..bccb395df3 100644 --- a/examples/calculator/out_O2/MyContract.approval.teal +++ b/examples/calculator/out_O2/MyContract.approval.teal @@ -9,7 +9,7 @@ examples.calculator.contract.MyContract.approval_program: int 0 bury 3 int 0 - int 0 + dup bury 3 int 0 itob diff --git a/examples/sizes.txt b/examples/sizes.txt index 89dc1d57b0..125d7acb91 100644 --- a/examples/sizes.txt +++ b/examples/sizes.txt @@ -1,17 +1,17 @@ Name O0 size O1 size O1 ⏷ O2 size O2 ⏷ abi_routing/Reference 1179 1019 160 1019 0 - amm/ConstantProductAMM 1213 1114 99 1114 0 + amm/ConstantProductAMM 1213 1113 100 1113 0 application/Reference 175 168 7 168 0 arc4_numeric_comparisons/UIntNOrdering 1220 908 312 908 0 arc4_types/Arc4Arrays 588 376 212 376 0 - arc4_types/Arc4BoolEval 731 20 711 20 0 + arc4_types/Arc4BoolEval 731 19 712 19 0 arc4_types/Arc4BoolType 329 57 272 57 0 arc4_types/Arc4DynamicBytes 247 128 119 128 0 arc4_types/Arc4DynamicStringArray 230 112 118 112 0 arc4_types/Arc4MutableParams 362 222 140 220 2 arc4_types/Arc4Mutation 2803 1452 1351 1451 1 arc4_types/Arc4NumericTypes 538 8 530 8 0 - arc4_types/Arc4RefTypes 47 43 4 43 0 + arc4_types/Arc4RefTypes 47 39 8 39 0 arc4_types/Arc4StringTypes 309 8 301 8 0 arc4_types/Arc4StructsFromAnotherModule 67 12 55 12 0 arc4_types/Arc4StructsType 296 237 59 237 0 @@ -21,7 +21,7 @@ augmented_assignment/Augmented 157 156 1 156 0 avm_types_in_abi/Test 226 173 53 173 0 biguint_binary_ops/BiguintBinaryOps 280 216 64 216 0 - boolean_binary_ops/BooleanBinaryOps 308 302 6 302 0 + boolean_binary_ops/BooleanBinaryOps 308 298 10 298 0 bytes_ops/BiguintBinaryOps 143 139 4 139 0 calculator 346 317 29 315 2 callsub 32 32 0 32 0 @@ -38,7 +38,7 @@ global_state/AppState 305 301 4 301 0 hello_world/HelloWorld 23 22 1 22 0 hello_world_arc4/HelloWorld 110 89 21 89 0 - inner_transactions 1847 1174 673 1174 0 + inner_transactions 1847 1173 674 1173 0 inner_transactions/Greeter 325 302 23 302 0 inner_transactions/itxn_loop 203 184 19 184 0 intrinsics/ImmediateVariants 164 162 2 162 0 @@ -46,7 +46,7 @@ less_simple 171 148 23 148 0 local_state/LocalState 305 298 7 286 12 local_state/LocalStateWithOffsets 318 309 9 297 12 - log 172 168 4 168 0 + log 172 167 5 167 0 match 490 455 35 455 0 merkle/MerkleTree 217 210 7 210 0 nested_loops/Nested 243 201 42 201 0 @@ -65,9 +65,9 @@ stubs/Bytes 1769 258 1511 258 0 stubs/Uint64 371 8 363 8 0 template_variables/TemplateVariables 168 155 13 155 0 - too_many_permutations 108 107 1 107 0 + too_many_permutations 108 106 2 106 0 transaction/Transaction 893 849 44 849 0 - tuple_support/TupleSupport 442 294 148 294 0 + tuple_support/TupleSupport 442 292 150 292 0 typed_abi_call/Greeter 1285 1168 117 1168 0 typed_abi_call/Logger 569 478 91 478 0 unary/Unary 134 96 38 96 0 diff --git a/examples/voting/out/VotingRoundApp.approval.teal b/examples/voting/out/VotingRoundApp.approval.teal index 18dd2ae77d..48ca4e8374 100644 --- a/examples/voting/out/VotingRoundApp.approval.teal +++ b/examples/voting/out/VotingRoundApp.approval.teal @@ -552,7 +552,7 @@ close: int 0 // voting/voting.py:129 // for question_index, question_options_arc in uenumerate(self.option_counts): - int 0 + dup byte "option_counts" app_global_get_ex assert // check option_counts exists @@ -1187,7 +1187,7 @@ vote: int 0 // voting/voting.py:192 // for question_index in urange(questions_count): - int 0 + dup vote_for_header@1: // voting/voting.py:192 diff --git a/examples/voting/out/VotingRoundApp.arc32.json b/examples/voting/out/VotingRoundApp.arc32.json index d924a39fb3..b3e543642b 100644 --- a/examples/voting/out/VotingRoundApp.arc32.json +++ b/examples/voting/out/VotingRoundApp.arc32.json @@ -51,7 +51,7 @@ } }, "source": { - "approval": "I3ByYWdtYSB2ZXJzaW9uIDEwCgpleGFtcGxlcy52b3Rpbmcudm90aW5nLlZvdGluZ1JvdW5kQXBwLmFwcHJvdmFsX3Byb2dyYW06CiAgICB0eG4gQXBwbGljYXRpb25JRAogICAgYm56IG1haW5fZW50cnlwb2ludEAyCiAgICBjYWxsc3ViIF9faW5pdF9fCgptYWluX2VudHJ5cG9pbnRAMjoKICAgIC8vIHZvdGluZy92b3RpbmcucHk6NDgKICAgIC8vIGNsYXNzIFZvdGluZ1JvdW5kQXBwKEFSQzRDb250cmFjdCk6CiAgICBtZXRob2QgImNyZWF0ZShzdHJpbmcsYnl0ZVtdLHN0cmluZyx1aW50NjQsdWludDY0LHVpbnQ4W10sdWludDY0LHN0cmluZyl2b2lkIgogICAgbWV0aG9kICJ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iAgICBidG9pCiAgICB0eG5hIEFwcGxpY2F0aW9uQXJncyA4CiAgICAvLyB2b3Rpbmcvdm90aW5nLnB5OjU1CiAgICAvLyBAYXJjNC5hYmltZXRob2QoY3JlYXRlPVRydWUpCiAgICBjYWxsc3ViIGNyZWF0ZQogICAgaW50IDEKICAgIHJldHVybgoKbWFpbl9ib290c3RyYXBfcm91dGVANDoKICAgIC8vIHZvdGluZy92b3RpbmcucHk6NzkKICAgIC8vIEBhcmM0LmFiaW1ldGhvZAogICAgdHhuIE9uQ29tcGxldGlvbgogICAgIQogICAgYXNzZXJ0IC8vIE9uQ29tcGxldGlvbiBpcyBOb09wCiAgICB0eG4gQXBwbGljYXRpb25JRAogICAgYXNzZXJ0IC8vIGlzIG5vdCBjcmVhdGluZwogICAgLy8gdm90aW5nL3ZvdGluZy5weTo0OAogICAgLy8gY2xhc3MgVm90aW5nUm91bmRBcHAoQVJDNENvbnRyYWN0KToKICAgIHR4biBHcm91cEluZGV4CiAgICBpbnQgMQogICAgLQogICAgZHVwCiAgICBndHhucyBUeXBlRW51bQogICAgaW50IHBheQogICAgPT0KICAgIGFzc2VydCAvLyB0cmFuc2FjdGlvbiB0eXBlIGlzIHBheQogICAgLy8gdm90aW5nL3ZvdGluZy5weTo3OQogICAgLy8gQGFyYzQuYWJpbWV0aG9kCiAgICBjYWxsc3ViIGJvb3RzdHJhcAogICAgaW50IDEKICAgIHJldHVybgoKbWFpbl9jbG9zZV9yb3V0ZUA1OgogICAgLy8gdm90aW5nL3ZvdGluZy5weToxMDcKICAgIC8vIEBhcmM0LmFiaW1ldGhvZAogICAgdHhuIE9uQ29tcGxldGlvbgogICAgIQogICAgYXNzZXJ0IC8vIE9uQ29tcGxldGlvbiBpcyBOb09wCiAgICB0eG4gQXBwbGljYXRpb25JRAogICAgYXNzZXJ0IC8vIGlzIG5vdCBjcmVhdGluZwogICAgY2FsbHN1YiBjbG9zZQogICAgaW50IDEKICAgIHJldHVybgoKbWFpbl9nZXRfcHJlY29uZGl0aW9uc19yb3V0ZUA2OgogICAgLy8gdm90aW5nL3ZvdGluZy5weToxNTcKICAgIC8vIEBhcmM0LmFiaW1ldGhvZChyZWFkb25seT1UcnVlKQogICAgdHhuIE9uQ29tcGxldGlvbgogICAgIQogICAgYXNzZXJ0IC8vIE9uQ29tcGxldGlvbiBpcyBOb09wCiAgICB0eG4gQXBwbGljYXRpb25JRAogICAgYXNzZXJ0IC8vIGlzIG5vdCBjcmVhdGluZwogICAgLy8gdm90aW5nL3ZvdGluZy5weTo0OAogICAgLy8gY2xhc3MgVm90aW5nUm91bmRBcHAoQVJDNENvbnRyYWN0KToKICAgIHR4bmEgQXBwbGljYXRpb25BcmdzIDEKICAgIC8vIHZvdGluZy92b3RpbmcucHk6MTU3CiAgICAvLyBAYXJjNC5hYmltZXRob2QocmVhZG9ubHk9VHJ1ZSkKICAgIGNhbGxzdWIgZ2V0X3ByZWNvbmRpdGlvbnMKICAgIGJ5dGUgMHgxNTFmN2M3NQogICAgc3dhcAogICAgY29uY2F0CiAgICBsb2cKICAgIGludCAxCiAgICByZXR1cm4KCm1haW5fdm90ZV9yb3V0ZUA3OgogICAgLy8gdm90aW5nL3ZvdGluZy5weToxNjYKICAgIC8vIEBhcmM0LmFiaW1ldGhvZAogICAgdHhuIE9uQ29tcGxldGlvbgogICAgIQogICAgYXNzZXJ0IC8vIE9uQ29tcGxldGlvbiBpcyBOb09wCiAgICB0eG4gQXBwbGljYXRpb25JRAogICAgYXNzZXJ0IC8vIGlzIG5vdCBjcmVhdGluZwogICAgLy8gdm90aW5nL3ZvdGluZy5weTo0OAogICAgLy8gY2xhc3MgVm90aW5nUm91bmRBcHAoQVJDNENvbnRyYWN0KToKICAgIHR4biBHcm91cEluZGV4CiAgICBpbnQgMQogICAgLQogICAgZHVwCiAgICBndHhucyBUeXBlRW51bQogICAgaW50IHBheQogICAgPT0KICAgIGFzc2VydCAvLyB0cmFuc2FjdGlvbiB0eXBlIGlzIHBheQogICAgdHhuYSBBcHB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yBiJ3sic3RhbmRhcmQiOiJhcmM2OSIsJwogICAgLy8gYiciZGVzY3JpcHRpb24iOiJUaGlzIGlzIGEgdm90aW5nIHJlc3VsdCBORlQgZm9yIHZvdGluZyByb3VuZCB3aXRoIElEICcKICAgIC8vICsgc2VsZi52b3RlX2lkCiAgICAvLyArIGInLiIsInByb3BlcnRpZXMiOnsibWV0YWRhdGEiOiJpcGZzOi8vJwogICAgLy8gKyBzZWxmLm1ldGFkYXRhX2lwZnNfY2lkCiAgICAvLyArIGInIiwiaWQiOiInCiAgICAvLyArIHNlbGYudm90ZV9pZAogICAgLy8gKyBiJyIsInF1b3J1bSI6JwogICAgLy8gKyBpdG9hKHNlbGYucXVvcnVtKQogICAgLy8gKyBiJywidm90ZXJDb3VudCI6JwogICAgLy8gKyBpdG9hKHNlbGYudm90ZXJfY291bnQpCiAgICAvLyArIGInLCJ0YWxsaWVzIjpbJwogICAgY29uY2F0CiAgICAvLyB2b3Rpbmcvdm90aW5nLnB5OjEyOAogICAgLy8gY3VycmVudF9pbmRleCA9IFVJbnQ2NCgwKQogICAgaW50IDAKICAgIC8vIHZvdGluZy92b3RpbmcucHk6MTI5CiAgICAvLyBmb3IgcXVlc3Rpb25faW5kZXgsIHF1ZXN0aW9uX29wdGlvbnNfYXJjIGluIHVlbnVtZXJhdGUoc2VsZi5vcHRpb25fY291bnRzKToKICAgIGludCAwCiAgICBieXRlICJvcHRpb25fY291bnRzIgogICAgYXBwX2dsb2JhbF9nZXRfZXgKICAgIGFzc2VydCAvLyBjaGVjayBvcHRpb25fY291bnRzIGV4aXN0cwogICAgZHVwCiAgICBpbnQgMAogICAgZXh0cmFjdF91aW50MTYKICAgIHN3YXAKICAgIGV4dHJhY3QgMiAwCiAgICBpbnQgMAoKY2xvc2VfZm9yX2hlYWRlckAxOgogICAgLy8gdm90aW5nL3ZvdGluZy5weToxMjkKICAgIC8vIGZvciBxdWVzdGlvbl9pbmRleCwgcXVlc3Rpb25fb3B0aW9uc19hcmMgaW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B0eG5hIEFwcGxpY2F0aW9uQXJncyA4CiAgICAvLyB2b3Rpbmcvdm90aW5nLnB5OjU1CiAgICAvLyBAYXJjNC5hYmltZXRob2QoY3JlYXRlPVRydWUpCiAgICBjYWxsc3ViIGNyZWF0ZQogICAgaW50IDEKICAgIHJldHVybgoKbWFpbl9ib290c3RyYXBfcm91dGVANDoKICAgIC8vIHZvdGluZy92b3RpbmcucHk6NzkKICAgIC8vIEBhcmM0LmFiaW1ldGhvZAogICAgdHhuIE9uQ29tcGxldGlvbgogICAgIQogICAgYXNzZXJ0IC8vIE9uQ29tcGxldGlvbiBpcyBOb09wCiAgICB0eG4gQXBwbGljYXRpb25JRAogICAgYXNzZXJ0IC8vIGlzIG5vdCBjcmVhdGluZwogICAgLy8gdm90aW5nL3ZvdGluZy5weTo0OAogICAgLy8gY2xhc3MgVm90aW5nUm91bmRBcHAoQVJDNENvbnRyYWN0KToKICAgIHR4biBHcm91cEluZGV4CiAgICBpbnQgMQogICAgLQogICAgZHVwCiAgICBndHhucyBUeXBlRW51bQogICAgaW50IHBheQogICAgPT0KICAgIGFzc2VydCAvLyB0cmFuc2FjdGlvbiB0eXBlIGlzIHBheQogICAgLy8gdm90aW5nL3ZvdGluZy5weTo3OQogICAgLy8gQGFyYzQuYWJpbWV0aG9kCiAgICBjYWxsc3ViIGJvb3RzdHJhcAogICAgaW50IDEKICAgIHJldHVybgoKbWFpbl9jbG9zZV9yb3V0ZUA1OgogICAgLy8gdm90aW5nL3ZvdGluZy5weToxMDcKICAgIC8vIEBhcmM0LmFiaW1ldGhvZAogICAgdHhuIE9uQ29tcGxldGlvbgogICAgIQogICAgYXNzZXJ0IC8vIE9uQ29tcGxldGlvbiBpcyBOb09wCiAgICB0eG4gQXBwbGljYXRpb25JRAogICAgYXNzZXJ0IC8vIGlzIG5vdCBjcmVhdGluZwogICAgY2FsbHN1YiBjbG9zZQogICAgaW50IDEKICAgIHJldHVybgoKbWFpbl9nZXRfcHJlY29uZGl0aW9uc19yb3V0ZUA2OgogICAgLy8gdm90aW5nL3ZvdGluZy5weToxNTcKICAgIC8vIEBhcmM0LmFiaW1ldGhvZChyZWFkb25seT1UcnVlKQogICAgdHhuIE9uQ29tcGxldGlvbgogICAgIQogICAgYXNzZXJ0IC8vIE9uQ29tcGxldGlvbiBpcyBOb09wCiAgICB0eG4gQXBwbGljYXRpb25JRAogICAgYXNzZXJ0IC8vIGlzIG5vdCBjcmVhdGluZwogICAgLy8gdm90aW5nL3ZvdGluZy5weTo0OAogICAgLy8gY2xhc3MgVm90aW5nUm91bmRBcHAoQVJDNENvbnRyYWN0KToKICAgIHR4bmEgQXBwbGljYXRpb25BcmdzIDEKICAgIC8vIHZvdGluZy92b3RpbmcucHk6MTU3CiAgICAvLyBAYXJjNC5hYmltZXRob2QocmVhZG9ubHk9VHJ1ZSkKICAgIGNhbGxzdWIgZ2V0X3ByZWNvbmRpdGlvbnMKICAgIGJ5dGUgMHgxNTFmN2M3NQogICAgc3dhcAogICAgY29uY2F0CiAgICBsb2cKICAgIGludCAxCiAgICByZXR1cm4KCm1haW5fdm90ZV9yb3V0ZUA3OgogICAgLy8gdm90aW5nL3ZvdGluZy5weToxNjYKICAgIC8vIEBhcmM0LmFiaW1ldGhvZAogICAgdHhuIE9uQ29tcGxldGlvbgogICAgIQogICAgYXNzZXJ0IC8vIE9uQ29tcGxldGlvbiBpcyBOb09wCiAgICB0eG4gQXBwbGljYXRpb25JRAogICAgYXNzZXJ0IC8vIGlzIG5vdCBjcmVhdGluZwogICAgLy8gdm90aW5nL3ZvdGluZy5weTo0OAogICAgLy8gY2xhc3MgVm90aW5nUm91bmRBcHAoQVJDNENvbnRyYWN0KToKICAgIHR4biBHcm91cEluZGV4CiAgICBpbnQgMQogICAgLQogICAgZHVwCiAgICBndHhucyBUeXBlRW51bQogICAgaW50IHBheQogICAgPT0KICAgIGFzc2VydCAvLyB0cmFuc2FjdGlvbiB0eXBlIGlzIHBheQogICAgdHhuYSBBcHBsaWNhdGlvbkFyZ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3ViCgoKLy8gZXhhbXBsZXMudm90aW5nLnZvdGluZy5Wb3RpbmdSb3VuZEFwcC5fX2luaXRfXygpIC0+IHZvaWQ6Cl9faW5pdF9fOgogICAgLy8gdm90aW5nL3ZvdGluZy5weTo0OQogICAgLy8gZGVmIF9faW5pdF9fKHNlbGYpIC0+IE5vbmU6CiAgICBwcm90byAwIDAKICAgIC8vIHZvdGluZy92b3RpbmcucHk6NTAKICAgIC8vIHNlbGYuaXNfYm9vdHN0cmFwcGVkID0gRmFsc2UKICAgIGJ5dGUgImlzX2Jvb3RzdHJhcHBlZCIKICAgIGludCAwCiAgICBhcHBfZ2xvYmFsX3B1dAogICAgLy8gdm90aW5nL3ZvdGluZy5weTo1MS01MgogICAgLy8gIyBUaGUgbWluaW11bSBudW1iZXIgb2Ygdm90ZXJzIHdobyBoYXZlIHZvdGVkCiAgICAvLyBzZWxmLnZvdGVyX2NvdW50ID0gVUludDY0KDApCiAgICBieXRlICJ2b3Rlcl9jb3VudCIKICAgIGludCAwCiAgICBhcHBfZ2xvYmFsX3B1dAogICAgcmV0c3ViCg==", "clear": "I3ByYWdtYSB2ZXJzaW9uIDEwCgpleGFtcGxlcy52b3Rpbmcudm90aW5nLlZvdGluZ1JvdW5kQXBwLmNsZWFyX3N0YXRlX3Byb2dyYW06CiAgICAvLyB2b3Rpbmcvdm90aW5nLnB5OjQ4CiAgICAvLyBjbGFzcyBWb3RpbmdSb3VuZEFwcChBUkM0Q29udHJhY3QpOgogICAgaW50IDEKICAgIHJldHVybgo=" }, "state": { diff --git a/examples/voting/out_O2/VotingRoundApp.approval.teal b/examples/voting/out_O2/VotingRoundApp.approval.teal index 30a958cf91..06aebec8f6 100644 --- a/examples/voting/out_O2/VotingRoundApp.approval.teal +++ b/examples/voting/out_O2/VotingRoundApp.approval.teal @@ -301,7 +301,7 @@ close: byte ",\"tallies\":[" concat int 0 - int 0 + dup byte "option_counts" app_global_get_ex assert // check option_counts exists @@ -686,7 +686,7 @@ vote: == assert // Payment must be the exact min balance int 0 - int 0 + dup vote_for_header@1: frame_dig 3 diff --git a/src/puya/teal/optimize/constant_stack_shuffling.py b/src/puya/teal/optimize/constant_stack_shuffling.py index 84772a9a22..5bee4445cb 100644 --- a/src/puya/teal/optimize/constant_stack_shuffling.py +++ b/src/puya/teal/optimize/constant_stack_shuffling.py @@ -1,5 +1,4 @@ -import functools -import operator +import attrs from puya.teal import models from puya.teal.optimize._data import LOAD_OP_CODES @@ -10,10 +9,13 @@ def perform_constant_stack_shuffling(block: models.TealBlock) -> bool: loads = list[models.TealOp]() modified = False for op in block.ops: - if op.op_code in LOAD_OP_CODES: # noqa: SIM114 - loads.append(op) - elif isinstance(op, models.FrameDig) and op.n < 0: + if _is_constant_load(op): loads.append(op) + elif loads and op.op_code.startswith("dup"): + (n,) = op.immediates or (1,) + assert isinstance(n, int) + loads.extend([attrs.evolve(loads[-1], source_location=op.source_location)] * n) + modified = True elif loads: match op: case models.Uncover(n=n) if n < len(loads): @@ -48,9 +50,7 @@ def constant_dupn_insertion(block: models.TealBlock) -> bool: modified = _collapse_loads(loads) or modified result.extend(loads) loads = [] - if op.op_code in LOAD_OP_CODES or ( - op.op_code == "frame_dig" and int(op.immediates[0]) < 0 - ): + if _is_constant_load(op): loads.append(op) else: result.append(op) @@ -63,10 +63,21 @@ def constant_dupn_insertion(block: models.TealBlock) -> bool: def _collapse_loads(loads: list[models.TealOp]) -> bool: n = len(loads) - 1 - if n >= 2: - dupn_source_location = functools.reduce( - operator.add, (op.source_location for op in loads[1:]) - ) - loads[1:] = [models.DupN(n=n, source_location=dupn_source_location)] - return True - return False + if n < 1: + return False + + if n == 1: + dup_op: models.TealOp = models.Dup(source_location=loads[1].source_location) + else: + dupn_source_location = None + for op in loads[1:]: + if op.source_location is not None: + # TODO: it'd be better to only merge these if they're adjacent + dupn_source_location = op.source_location + dupn_source_location + dup_op = models.DupN(n=n, source_location=dupn_source_location) + loads[1:] = [dup_op] + return True + + +def _is_constant_load(op: models.TealOp) -> bool: + return op.op_code in LOAD_OP_CODES or (isinstance(op, models.FrameDig) and op.n < 0) diff --git a/src/puya/teal/optimize/main.py b/src/puya/teal/optimize/main.py index 45788c2f97..343ec2e61c 100644 --- a/src/puya/teal/optimize/main.py +++ b/src/puya/teal/optimize/main.py @@ -18,10 +18,14 @@ def optimize_block(block: models.TealBlock, *, level: int) -> None: modified = simplify_repeated_rotation_ops(block) or modified modified = peephole(block) or modified - # don't do this one in a loop, only after everything else + # we don't do dup/dupn collapse in the above loop, but after it. + # it's easier to deal with expanded dup/dupn instructions above when looking at + # stack shuffling etc, but once it's done we save ops / program size by collapsing them constant_dupn_insertion(block) if level >= 2: + # this is a brute-force search which can be slow at times, + # so it's only done once and only at higher optimisation levels block.ops = repeated_rotation_ops_search(block.ops) diff --git a/test_cases/arc4_types/out/Arc4ArraysContract.approval.teal b/test_cases/arc4_types/out/Arc4ArraysContract.approval.teal index 5bed38499a..8ca09fb01a 100644 --- a/test_cases/arc4_types/out/Arc4ArraysContract.approval.teal +++ b/test_cases/arc4_types/out/Arc4ArraysContract.approval.teal @@ -7,7 +7,7 @@ test_cases.arc4_types.array.Arc4ArraysContract.approval_program: // arc4_types/array.py:26 // total = UInt64(0) int 0 - int 0 + dup main_for_header@1: // arc4_types/array.py:27 diff --git a/test_cases/arc4_types/out/Arc4BoolEvalContract.approval.teal b/test_cases/arc4_types/out/Arc4BoolEvalContract.approval.teal index e699297718..2ffff11432 100644 --- a/test_cases/arc4_types/out/Arc4BoolEvalContract.approval.teal +++ b/test_cases/arc4_types/out/Arc4BoolEvalContract.approval.teal @@ -4,7 +4,7 @@ test_cases.arc4_types.bool_eval.Arc4BoolEvalContract.approval_program: // arc4_types/bool_eval.py:19 // assert not arc4.Address(Global.zero_address) global ZeroAddress - global ZeroAddress + dup == assert // arc4_types/bool_eval.py:20 diff --git a/test_cases/arc4_types/out/Arc4DynamicBytesContract.approval.teal b/test_cases/arc4_types/out/Arc4DynamicBytesContract.approval.teal index 7708cdb392..e787e64b17 100644 --- a/test_cases/arc4_types/out/Arc4DynamicBytesContract.approval.teal +++ b/test_cases/arc4_types/out/Arc4DynamicBytesContract.approval.teal @@ -6,7 +6,7 @@ test_cases.arc4_types.dynamic_bytes.Arc4DynamicBytesContract.approval_program: // arc4_types/dynamic_bytes.py:11 // total = UInt64(0) int 0 - int 0 + dup main_for_header@1: // arc4_types/dynamic_bytes.py:16 diff --git a/test_cases/arc4_types/out/Arc4RefTypesContract.approval.teal b/test_cases/arc4_types/out/Arc4RefTypesContract.approval.teal index b0917f93e3..09caa4a3e8 100644 --- a/test_cases/arc4_types/out/Arc4RefTypesContract.approval.teal +++ b/test_cases/arc4_types/out/Arc4RefTypesContract.approval.teal @@ -1,19 +1,23 @@ #pragma version 10 test_cases.arc4_types.reference_types.Arc4RefTypesContract.approval_program: - // arc4_types/reference_types.py:6-8 + // arc4_types/reference_types.py:9-11 + // # When creating an address from bytes, we check the length is 32 as we don't know the + // # source of the bytes + // checked_address = arc4.Address(op.Txn.sender.bytes) + txn Sender + // arc4_types/reference_types.py:6-11 // # When creating an address from an account no need to check the length as we assume the // # Account is valid // sender_address = arc4.Address(op.Txn.sender) - txn Sender + // # When creating an address from bytes, we check the length is 32 as we don't know the + // # source of the bytes + // checked_address = arc4.Address(op.Txn.sender.bytes) + dupn 3 // arc4_types/reference_types.py:9-11 // # When creating an address from bytes, we check the length is 32 as we don't know the // # source of the bytes // checked_address = arc4.Address(op.Txn.sender.bytes) - txn Sender - dup - cover 2 - dup len int 32 == diff --git a/test_cases/arc4_types/out/Arc4StructsTypeContract.approval.teal b/test_cases/arc4_types/out/Arc4StructsTypeContract.approval.teal index f5f6f18387..033763c393 100644 --- a/test_cases/arc4_types/out/Arc4StructsTypeContract.approval.teal +++ b/test_cases/arc4_types/out/Arc4StructsTypeContract.approval.teal @@ -7,7 +7,7 @@ test_cases.arc4_types.structs.Arc4StructsTypeContract.approval_program: byte 0x000000083cfbf217000000230384b842 // arc4_types/structs.py:28 // coord_2 = Vector(x=Decimal("35.382882839"), y=Decimal("150.382884930")) - byte 0x000000083cfbf217000000230384b842 + dup // arc4_types/structs.py:29 // coord_3 = add(coord_1.copy(), coord_2.copy()) callsub add diff --git a/test_cases/arc4_types/out/array.O1.log b/test_cases/arc4_types/out/array.O1.log index 308a6173f1..2225d8ccb7 100644 --- a/test_cases/arc4_types/out/array.O1.log +++ b/test_cases/arc4_types/out/array.O1.log @@ -5,7 +5,7 @@ PC Teal Stack 49 byte "" 0, 0x 50 dupn 2 0, 0x, 0x, 0x 52 int 0 0, 0x, 0x, 0x, 0 -53 int 0 0, 0x, 0x, 0x, 0, 0 +53 dup 0, 0x, 0x, 0x, 0, 0 54 dup 0, 0x, 0x, 0x, 0, 0, 0 55 int 2 0, 0x, 0x, 0x, 0, 0, 0, 2 56 < 0, 0x, 0x, 0x, 0, 0, 1 diff --git a/test_cases/arc4_types/out/array.O2.log b/test_cases/arc4_types/out/array.O2.log index 308a6173f1..2225d8ccb7 100644 --- a/test_cases/arc4_types/out/array.O2.log +++ b/test_cases/arc4_types/out/array.O2.log @@ -5,7 +5,7 @@ PC Teal Stack 49 byte "" 0, 0x 50 dupn 2 0, 0x, 0x, 0x 52 int 0 0, 0x, 0x, 0x, 0 -53 int 0 0, 0x, 0x, 0x, 0, 0 +53 dup 0, 0x, 0x, 0x, 0, 0 54 dup 0, 0x, 0x, 0x, 0, 0, 0 55 int 2 0, 0x, 0x, 0x, 0, 0, 0, 2 56 < 0, 0x, 0x, 0x, 0, 0, 1 diff --git a/test_cases/arc4_types/out/structs.O1.log b/test_cases/arc4_types/out/structs.O1.log index 80123ca85b..3c3224f447 100644 --- a/test_cases/arc4_types/out/structs.O1.log +++ b/test_cases/arc4_types/out/structs.O1.log @@ -1,9 +1,9 @@ PC Teal Stack 1 6 -29 byte "" 0x -31 byte 0x000000083cfbf217000000230384b842 0x, 0x000000083CFBF217000000230384B842 -32 byte 0x000000083cfbf217000000230384b842 0x, 0x000000083CFBF217000000230384B842, 0x000000083CFBF217000000230384B842 +12 byte "" 0x +14 byte 0x000000083cfbf217000000230384b842 0x, 0x000000083CFBF217000000230384B842 +32 dup 0x, 0x000000083CFBF217000000230384B842, 0x000000083CFBF217000000230384B842 33 callsub add 0x, 0x000000083CFBF217000000230384B842, 0x000000083CFBF217000000230384B842 100 proto 2 3 0x, 0x000000083CFBF217000000230384B842, 0x000000083CFBF217000000230384B842 103 frame_dig -2 0x, 0x000000083CFBF217000000230384B842, 0x000000083CFBF217000000230384B842, 0x000000083CFBF217000000230384B842 diff --git a/test_cases/arc4_types/out/structs.O2.log b/test_cases/arc4_types/out/structs.O2.log index 80123ca85b..3c3224f447 100644 --- a/test_cases/arc4_types/out/structs.O2.log +++ b/test_cases/arc4_types/out/structs.O2.log @@ -1,9 +1,9 @@ PC Teal Stack 1 6 -29 byte "" 0x -31 byte 0x000000083cfbf217000000230384b842 0x, 0x000000083CFBF217000000230384B842 -32 byte 0x000000083cfbf217000000230384b842 0x, 0x000000083CFBF217000000230384B842, 0x000000083CFBF217000000230384B842 +12 byte "" 0x +14 byte 0x000000083cfbf217000000230384b842 0x, 0x000000083CFBF217000000230384B842 +32 dup 0x, 0x000000083CFBF217000000230384B842, 0x000000083CFBF217000000230384B842 33 callsub add 0x, 0x000000083CFBF217000000230384B842, 0x000000083CFBF217000000230384B842 100 proto 2 3 0x, 0x000000083CFBF217000000230384B842, 0x000000083CFBF217000000230384B842 103 frame_dig -2 0x, 0x000000083CFBF217000000230384B842, 0x000000083CFBF217000000230384B842, 0x000000083CFBF217000000230384B842 diff --git a/test_cases/arc4_types/out_O2/Arc4ArraysContract.approval.teal b/test_cases/arc4_types/out_O2/Arc4ArraysContract.approval.teal index 935e4651e1..35a61053ba 100644 --- a/test_cases/arc4_types/out_O2/Arc4ArraysContract.approval.teal +++ b/test_cases/arc4_types/out_O2/Arc4ArraysContract.approval.teal @@ -5,7 +5,7 @@ test_cases.arc4_types.array.Arc4ArraysContract.approval_program: byte "" dupn 2 int 0 - int 0 + dup main_for_header@1: dup diff --git a/test_cases/arc4_types/out_O2/Arc4BoolEvalContract.approval.teal b/test_cases/arc4_types/out_O2/Arc4BoolEvalContract.approval.teal index 0899a16ca0..b8ebfff45b 100644 --- a/test_cases/arc4_types/out_O2/Arc4BoolEvalContract.approval.teal +++ b/test_cases/arc4_types/out_O2/Arc4BoolEvalContract.approval.teal @@ -2,7 +2,7 @@ test_cases.arc4_types.bool_eval.Arc4BoolEvalContract.approval_program: global ZeroAddress - global ZeroAddress + dup == assert txn Sender diff --git a/test_cases/arc4_types/out_O2/Arc4DynamicBytesContract.approval.teal b/test_cases/arc4_types/out_O2/Arc4DynamicBytesContract.approval.teal index 61b65a697e..bc232301c5 100644 --- a/test_cases/arc4_types/out_O2/Arc4DynamicBytesContract.approval.teal +++ b/test_cases/arc4_types/out_O2/Arc4DynamicBytesContract.approval.teal @@ -4,7 +4,7 @@ test_cases.arc4_types.dynamic_bytes.Arc4DynamicBytesContract.approval_program: byte "" dup int 0 - int 0 + dup main_for_header@1: dup diff --git a/test_cases/arc4_types/out_O2/Arc4RefTypesContract.approval.teal b/test_cases/arc4_types/out_O2/Arc4RefTypesContract.approval.teal index e0b93f06d1..ba86b89090 100644 --- a/test_cases/arc4_types/out_O2/Arc4RefTypesContract.approval.teal +++ b/test_cases/arc4_types/out_O2/Arc4RefTypesContract.approval.teal @@ -2,10 +2,7 @@ test_cases.arc4_types.reference_types.Arc4RefTypesContract.approval_program: txn Sender - txn Sender - dup - cover 2 - dup + dupn 3 len int 32 == diff --git a/test_cases/arc4_types/out_O2/Arc4StructsTypeContract.approval.teal b/test_cases/arc4_types/out_O2/Arc4StructsTypeContract.approval.teal index 3d524d183a..5d82a2dfcd 100644 --- a/test_cases/arc4_types/out_O2/Arc4StructsTypeContract.approval.teal +++ b/test_cases/arc4_types/out_O2/Arc4StructsTypeContract.approval.teal @@ -3,7 +3,7 @@ test_cases.arc4_types.structs.Arc4StructsTypeContract.approval_program: byte "" byte 0x000000083cfbf217000000230384b842 - byte 0x000000083cfbf217000000230384b842 + dup callsub add popn 2 dup diff --git a/test_cases/boolean_binary_ops/out/BooleanBinaryOps.approval.teal b/test_cases/boolean_binary_ops/out/BooleanBinaryOps.approval.teal index 1df1613e9b..64420aea63 100644 --- a/test_cases/boolean_binary_ops/out/BooleanBinaryOps.approval.teal +++ b/test_cases/boolean_binary_ops/out/BooleanBinaryOps.approval.teal @@ -38,13 +38,13 @@ test_boolean_binary_ops: // boolean_binary_ops/contract.py:18 // assert true and true frame_dig -2 - frame_dig -2 + dup && assert // boolean_binary_ops/contract.py:19 // assert not (false and false) frame_dig -1 - frame_dig -1 + dup && ! assert @@ -63,13 +63,13 @@ test_boolean_binary_ops: // boolean_binary_ops/contract.py:23 // assert true or true frame_dig -2 - frame_dig -2 + dup || assert // boolean_binary_ops/contract.py:24 // assert not (false or false) frame_dig -1 - frame_dig -1 + dup || ! assert diff --git a/test_cases/boolean_binary_ops/out_O2/BooleanBinaryOps.approval.teal b/test_cases/boolean_binary_ops/out_O2/BooleanBinaryOps.approval.teal index 3bed323ef8..c960c33a06 100644 --- a/test_cases/boolean_binary_ops/out_O2/BooleanBinaryOps.approval.teal +++ b/test_cases/boolean_binary_ops/out_O2/BooleanBinaryOps.approval.teal @@ -23,11 +23,11 @@ test_boolean_binary_ops: ! assert frame_dig -2 - frame_dig -2 + dup && assert frame_dig -1 - frame_dig -1 + dup && ! assert @@ -40,11 +40,11 @@ test_boolean_binary_ops: || assert frame_dig -2 - frame_dig -2 + dup || assert frame_dig -1 - frame_dig -1 + dup || ! assert diff --git a/test_cases/contains/out/MyContract.approval.teal b/test_cases/contains/out/MyContract.approval.teal index a4086a8cef..ae9eefbb97 100644 --- a/test_cases/contains/out/MyContract.approval.teal +++ b/test_cases/contains/out/MyContract.approval.teal @@ -4,7 +4,7 @@ test_cases.contains.contract.MyContract.approval_program: // contains/contract.py:10 // one_true = self.is_in_tuple_1(UInt64(10), (UInt64(10), not_ten, Bytes(b"five"))) int 10 - int 10 + dup // contains/contract.py:8 // not_ten = UInt64(15) int 15 @@ -34,7 +34,7 @@ test_cases.contains.contract.MyContract.approval_program: // contains/contract.py:16 // Bytes(b"hello"), (Bytes(b"hello"), UInt64(0), Bytes(b"bonjour")) byte "hello" - byte "hello" + dup int 0 byte "bonjour" // contains/contract.py:15-17 @@ -64,7 +64,7 @@ test_cases.contains.contract.MyContract.approval_program: // contains/contract.py:25 // BigUInt(32323423423423), (BigUInt(32323423423423), BigUInt(8439439483934)) byte 0x1d65e22bcbbf - byte 0x1d65e22bcbbf + dup byte 0x07acf5cae41e // contains/contract.py:24-26 // three_true = self.is_in_tuple_3( diff --git a/test_cases/contains/out_O2/MyContract.approval.teal b/test_cases/contains/out_O2/MyContract.approval.teal index b8a20946eb..9c28408a46 100644 --- a/test_cases/contains/out_O2/MyContract.approval.teal +++ b/test_cases/contains/out_O2/MyContract.approval.teal @@ -2,7 +2,7 @@ test_cases.contains.contract.MyContract.approval_program: int 10 - int 10 + dup int 15 byte "five" callsub is_in_tuple_1 @@ -16,7 +16,7 @@ test_cases.contains.contract.MyContract.approval_program: ! assert // Should be false byte "hello" - byte "hello" + dup int 0 byte "bonjour" callsub is_in_tuple_2 @@ -30,7 +30,7 @@ test_cases.contains.contract.MyContract.approval_program: ! assert // Should be false byte 0x1d65e22bcbbf - byte 0x1d65e22bcbbf + dup byte 0x07acf5cae41e callsub is_in_tuple_3 byte 0x3acbc457977e diff --git a/test_cases/everything/out/MyContract.approval.teal b/test_cases/everything/out/MyContract.approval.teal index 56e18a04a4..14aee6919a 100644 --- a/test_cases/everything/out/MyContract.approval.teal +++ b/test_cases/everything/out/MyContract.approval.teal @@ -178,7 +178,7 @@ register: // everything/contract.py:51 // sender_name, sender_name_existed = self.name.maybe(account=0) int 0 - int 0 + dup byte "name" app_local_get_ex bury 1 @@ -231,7 +231,7 @@ say_hello: // everything/contract.py:59 // name, exists = self.name.maybe(account=0) int 0 - int 0 + dup byte "name" app_local_get_ex // everything/contract.py:60 diff --git a/test_cases/everything/out/MyContract.arc32.json b/test_cases/everything/out/MyContract.arc32.json index a426773249..3bfb1bd5a9 100644 --- a/test_cases/everything/out/MyContract.arc32.json +++ b/test_cases/everything/out/MyContract.arc32.json @@ -28,7 +28,7 @@ } }, "source": { - "approval": "I3ByYWdtYSB2ZXJzaW9uIDEwCgp0ZXN0X2Nhc2VzLmV2ZXJ5dGhpbmcuY29udHJhY3QuRXZlcnl0aGluZy5hcHByb3ZhbF9wcm9ncmFtOgogICAgLy8gZXZlcnl0aGluZy9jb250cmFjdC5weTozNwogICAgLy8gY2xhc3MgRXZlcnl0aGluZyhBUkM0Q29udHJhY3QsIE15TWlkZGxlQmFzZSwgbmFtZT0iTXlDb250cmFjdCIpOgogICAgbWV0aG9kICJjcmVhdGUoKXZvaWQiCiAgICBtZXRob2QgInJlZ2lzdGVyKHN0cmluZyl2b2lkIgogICAgbWV0aG9kICJzYXlfaGVsbG8oKXN0cmluZyIKICAgIG1ldGhvZCAiY2FsY3VsYXRlKHVpbnQ2NCx1aW50NjQpdWludDY0IgogICAgbWV0aG9kICJjbG9zZV9vdXQoKXZvaWQiCiAgICB0eG5hIEFwcGxpY2F0aW9uQXJncyAwCiAgICBtYXRjaCBtYWluX2NyZWF0ZV9yb3V0ZUAxIG1haW5fcmVnaXN0ZXJfcm91dGVAMiBtYWluX3NheV9oZWxsb19yb3V0ZUAzIG1haW5fY2FsY3VsYXRlX3JvdXRlQDQgbWFpbl9jbG9zZV9vdXRfcm91dGVANQogICAgZXJyIC8vIHJlamVjdCB0cmFuc2FjdGlvbgoKbWFpbl9jcmVhdGVfcm91dGVAMToKICAgIC8vIGV2ZXJ5dGhpbmcvY29udHJhY3QucHk6NDEKICAgIC8vIEBhYmltZXRob2QoY3JlYXRlPVRydWUpCiAgICB0eG4gT25Db21wbGV0aW9uCiAgICAhCiAgICBhc3NlcnQgLy8gT25Db21wbGV0aW9uIGlzIE5vT3AKICAgIHR4biBBcHBsaWNhdGlvbklECiAgICAhCiAgICBhc3NlcnQ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gICAvLyBldmVyeXRoaW5nL2NvbnRyYWN0LnB5OjgxLTgyCiAgICAvLyBAc3Vicm91dGluZQogICAgLy8gZGVmIF9yZW1vdmVfc2VuZGVyKHNlbGYpIC0+IE5vbmU6CiAgICBwcm90byAwIDAKICAgIC8vIGV2ZXJ5dGhpbmcvY29udHJhY3QucHk6ODMKICAgIC8vIHNlbGYuY291bnRlciAtPSBwb3NpdGl2ZV9vbmUoKQogICAgaW50IDAKICAgIGJ5dGUgImNvdW50ZXIiCiAgICBhcHBfZ2xvYmFsX2dldF9leAogICAgYXNzZXJ0IC8vIGNoZWNrIGNvdW50ZXIgZXhpc3RzCiAgICBjYWxsc3ViIHBvc2l0aXZlX29uZQogICAgLQogICAgYnl0ZSAiY291bnRlciIKICAgIHN3YXAKICAgIGFwcF9nbG9iYWxfcHV0CiAgICByZXRzdWIKCgovLyB0ZXN0X2Nhc2VzLmV2ZXJ5dGhpbmcuY29udHJhY3QucG9zaXRpdmVfb25lKCkgLT4gdWludDY0Ogpwb3NpdGl2ZV9vbmU6CiAgICAvLyBldmVyeXRoaW5nL2NvbnRyYWN0LnB5Ojg2LTg3CiAgICAvLyBAc3Vicm91dGluZQogICAgLy8gZGVmIHBvc2l0aXZlX29uZSgpIC0+IFVJbnQ2NDoKICAgIHByb3RvIDAgMQogICAgLy8gZXZlcnl0aGluZy9jb250cmFjdC5weTo4OAogICAgLy8gcmV0dXJuIFVJbnQ2NCgxKQogICAgaW50IDEKICAgIHJldHN1Ygo=" }, "state": { diff --git a/test_cases/everything/out_O2/MyContract.approval.teal b/test_cases/everything/out_O2/MyContract.approval.teal index bd5f8f6e3d..5ef78eecc5 100644 --- a/test_cases/everything/out_O2/MyContract.approval.teal +++ b/test_cases/everything/out_O2/MyContract.approval.teal @@ -123,7 +123,7 @@ register: == bz register_after_if_else@4 int 0 - int 0 + dup byte "name" app_local_get_ex bury 1 @@ -158,7 +158,7 @@ say_hello: proto 0 1 callsub _check_ban_list int 0 - int 0 + dup byte "name" app_local_get_ex bnz say_hello_after_if_else@2 diff --git a/test_cases/inner_transactions/out/MyContract.approval.teal b/test_cases/inner_transactions/out/MyContract.approval.teal index d2f13907fc..e4814b1fa9 100644 --- a/test_cases/inner_transactions/out/MyContract.approval.teal +++ b/test_cases/inner_transactions/out/MyContract.approval.teal @@ -93,7 +93,7 @@ test1: global CurrentApplicationAddress // inner_transactions/contract.py:51 // reserve=op.Global.current_application_address, - global CurrentApplicationAddress + dup // inner_transactions/contract.py:54 // self.name = Bytes(b"AST2") byte "name" diff --git a/test_cases/inner_transactions/out/itxn_loop.approval.teal b/test_cases/inner_transactions/out/itxn_loop.approval.teal index 7d57d2833f..586dca1577 100644 --- a/test_cases/inner_transactions/out/itxn_loop.approval.teal +++ b/test_cases/inner_transactions/out/itxn_loop.approval.teal @@ -11,7 +11,7 @@ test_cases.inner_transactions.itxn_loop.MyContract.approval_program: int 0 // inner_transactions/itxn_loop.py:28 // for i in urange(4): - int 0 + dup main_for_header@1: // inner_transactions/itxn_loop.py:28 diff --git a/test_cases/inner_transactions/out_O2/MyContract.approval.teal b/test_cases/inner_transactions/out_O2/MyContract.approval.teal index 161c0eca27..d6a4a21472 100644 --- a/test_cases/inner_transactions/out_O2/MyContract.approval.teal +++ b/test_cases/inner_transactions/out_O2/MyContract.approval.teal @@ -48,7 +48,7 @@ test1: app_global_get_ex assert // check name exists global CurrentApplicationAddress - global CurrentApplicationAddress + dup byte "name" byte "AST2" app_global_put diff --git a/test_cases/inner_transactions/out_O2/itxn_loop.approval.teal b/test_cases/inner_transactions/out_O2/itxn_loop.approval.teal index 0392faa8c4..2a3e52cb4c 100644 --- a/test_cases/inner_transactions/out_O2/itxn_loop.approval.teal +++ b/test_cases/inner_transactions/out_O2/itxn_loop.approval.teal @@ -5,7 +5,7 @@ test_cases.inner_transactions.itxn_loop.MyContract.approval_program: dupn 3 byte "" int 0 - int 0 + dup main_for_header@1: dup diff --git a/test_cases/intrinsics/out/ImmediateVariants.approval.teal b/test_cases/intrinsics/out/ImmediateVariants.approval.teal index 1e84c96ba5..67e9ca4b77 100644 --- a/test_cases/intrinsics/out/ImmediateVariants.approval.teal +++ b/test_cases/intrinsics/out/ImmediateVariants.approval.teal @@ -49,7 +49,7 @@ test_cases.intrinsics.immediate_variants.ImmediateVariants.approval_program: // intrinsics/immediate_variants.py:27 // assert GTxn.application_args(UInt64(0), UInt64(0)) == first_arg int 0 - int 0 + dup gtxnsas ApplicationArgs dig 1 == diff --git a/test_cases/intrinsics/out_O2/ImmediateVariants.approval.teal b/test_cases/intrinsics/out_O2/ImmediateVariants.approval.teal index a877bf2a22..7434484116 100644 --- a/test_cases/intrinsics/out_O2/ImmediateVariants.approval.teal +++ b/test_cases/intrinsics/out_O2/ImmediateVariants.approval.teal @@ -31,7 +31,7 @@ test_cases.intrinsics.immediate_variants.ImmediateVariants.approval_program: == assert int 0 - int 0 + dup gtxnsas ApplicationArgs dig 1 == diff --git a/test_cases/less_simple/out/MyContract.approval.teal b/test_cases/less_simple/out/MyContract.approval.teal index 09c881e5b0..47c3014fbf 100644 --- a/test_cases/less_simple/out/MyContract.approval.teal +++ b/test_cases/less_simple/out/MyContract.approval.teal @@ -9,7 +9,7 @@ test_cases.less_simple.contract.MyContract.approval_program: int 0 // less_simple/contract.py:11 // product_of_odds = UInt64(0) - int 0 + dup main_while_top@1: // less_simple/contract.py:12 diff --git a/test_cases/less_simple/out_O2/MyContract.approval.teal b/test_cases/less_simple/out_O2/MyContract.approval.teal index 021ef5f2db..dc6bdbf315 100644 --- a/test_cases/less_simple/out_O2/MyContract.approval.teal +++ b/test_cases/less_simple/out_O2/MyContract.approval.teal @@ -3,7 +3,7 @@ test_cases.less_simple.contract.MyContract.approval_program: int 1 int 0 - int 0 + dup main_while_top@1: dig 2 diff --git a/test_cases/log/out/MyContract.approval.teal b/test_cases/log/out/MyContract.approval.teal index ba3ac845e4..c6d4f11bfd 100644 --- a/test_cases/log/out/MyContract.approval.teal +++ b/test_cases/log/out/MyContract.approval.teal @@ -2,10 +2,9 @@ test_cases.log.contract.MyContract.approval_program: int 0 - dupn 2 // log/contract.py:6 // log(0) - int 0 + dupn 3 itob log // log/contract.py:7 diff --git a/test_cases/log/out_O2/MyContract.approval.teal b/test_cases/log/out_O2/MyContract.approval.teal index 02a1fbca04..972175f377 100644 --- a/test_cases/log/out_O2/MyContract.approval.teal +++ b/test_cases/log/out_O2/MyContract.approval.teal @@ -2,8 +2,7 @@ test_cases.log.contract.MyContract.approval_program: int 0 - dupn 2 - int 0 + dupn 3 itob log byte "1" diff --git a/test_cases/nested_loops/out/Nested.approval.teal b/test_cases/nested_loops/out/Nested.approval.teal index 679dcdc480..f7f6a2ad24 100644 --- a/test_cases/nested_loops/out/Nested.approval.teal +++ b/test_cases/nested_loops/out/Nested.approval.teal @@ -8,7 +8,7 @@ test_cases.nested_loops.contract.Nested.approval_program: int 0 // nested_loops/contract.py:11 // for a in urange(n): - int 0 + dup main_for_header@1: // nested_loops/contract.py:11 @@ -184,7 +184,7 @@ main_after_for@30: // nested_loops/contract.py:25 // for index, item in uenumerate(urange(UInt64(10))): int 0 - int 0 + dup bury 6 bury 4 diff --git a/test_cases/nested_loops/out_O2/Nested.approval.teal b/test_cases/nested_loops/out_O2/Nested.approval.teal index c13f79a93f..81dec8f51c 100644 --- a/test_cases/nested_loops/out_O2/Nested.approval.teal +++ b/test_cases/nested_loops/out_O2/Nested.approval.teal @@ -4,7 +4,7 @@ test_cases.nested_loops.contract.Nested.approval_program: byte "" dupn 7 int 0 - int 0 + dup main_for_header@1: dup @@ -114,7 +114,7 @@ main_after_for@30: int 0 bury 3 int 0 - int 0 + dup bury 6 bury 4 diff --git a/test_cases/reversed_iteration/out/MyContract.approval.teal b/test_cases/reversed_iteration/out/MyContract.approval.teal index de49303e23..027cb87499 100644 --- a/test_cases/reversed_iteration/out/MyContract.approval.teal +++ b/test_cases/reversed_iteration/out/MyContract.approval.teal @@ -8,7 +8,7 @@ test_cases.reversed_iteration.contract.MyContract.approval_program: int 0 // reversed_iteration/contract.py:11 // for x in reversed(arc4.StaticArray[arc4.UInt8, typing.Literal[0]]()): - int 0 + dup main_for_header@7: // reversed_iteration/contract.py:11 diff --git a/test_cases/reversed_iteration/out/trace.O1.log b/test_cases/reversed_iteration/out/trace.O1.log index 00f2fcb517..e1b04307d7 100644 --- a/test_cases/reversed_iteration/out/trace.O1.log +++ b/test_cases/reversed_iteration/out/trace.O1.log @@ -6,7 +6,7 @@ PC Teal Stack 32 byte "" 0, 0, 0, 0, 0x 33 dupn 11 0, 0, 0, 0, 0x, 0x, 0x, 0x, 0x, 0x, 0x, 0x, 0x, 0x, 0x, 0x 35 int 0 0, 0, 0, 0, 0x, 0x, 0x, 0x, 0x, 0x, 0x, 0x, 0x, 0x, 0x, 0x, 0 -36 int 0 0, 0, 0, 0, 0x, 0x, 0x, 0x, 0x, 0x, 0x, 0x, 0x, 0x, 0x, 0x, 0, 0 +36 dup 0, 0, 0, 0, 0x, 0x, 0x, 0x, 0x, 0x, 0x, 0x, 0x, 0x, 0x, 0x, 0, 0 37 dig 1 0, 0, 0, 0, 0x, 0x, 0x, 0x, 0x, 0x, 0x, 0x, 0x, 0x, 0x, 0x, 0, 0, 0 39 int 0 0, 0, 0, 0, 0x, 0x, 0x, 0x, 0x, 0x, 0x, 0x, 0x, 0x, 0x, 0x, 0, 0, 0, 0 40 < 0, 0, 0, 0, 0x, 0x, 0x, 0x, 0x, 0x, 0x, 0x, 0x, 0x, 0x, 0x, 0, 0, 0 diff --git a/test_cases/reversed_iteration/out/trace.O2.log b/test_cases/reversed_iteration/out/trace.O2.log index 00f2fcb517..e1b04307d7 100644 --- a/test_cases/reversed_iteration/out/trace.O2.log +++ b/test_cases/reversed_iteration/out/trace.O2.log @@ -6,7 +6,7 @@ PC Teal Stack 32 byte "" 0, 0, 0, 0, 0x 33 dupn 11 0, 0, 0, 0, 0x, 0x, 0x, 0x, 0x, 0x, 0x, 0x, 0x, 0x, 0x, 0x 35 int 0 0, 0, 0, 0, 0x, 0x, 0x, 0x, 0x, 0x, 0x, 0x, 0x, 0x, 0x, 0x, 0 -36 int 0 0, 0, 0, 0, 0x, 0x, 0x, 0x, 0x, 0x, 0x, 0x, 0x, 0x, 0x, 0x, 0, 0 +36 dup 0, 0, 0, 0, 0x, 0x, 0x, 0x, 0x, 0x, 0x, 0x, 0x, 0x, 0x, 0x, 0, 0 37 dig 1 0, 0, 0, 0, 0x, 0x, 0x, 0x, 0x, 0x, 0x, 0x, 0x, 0x, 0x, 0x, 0, 0, 0 39 int 0 0, 0, 0, 0, 0x, 0x, 0x, 0x, 0x, 0x, 0x, 0x, 0x, 0x, 0x, 0x, 0, 0, 0, 0 40 < 0, 0, 0, 0, 0x, 0x, 0x, 0x, 0x, 0x, 0x, 0x, 0x, 0x, 0x, 0x, 0, 0, 0 diff --git a/test_cases/reversed_iteration/out_O2/MyContract.approval.teal b/test_cases/reversed_iteration/out_O2/MyContract.approval.teal index a29c985a3d..ed01a918a9 100644 --- a/test_cases/reversed_iteration/out_O2/MyContract.approval.teal +++ b/test_cases/reversed_iteration/out_O2/MyContract.approval.teal @@ -6,7 +6,7 @@ test_cases.reversed_iteration.contract.MyContract.approval_program: byte "" dupn 11 int 0 - int 0 + dup main_for_header@7: dig 1 diff --git a/test_cases/too_many_permutations/out/MyContract.approval.teal b/test_cases/too_many_permutations/out/MyContract.approval.teal index 2e9de4a447..13b4b5cfa3 100644 --- a/test_cases/too_many_permutations/out/MyContract.approval.teal +++ b/test_cases/too_many_permutations/out/MyContract.approval.teal @@ -4,20 +4,21 @@ test_cases.too_many_permutations.contract.MyContract.approval_program: // too_many_permutations/contract.py:6 // a = op.Txn.application_args(0) txna ApplicationArgs 0 - dup // too_many_permutations/contract.py:7 // b = op.Txn.application_args(1) txna ApplicationArgs 1 - swap // too_many_permutations/contract.py:8 // c = op.Txn.application_args(2) txna ApplicationArgs 2 - dup - cover 2 // too_many_permutations/contract.py:9 // d = op.Txn.application_args(3) txna ApplicationArgs 3 - cover 2 + // too_many_permutations/contract.py:6 + // a = op.Txn.application_args(0) + txna ApplicationArgs 0 + // too_many_permutations/contract.py:8 + // c = op.Txn.application_args(2) + txna ApplicationArgs 2 // too_many_permutations/contract.py:11 // assert (a != c) or (b != d) != diff --git a/test_cases/too_many_permutations/out_O2/MyContract.approval.teal b/test_cases/too_many_permutations/out_O2/MyContract.approval.teal index f14e5e12b3..e87c5040bf 100644 --- a/test_cases/too_many_permutations/out_O2/MyContract.approval.teal +++ b/test_cases/too_many_permutations/out_O2/MyContract.approval.teal @@ -2,14 +2,11 @@ test_cases.too_many_permutations.contract.MyContract.approval_program: txna ApplicationArgs 0 - dup txna ApplicationArgs 1 - swap txna ApplicationArgs 2 - dup - cover 2 txna ApplicationArgs 3 - cover 2 + txna ApplicationArgs 0 + txna ApplicationArgs 2 != bnz main_bool_true@2 dig 2 diff --git a/test_cases/tuple_support/out/TupleSupport.approval.teal b/test_cases/tuple_support/out/TupleSupport.approval.teal index f7cde5e3c9..a1cdccbb37 100644 --- a/test_cases/tuple_support/out/TupleSupport.approval.teal +++ b/test_cases/tuple_support/out/TupleSupport.approval.teal @@ -42,7 +42,7 @@ main_entrypoint@2: // tuple_support/tuple_support.py:34 // max_uint64 = UInt64(2**64 - 1) int 18446744073709551615 - int 18446744073709551615 + dup // tuple_support/tuple_support.py:35 // hi, mid, lo = addw2(op.addw(max_uint64, max_uint64), op.addw(a, b)) addw diff --git a/test_cases/tuple_support/out_O2/TupleSupport.approval.teal b/test_cases/tuple_support/out_O2/TupleSupport.approval.teal index c00b9f71ce..689fa3c871 100644 --- a/test_cases/tuple_support/out_O2/TupleSupport.approval.teal +++ b/test_cases/tuple_support/out_O2/TupleSupport.approval.teal @@ -26,7 +26,7 @@ main_entrypoint@2: callsub bytes_combine log int 18446744073709551615 - int 18446744073709551615 + dup addw uncover 3 uncover 3 diff --git a/test_cases/undefined_phi_args/out/Baddie.approval.teal b/test_cases/undefined_phi_args/out/Baddie.approval.teal index e042bdf575..407a45536a 100644 --- a/test_cases/undefined_phi_args/out/Baddie.approval.teal +++ b/test_cases/undefined_phi_args/out/Baddie.approval.teal @@ -103,7 +103,7 @@ main_else_body@12: // undefined_phi_args/baddie.py:23 // assert test_uint_undefined(True, True) == 8 int 1 - int 1 + dup callsub test_uint_undefined int 8 == @@ -111,7 +111,7 @@ main_else_body@12: // undefined_phi_args/baddie.py:24 // assert test_uint_undefined(False, False) == 10 int 0 - int 0 + dup callsub test_uint_undefined int 10 == @@ -128,7 +128,7 @@ main_else_body@14: // undefined_phi_args/baddie.py:26 // assert test_bytes_undefined(True, True) == 8 int 1 - int 1 + dup callsub test_bytes_undefined byte 0x08 b== @@ -136,7 +136,7 @@ main_else_body@14: // undefined_phi_args/baddie.py:27 // assert test_bytes_undefined(False, False) == 10 int 0 - int 0 + dup callsub test_bytes_undefined byte 0x0a b== @@ -147,7 +147,7 @@ main_else_body@16: // undefined_phi_args/baddie.py:29 // assert test_mixed_undefined(True, True) == 8 int 1 - int 1 + dup callsub test_mixed_undefined byte 0x08 b== @@ -155,7 +155,7 @@ main_else_body@16: // undefined_phi_args/baddie.py:30 // assert test_mixed_undefined(False, False) == 10 int 0 - int 0 + dup callsub test_mixed_undefined byte 0x0a b== diff --git a/test_cases/undefined_phi_args/out_O2/Baddie.approval.teal b/test_cases/undefined_phi_args/out_O2/Baddie.approval.teal index 89fab29738..3d3deb7869 100644 --- a/test_cases/undefined_phi_args/out_O2/Baddie.approval.teal +++ b/test_cases/undefined_phi_args/out_O2/Baddie.approval.teal @@ -77,13 +77,13 @@ main_else_body@12: == bz main_else_body@14 int 1 - int 1 + dup callsub test_uint_undefined int 8 == assert int 0 - int 0 + dup callsub test_uint_undefined int 10 == @@ -96,13 +96,13 @@ main_else_body@14: == bz main_else_body@16 int 1 - int 1 + dup callsub test_bytes_undefined byte 0x08 b== assert int 0 - int 0 + dup callsub test_bytes_undefined byte 0x0a b== @@ -111,13 +111,13 @@ main_else_body@14: main_else_body@16: int 1 - int 1 + dup callsub test_mixed_undefined byte 0x08 b== assert int 0 - int 0 + dup callsub test_mixed_undefined byte 0x0a b==