diff --git a/examples/sizes.txt b/examples/sizes.txt index b3746ff545..98530d79bc 100644 --- a/examples/sizes.txt +++ b/examples/sizes.txt @@ -26,8 +26,9 @@ asset/Reference 272 225 - | 146 131 - auction/Auction 593 506 467 | 323 273 259 augmented_assignment/Augmented 241 228 - | 143 135 - - avm_11 181 140 133 | 121 87 84 - avm_11/avm_11_sig 6 - - | 4 - - + avm_11 171 130 123 | 114 80 77 + avm_12 92 72 65 | 51 38 35 + avm_12/avm_12_sig 6 - - | 4 - - avm_types_in_abi/Test 380 308 279 | 233 173 160 biguint_binary_ops/BiguintBinaryOps 186 8 - | 100 4 - boolean_binary_ops/BooleanBinaryOps 1098 261 - | 666 136 - @@ -136,4 +137,4 @@ unssa/UnSSA 420 266 - | 237 153 - voting/VotingRoundApp 1584 1426 1415 | 725 624 625 with_reentrancy/WithReentrancy 245 214 - | 126 108 - - Total 70327 39009 36124 | 33189 18196 16926 \ No newline at end of file + Total 70409 39071 36179 | 33233 18227 16954 \ No newline at end of file diff --git a/langspec.json b/langspec.json index 43d5d2e526..3475ecfa19 100644 --- a/langspec.json +++ b/langspec.json @@ -1,6 +1,6 @@ { - "Version": 11, - "LogicSigVersion": 10, + "Version": 12, + "LogicSigVersion": 11, "NamedTypes": [ { "Name": "[]byte", @@ -1628,8 +1628,8 @@ "Whether block proposal payouts are enabled.", "The fee required in a keyreg transaction to make an account incentive eligible.", "The percentage of transaction fees in a block that can be paid to the block proposer.", - "The minimum algo balance an account must have in the agreement round to receive block payouts in the proposal round.", - "The maximum algo balance an account can have in the agreement round to receive block payouts in the proposal round." + "The minimum balance an account must have in the agreement round to receive block payouts in the proposal round.", + "The maximum balance an account can have in the agreement round to receive block payouts in the proposal round." ], "ArgEnumTypes": [ "uint64", @@ -4482,7 +4482,7 @@ 2 ], "ArgEnumVersion": [ - 6, + 11, 11 ], "DocCost": "1", @@ -4663,7 +4663,7 @@ "Size": 1, "DocCost": "1700", "Doc": "for (data A, compressed-format signature B, pubkey C) verify the signature of data against the pubkey", - "IntroducedVersion": 11, + "IntroducedVersion": 12, "Groups": [ "Cryptography" ], @@ -4682,7 +4682,7 @@ "Size": 1, "DocCost": "150 + 7 per 4 bytes of A", "Doc": "sumhash512 of value A, yields [64]byte", - "IntroducedVersion": 11, + "IntroducedVersion": 12, "Groups": [ "Cryptography" ], @@ -7820,6 +7820,54 @@ "Cryptography" ], "Modes": 3 + }, + { + "Opcode": 230, + "Name": "mimc", + "Cost": "BN254Mp110=10 + 550 per 32 bytes of A; BLS12_381Mp111=10 + 550 per 32 bytes of A", + "Args": [ + "[]byte" + ], + "Returns": [ + "[32]byte" + ], + "Size": 2, + "ArgEnum": [ + "BN254Mp110", + "BLS12_381Mp111" + ], + "ArgEnumDoc": [ + "MiMC configuration for the BN254 curve with Miyaguchi-Preneel mode, 110 rounds, exponent 5, seed \"seed\"", + "MiMC configuration for the BLS12-381 curve with Miyaguchi-Preneel mode, 111 rounds, exponent 5, seed \"seed\"" + ], + "ArgEnumBytes": [ + 0, + 1 + ], + "ArgModes": [ + 0, + 0 + ], + "ArgEnumVersion": [ + 11, + 11 + ], + "DocCost": "BN254Mp110=10 + 550 per 32 bytes of A; BLS12_381Mp111=10 + 550 per 32 bytes of A", + "Doc": "MiMC hash of scalars A, using curve and parameters specified by configuration C", + "DocExtra": "A is a list of concatenated 32 byte big-endian unsigned integer scalars. Fail if A's length is not a multiple of 32 or any element exceeds the curve modulus.\n\nThe MiMC hash function has known collisions since any input which is a multiple of the elliptic curve modulus will hash to the same value. MiMC is thus not a general purpose hash function, but meant to be used in zero knowledge applications to match a zk-circuit implementation.", + "ImmediateNote": [ + { + "Comment": "configuration index", + "Encoding": "uint8", + "Name": "C", + "Reference": "Mimc Configurations" + } + ], + "IntroducedVersion": 11, + "Groups": [ + "Cryptography" + ], + "Modes": 3 } ] } diff --git a/langspec.puya.json b/langspec.puya.json index 1a0c87c210..c6f1741307 100644 --- a/langspec.puya.json +++ b/langspec.puya.json @@ -4090,7 +4090,7 @@ "value": 1700, "doc": "1700" }, - "min_avm_version": 11, + "min_avm_version": 12, "halts": false, "mode": "any", "groups": [ @@ -5616,6 +5616,51 @@ ], "stack_outputs": [] }, + "mimc": { + "name": "mimc", + "code": 230, + "size": 2, + "doc": [ + "MiMC hash of scalars A, using curve and parameters specified by configuration C", + "A is a list of concatenated 32 byte big-endian unsigned integer scalars. Fail if A's length is not a multiple of 32 or any element exceeds the curve modulus.", + "", + "The MiMC hash function has known collisions since any input which is a multiple of the elliptic curve modulus will hash to the same value. MiMC is thus not a general purpose hash function, but meant to be used in zero knowledge applications to match a zk-circuit implementation." + ], + "cost": { + "value": null, + "doc": "BN254Mp110=10 + 550 per 32 bytes of A; BLS12_381Mp111=10 + 550 per 32 bytes of A" + }, + "min_avm_version": 11, + "halts": false, + "mode": "any", + "groups": [ + "Cryptography" + ], + "stack_inputs": [ + { + "name": "A", + "stack_type": "[]byte", + "doc": null + } + ], + "immediate_args": [ + { + "name": "C", + "immediate_type": "arg_enum", + "arg_enum": "Mimc Configurations", + "modifies_stack_input": null, + "modifies_stack_output": null, + "doc": "configuration index" + } + ], + "stack_outputs": [ + { + "name": "X", + "stack_type": "[32]byte", + "doc": null + } + ] + }, "min_balance": { "name": "min_balance", "code": 120, @@ -6603,7 +6648,7 @@ "value": null, "doc": "150 + 7 per 4 bytes of A" }, - "min_avm_version": 11, + "min_avm_version": 12, "halts": false, "mode": "any", "groups": [ @@ -8324,7 +8369,7 @@ }, { "name": "PayoutsMinBalance", - "doc": "The minimum algo balance an account must have in the agreement round to receive block payouts in the proposal round.", + "doc": "The minimum balance an account must have in the agreement round to receive block payouts in the proposal round.", "stack_type": "uint64", "mode": "any", "value": 21, @@ -8332,7 +8377,7 @@ }, { "name": "PayoutsMaxBalance", - "doc": "The maximum algo balance an account can have in the agreement round to receive block payouts in the proposal round.", + "doc": "The maximum balance an account can have in the agreement round to receive block payouts in the proposal round.", "stack_type": "uint64", "mode": "any", "value": 22, @@ -8775,6 +8820,24 @@ "min_avm_version": 7 } ], + "Mimc Configurations": [ + { + "name": "BN254Mp110", + "doc": "MiMC configuration for the BN254 curve with Miyaguchi-Preneel mode, 110 rounds, exponent 5, seed \"seed\"", + "stack_type": null, + "mode": "any", + "value": 0, + "min_avm_version": 11 + }, + { + "name": "BLS12_381Mp111", + "doc": "MiMC configuration for the BLS12-381 curve with Miyaguchi-Preneel mode, 111 rounds, exponent 5, seed \"seed\"", + "stack_type": null, + "mode": "any", + "value": 1, + "min_avm_version": 11 + } + ], "voter_params": [ { "name": "VoterBalance", @@ -8782,7 +8845,7 @@ "stack_type": "uint64", "mode": "app", "value": 0, - "min_avm_version": 6 + "min_avm_version": 11 }, { "name": "VoterIncentiveEligible", diff --git a/scripts/generate_stubs.py b/scripts/generate_stubs.py index f8d2db4699..945cf3f8d2 100755 --- a/scripts/generate_stubs.py +++ b/scripts/generate_stubs.py @@ -31,7 +31,9 @@ VCS_ROOT = Path(__file__).parent.parent MIN_SUPPORTED_VERSION = min(SUPPORTED_AVM_VERSIONS) - +PYTHON_ENUM_CLASS = { + "Mimc Configurations": "MiMCConfigurations", +} PYTYPE_TO_LITERAL: dict[pytypes.PyType, pytypes.LiteralOnlyType | None] = { pytypes.BytesType: pytypes.BytesLiteralType, pytypes.UInt64Type: pytypes.IntLiteralType, @@ -602,6 +604,10 @@ def get_op_doc(op: Op) -> list[str]: def get_python_enum_class(arg_enum: str) -> str: + try: + return PYTHON_ENUM_CLASS[arg_enum] + except KeyError: + pass # don't change acronyms if arg_enum.isupper(): return arg_enum diff --git a/src/puya/algo_constants.py b/src/puya/algo_constants.py index ecf5da255e..5e7e7d6162 100644 --- a/src/puya/algo_constants.py +++ b/src/puya/algo_constants.py @@ -19,6 +19,6 @@ # Which language versions does this version of puya support targeting # This will typically just be the current mainnet version and potentially the vNext if it doesn't # contain breaking changes -SUPPORTED_AVM_VERSIONS = [10, 11] +SUPPORTED_AVM_VERSIONS = [10, 11, 12] # Which language version is currently deployed to mainnet MAINNET_AVM_VERSION = 10 diff --git a/src/puya/ir/avm_ops.py b/src/puya/ir/avm_ops.py index 41004ac5ff..9bcd09814e 100644 --- a/src/puya/ir/avm_ops.py +++ b/src/puya/ir/avm_ops.py @@ -1952,11 +1952,11 @@ def get_variant(self, immediates: Sequence[str | int]) -> Variant: ), enum=None, supported_modes=RunMode.any, - min_avm_version=11, + min_avm_version=12, ), immediate_types=(), cost=1700, - min_avm_version=11, + min_avm_version=12, supported_modes=RunMode.any, ) """ @@ -5151,6 +5151,31 @@ def get_variant(self, immediates: Sequence[str | int]) -> Variant: integers """ + mimc = AVMOpData( + op_code="mimc", + variants=Variant( + signature=OpSignature(args=[StackType.bytes], returns=[StackType.bytes]), + enum=None, + supported_modes=RunMode.any, + min_avm_version=11, + ), + immediate_types=(ImmediateKind.arg_enum,), + cost=None, + min_avm_version=11, + supported_modes=RunMode.any, + ) + """ + MiMC hash of scalars A, using curve and parameters specified by configuration C + + A is a list of concatenated 32 byte big-endian unsigned integer scalars. Fail if A's length is + not a multiple of 32 or any element exceeds the curve modulus. + + + The MiMC hash function has known collisions since any input which is a multiple of the elliptic + curve modulus will hash to the same value. MiMC is thus not a general purpose hash function, + but meant to be used in zero knowledge applications to match a zk-circuit implementation. + """ + min_balance = AVMOpData( op_code="min_balance", variants=Variant( @@ -5696,11 +5721,11 @@ def get_variant(self, immediates: Sequence[str | int]) -> Variant: signature=OpSignature(args=[StackType.bytes], returns=[StackType.bytes]), enum=None, supported_modes=RunMode.any, - min_avm_version=11, + min_avm_version=12, ), immediate_types=(), cost=None, - min_avm_version=11, + min_avm_version=12, supported_modes=RunMode.any, ) """ @@ -6263,7 +6288,7 @@ def get_variant(self, immediates: Sequence[str | int]) -> Variant: ), enum="VoterBalance", supported_modes=RunMode.app, - min_avm_version=6, + min_avm_version=11, ), "VoterIncentiveEligible": Variant( signature=OpSignature( diff --git a/src/puya/ussemble/op_spec.py b/src/puya/ussemble/op_spec.py index c073a81b9e..2fef8fa9bb 100644 --- a/src/puya/ussemble/op_spec.py +++ b/src/puya/ussemble/op_spec.py @@ -986,4 +986,9 @@ ImmediateEnum(codes={"BN254g1": 0, "BN254g2": 1, "BLS12_381g1": 2, "BLS12_381g2": 3}) ], ), + "mimc": OpSpec( + name="mimc", + code=230, + immediates=[ImmediateEnum(codes={"BN254Mp110": 0, "BLS12_381Mp111": 1})], + ), } diff --git a/src/puyapy/awst_build/intrinsic_data.py b/src/puyapy/awst_build/intrinsic_data.py index b43e6b158e..1d6b2fad07 100644 --- a/src/puyapy/awst_build/intrinsic_data.py +++ b/src/puyapy/awst_build/intrinsic_data.py @@ -23,6 +23,10 @@ Secp256k1="Secp256k1", Secp256r1="Secp256r1", ), + MiMCConfigurations=dict( + BN254Mp110="BN254Mp110", + BLS12_381Mp111="BLS12_381Mp111", + ), VrfVerify=dict( VrfAlgorand="VrfAlgorand", ), @@ -429,6 +433,17 @@ ), ], ), + mimc=OpMappingWithOverloads( + result=pytypes.BytesType, + arity=2, + overloads=[ + FunctionOpMapping( + "mimc", + immediates=[str], + args=[0, (pytypes.BytesType,)], + ), + ], + ), min_balance=OpMappingWithOverloads( result=pytypes.UInt64Type, arity=1, diff --git a/src/puyapy/compile.py b/src/puyapy/compile.py index b0ba595fb7..201dfb8053 100644 --- a/src/puyapy/compile.py +++ b/src/puyapy/compile.py @@ -33,7 +33,7 @@ # this should contain the lowest version number that this compiler does NOT support # i.e. the next minor version after what is defined in stubs/pyproject.toml:tool.poetry.version -MAX_SUPPORTED_ALGOPY_VERSION_EX = version.parse("2.5.0") +MAX_SUPPORTED_ALGOPY_VERSION_EX = version.parse("2.6.0") MIN_SUPPORTED_ALGOPY_VERSION = version.parse(f"{MAX_SUPPORTED_ALGOPY_VERSION_EX.major}.0.0") logger = log.get_logger(__name__) diff --git a/stubs/algopy-stubs/op.pyi b/stubs/algopy-stubs/op.pyi index 9841754f47..dbe6d32884 100644 --- a/stubs/algopy-stubs/op.pyi +++ b/stubs/algopy-stubs/op.pyi @@ -49,6 +49,20 @@ class ECDSA(str): secp256r1 curve, NIST standard """ +class MiMCConfigurations(str): + """Available values for the `Mimc Configurations` enum""" + + BN254Mp110: MiMCConfigurations = ... + """ + MiMC configuration for the BN254 curve with Miyaguchi-Preneel mode, 110 rounds, exponent 5, seed "seed" + Min AVM version: 11 + """ + BLS12_381Mp111: MiMCConfigurations = ... + """ + MiMC configuration for the BLS12-381 curve with Miyaguchi-Preneel mode, 111 rounds, exponent 5, seed "seed" + Min AVM version: 11 + """ + class VrfVerify(str): """Available values for the `vrf_verify` enum""" @@ -265,7 +279,7 @@ def extract_uint64(a: Bytes | bytes, b: UInt64 | int, /) -> UInt64: def falcon_verify(a: Bytes | bytes, b: Bytes | bytes, c: Bytes | bytes, /) -> bool: """ for (data A, compressed-format signature B, pubkey C) verify the signature of data against the pubkey - Min AVM version: 11 + Min AVM version: 12 Native TEAL opcode: [`falcon_verify`](https://developer.algorand.org/docs/get-details/dapps/avm/teal/opcodes/v10/#falcon_verify) """ @@ -321,6 +335,18 @@ def keccak256(a: Bytes | bytes, /) -> Bytes: Native TEAL opcode: [`keccak256`](https://developer.algorand.org/docs/get-details/dapps/avm/teal/opcodes/v10/#keccak256) """ +def mimc(c: MiMCConfigurations, a: Bytes | bytes, /) -> Bytes: + """ + MiMC hash of scalars A, using curve and parameters specified by configuration C + A is a list of concatenated 32 byte big-endian unsigned integer scalars. Fail if A's length is not a multiple of 32 or any element exceeds the curve modulus. + + The MiMC hash function has known collisions since any input which is a multiple of the elliptic curve modulus will hash to the same value. MiMC is thus not a general purpose hash function, but meant to be used in zero knowledge applications to match a zk-circuit implementation. + Min AVM version: 11 + :param MiMCConfigurations c: configuration index + + Native TEAL opcode: [`mimc`](https://developer.algorand.org/docs/get-details/dapps/avm/teal/opcodes/v10/#mimc) + """ + def min_balance(a: Account | UInt64 | int, /) -> UInt64: """ minimum required balance for account A, in microalgos. Required balance is affected by ASA, App, and Box usage. When creating or opting into an app, the minimum balance grows before the app code runs, therefore the increase is visible there. When deleting or closing out, the minimum balance decreases after the app executes. Changes caused by inner transactions or box usage are observable immediately following the opcode effecting the change. @@ -441,7 +467,7 @@ def substring(a: Bytes | bytes, b: UInt64 | int, c: UInt64 | int, /) -> Bytes: def sumhash512(a: Bytes | bytes, /) -> Bytes: """ sumhash512 of value A, yields [64]byte - Min AVM version: 11 + Min AVM version: 12 Native TEAL opcode: [`sumhash512`](https://developer.algorand.org/docs/get-details/dapps/avm/teal/opcodes/v10/#sumhash512) """ @@ -2437,13 +2463,13 @@ class Global: payouts_min_balance: typing.Final[UInt64] = ... """ - The minimum algo balance an account must have in the agreement round to receive block payouts in the proposal round. + The minimum balance an account must have in the agreement round to receive block payouts in the proposal round. Min AVM version: 11 """ payouts_max_balance: typing.Final[UInt64] = ... """ - The maximum algo balance an account can have in the agreement round to receive block payouts in the proposal round. + The maximum balance an account can have in the agreement round to receive block payouts in the proposal round. Min AVM version: 11 """ diff --git a/stubs/pyproject.toml b/stubs/pyproject.toml index 6bd385f72e..59bb1bf33f 100644 --- a/stubs/pyproject.toml +++ b/stubs/pyproject.toml @@ -3,7 +3,7 @@ name = "algorand-python" # this version represents the version of the stub API's and should follow semver semantics # when updating this value also update src/compile.py:MAX_SUPPORTED_ALGOPY_VERSION_EX if it is a major/minor change # also see stubs/README.md#versioning -version = "2.4.1" +version = "2.5.0" description = "API for writing Algorand Python Smart contracts" authors = ["Algorand Foundation "] readme = "README.md" diff --git a/test_cases/avm_11/contract.py b/test_cases/avm_11/contract.py index e74a5f7b30..d49a8db8af 100644 --- a/test_cases/avm_11/contract.py +++ b/test_cases/avm_11/contract.py @@ -1,18 +1,12 @@ -from algopy import ARC4Contract, Txn, UInt64, arc4, logicsig, op - - -@logicsig(avm_version=11) -def avm_11_sig() -> UInt64: - return op.sumhash512(b"").length +from algopy import ARC4Contract, Txn, arc4, op class Contract(ARC4Contract, avm_version=11): @arc4.abimethod def test_new_ops(self) -> None: # op functions - assert not op.falcon_verify(b"", b"", op.bzero(1793)) - assert op.sumhash512(b"") assert op.online_stake() + assert op.mimc(op.MiMCConfigurations.BN254Mp110, op.bzero(32)) # AcctParamsGet, TODO: add to Account once 11 is in mainnet? a, b = op.AcctParamsGet.acct_incentive_eligible(Txn.sender) diff --git a/test_cases/avm_11/out/Contract.approval.puya.map b/test_cases/avm_11/out/Contract.approval.puya.map index 5a0f5a7fee..7bdc8eea64 100644 --- a/test_cases/avm_11/out/Contract.approval.puya.map +++ b/test_cases/avm_11/out/Contract.approval.puya.map @@ -3,7 +3,7 @@ "sources": [ "../contract.py" ], - "mappings": ";;;;;AAQA;;AAAA;;;AAAA;;;;;;AAAA;;;AAAA;;;;AAAA;;AACK;;AAAA;AAAA;AAAA;;AAAA;AAAA;;;AAAA;;AADL;;AAAA;;;;;;;;;AACA;;;AAGuD;;;AAAT;AAAV;;AAAK;AAAtB;;AAAA;AAAJ;AAAP;AACqB;;AAAd;AAAA;AAAP;AACO;AAAP;AAQiC;AAAtB;;AAAJ;;AAAA;AAAP;AACmC;AAA5B;;AAAP;AAC0B;AAAnB;;AAAP;AAC2B;AAApB;;AAAA;AAAP;AAC6B;AAAtB;;AAAA;;AAAA;AAAP;AAC6B;AAAtB;;AAAA;AAAP;AACgC;AAAzB;;AAAP;AACoC;AAA7B;;AAAP;AAGO;;AAAP;AACO;;AAAP;AACO;;AAAP;AACO;;AAAP;AACO;;AAAP;AAGuC;AAAhC;;AAAA;;AAC2C;AAA3C;;AAAA;;", + "mappings": ";;;;;AAGA;;AAAA;;;AAAA;;;;;;AAAA;;;AAAA;;;;AAAA;;AACK;;AAAA;AAAA;AAAA;;AAAA;AAAA;;;AAAA;;AADL;;AAAA;;;;;;;;;AACA;;;AAGe;AAAP;AAC0D;;AAAT;AAA1C;;AAAA;AAAP;AAQiC;AAAtB;;AAAJ;;AAAA;AAAP;AACmC;AAA5B;;AAAP;AAC0B;AAAnB;;AAAP;AAC2B;AAApB;;AAAA;AAAP;AAC6B;AAAtB;;AAAA;;AAAA;AAAP;AAC6B;AAAtB;;AAAA;AAAP;AACgC;AAAzB;;AAAP;AACoC;AAA7B;;AAAP;AAGO;;AAAP;AACO;;AAAP;AACO;;AAAP;AACO;;AAAP;AACO;;AAAP;AAGuC;AAAhC;;AAAA;;AAC2C;AAA3C;;AAAA;;", "op_pc_offset": 0, "pc_events": { "1": { @@ -143,16 +143,7 @@ "op": "proto 0 0" }, "51": { - "op": "pushint 1793 // 1793", - "defined_out": [ - "1793" - ], - "stack_out": [ - "1793" - ] - }, - "54": { - "op": "bzero", + "op": "online_stake", "defined_out": [ "tmp%0#0" ], @@ -160,44 +151,21 @@ "tmp%0#0" ] }, - "55": { - "op": "pushbytes 0x", - "defined_out": [ - "0x", - "tmp%0#0" - ], - "stack_out": [ - "tmp%0#0", - "0x" - ] - }, - "57": { - "op": "dup", - "stack_out": [ - "tmp%0#0", - "0x", - "0x" - ] - }, - "58": { - "op": "uncover 2", - "stack_out": [ - "0x", - "0x", - "tmp%0#0" - ] + "52": { + "op": "assert", + "stack_out": [] }, - "60": { - "op": "falcon_verify", + "53": { + "op": "pushint 32 // 32", "defined_out": [ - "tmp%1#0" + "32" ], "stack_out": [ - "tmp%1#0" + "32" ] }, - "61": { - "op": "!", + "55": { + "op": "bzero", "defined_out": [ "tmp%2#0" ], @@ -205,18 +173,8 @@ "tmp%2#0" ] }, - "62": { - "op": "assert", - "stack_out": [] - }, - "63": { - "op": "pushbytes 0x", - "stack_out": [ - "0x" - ] - }, - "65": { - "op": "sumhash512", + "56": { + "op": "mimc BN254Mp110", "defined_out": [ "tmp%3#0" ], @@ -224,7 +182,7 @@ "tmp%3#0" ] }, - "66": { + "58": { "op": "len", "defined_out": [ "tmp%4#0" @@ -233,24 +191,11 @@ "tmp%4#0" ] }, - "67": { - "op": "assert", - "stack_out": [] - }, - "68": { - "op": "online_stake", - "defined_out": [ - "tmp%6#0" - ], - "stack_out": [ - "tmp%6#0" - ] - }, - "69": { + "59": { "op": "assert", "stack_out": [] }, - "70": { + "60": { "op": "intc_0 // 0", "defined_out": [ "0" @@ -259,295 +204,295 @@ "0" ] }, - "71": { + "61": { "op": "block BlkProposer", "defined_out": [ - "tmp%11#0" + "tmp%9#0" ], "stack_out": [ - "tmp%11#0" + "tmp%9#0" ] }, - "73": { + "63": { "op": "global ZeroAddress", "defined_out": [ - "tmp%11#0", - "tmp%12#0" + "tmp%10#0", + "tmp%9#0" ], "stack_out": [ - "tmp%11#0", - "tmp%12#0" + "tmp%9#0", + "tmp%10#0" ] }, - "75": { + "65": { "op": "==", "defined_out": [ - "tmp%13#0" + "tmp%11#0" ], "stack_out": [ - "tmp%13#0" + "tmp%11#0" ] }, - "76": { + "66": { "error": "proposer", "op": "assert // proposer", "stack_out": [] }, - "77": { + "67": { "op": "intc_0 // 0", "stack_out": [ "0" ] }, - "78": { + "68": { "op": "block BlkFeesCollected", "defined_out": [ - "tmp%14#0" + "tmp%12#0" ], "stack_out": [ - "tmp%14#0" + "tmp%12#0" ] }, - "80": { + "70": { "error": "fees collected", "op": "assert // fees collected", "stack_out": [] }, - "81": { + "71": { "op": "intc_0 // 0", "stack_out": [ "0" ] }, - "82": { + "72": { "op": "block BlkBonus", "defined_out": [ - "tmp%16#0" + "tmp%14#0" ], "stack_out": [ - "tmp%16#0" + "tmp%14#0" ] }, - "84": { + "74": { "error": "bonus", "op": "assert // bonus", "stack_out": [] }, - "85": { + "75": { "op": "intc_0 // 0", "stack_out": [ "0" ] }, - "86": { + "76": { "op": "block BlkBranch", "defined_out": [ - "tmp%18#0" + "tmp%16#0" ], "stack_out": [ - "tmp%18#0" + "tmp%16#0" ] }, - "88": { + "78": { "op": "len", "defined_out": [ - "tmp%19#0" + "tmp%17#0" ], "stack_out": [ - "tmp%19#0" + "tmp%17#0" ] }, - "89": { + "79": { "error": "branch", "op": "assert // branch", "stack_out": [] }, - "90": { + "80": { "op": "intc_0 // 0", "stack_out": [ "0" ] }, - "91": { + "81": { "op": "block BlkFeeSink", "defined_out": [ - "tmp%21#0" + "tmp%19#0" ], "stack_out": [ - "tmp%21#0" + "tmp%19#0" ] }, - "93": { + "83": { "op": "global ZeroAddress", "defined_out": [ - "tmp%21#0", - "tmp%22#0" + "tmp%19#0", + "tmp%20#0" ], "stack_out": [ - "tmp%21#0", - "tmp%22#0" + "tmp%19#0", + "tmp%20#0" ] }, - "95": { + "85": { "op": "!=", "defined_out": [ - "tmp%23#0" + "tmp%21#0" ], "stack_out": [ - "tmp%23#0" + "tmp%21#0" ] }, - "96": { + "86": { "error": "fee sink", "op": "assert // fee sink", "stack_out": [] }, - "97": { + "87": { "op": "intc_0 // 0", "stack_out": [ "0" ] }, - "98": { + "88": { "op": "block BlkProtocol", "defined_out": [ - "tmp%24#0" + "tmp%22#0" ], "stack_out": [ - "tmp%24#0" + "tmp%22#0" ] }, - "100": { + "90": { "op": "len", "defined_out": [ - "tmp%25#0" + "tmp%23#0" ], "stack_out": [ - "tmp%25#0" + "tmp%23#0" ] }, - "101": { + "91": { "error": "protocol", "op": "assert // protocol", "stack_out": [] }, - "102": { + "92": { "op": "intc_0 // 0", "stack_out": [ "0" ] }, - "103": { + "93": { "op": "block BlkTxnCounter", "defined_out": [ - "tmp%27#0" + "tmp%25#0" ], "stack_out": [ - "tmp%27#0" + "tmp%25#0" ] }, - "105": { + "95": { "error": "txn counter", "op": "assert // txn counter", "stack_out": [] }, - "106": { + "96": { "op": "intc_0 // 0", "stack_out": [ "0" ] }, - "107": { + "97": { "op": "block BlkProposerPayout", "defined_out": [ - "tmp%29#0" + "tmp%27#0" ], "stack_out": [ - "tmp%29#0" + "tmp%27#0" ] }, - "109": { + "99": { "error": "proposer payout", "op": "assert // proposer payout", "stack_out": [] }, - "110": { + "100": { "op": "global PayoutsEnabled", "defined_out": [ - "tmp%31#0" + "tmp%29#0" ], "stack_out": [ - "tmp%31#0" + "tmp%29#0" ] }, - "112": { + "102": { "error": "payouts_enabled", "op": "assert // payouts_enabled", "stack_out": [] }, - "113": { + "103": { "op": "global PayoutsGoOnlineFee", "defined_out": [ - "tmp%32#0" + "tmp%30#0" ], "stack_out": [ - "tmp%32#0" + "tmp%30#0" ] }, - "115": { + "105": { "error": "payouts_go_online_fee", "op": "assert // payouts_go_online_fee", "stack_out": [] }, - "116": { + "106": { "op": "global PayoutsPercent", "defined_out": [ - "tmp%34#0" + "tmp%32#0" ], "stack_out": [ - "tmp%34#0" + "tmp%32#0" ] }, - "118": { + "108": { "error": "payouts_percent", "op": "assert // payouts_percent", "stack_out": [] }, - "119": { + "109": { "op": "global PayoutsMinBalance", "defined_out": [ - "tmp%36#0" + "tmp%34#0" ], "stack_out": [ - "tmp%36#0" + "tmp%34#0" ] }, - "121": { + "111": { "error": "payouts_min_balance", "op": "assert // payouts_min_balance", "stack_out": [] }, - "122": { + "112": { "op": "global PayoutsMaxBalance", "defined_out": [ - "tmp%38#0" + "tmp%36#0" ], "stack_out": [ - "tmp%38#0" + "tmp%36#0" ] }, - "124": { + "114": { "error": "payouts_max_balance", "op": "assert // payouts_max_balance", "stack_out": [] }, - "125": { + "115": { "op": "intc_0 // 0", "stack_out": [ "0" ] }, - "126": { + "116": { "op": "voter_params_get VoterBalance", "defined_out": [ "g#0", @@ -558,17 +503,17 @@ "h#0" ] }, - "128": { + "118": { "op": "popn 2", "stack_out": [] }, - "130": { + "120": { "op": "intc_0 // 0", "stack_out": [ "0" ] }, - "131": { + "121": { "op": "voter_params_get VoterIncentiveEligible", "defined_out": [ "i#0", @@ -579,11 +524,11 @@ "j#0" ] }, - "133": { + "123": { "op": "popn 2", "stack_out": [] }, - "135": { + "125": { "retsub": true, "op": "retsub" } diff --git a/test_cases/avm_11/out/Contract.approval.teal b/test_cases/avm_11/out/Contract.approval.teal index b9a5d2000d..ebe56eb545 100644 --- a/test_cases/avm_11/out/Contract.approval.teal +++ b/test_cases/avm_11/out/Contract.approval.teal @@ -4,7 +4,7 @@ // algopy.arc4.ARC4Contract.approval_program() -> uint64: main: intcblock 0 1 - // avm_11/contract.py:9 + // avm_11/contract.py:4 // class Contract(ARC4Contract, avm_version=11): txn NumAppArgs bz main_bare_routing@6 @@ -13,13 +13,13 @@ main: match main_test_new_ops_route@3 main_after_if_else@10: - // avm_11/contract.py:9 + // avm_11/contract.py:4 // class Contract(ARC4Contract, avm_version=11): intc_0 // 0 return main_test_new_ops_route@3: - // avm_11/contract.py:10 + // avm_11/contract.py:5 // @arc4.abimethod txn OnCompletion ! @@ -31,7 +31,7 @@ main_test_new_ops_route@3: return main_bare_routing@6: - // avm_11/contract.py:9 + // avm_11/contract.py:4 // class Contract(ARC4Contract, avm_version=11): txn OnCompletion bnz main_after_if_else@10 @@ -44,32 +44,23 @@ main_bare_routing@6: // test_cases.avm_11.contract.Contract.test_new_ops() -> void: test_new_ops: - // avm_11/contract.py:10-11 + // avm_11/contract.py:5-6 // @arc4.abimethod // def test_new_ops(self) -> None: proto 0 0 - // avm_11/contract.py:12-13 + // avm_11/contract.py:7-8 // # op functions - // assert not op.falcon_verify(b"", b"", op.bzero(1793)) - pushint 1793 // 1793 - bzero - pushbytes 0x - dup - uncover 2 - falcon_verify - ! - assert - // avm_11/contract.py:14 - // assert op.sumhash512(b"") - pushbytes 0x - sumhash512 - len - assert - // avm_11/contract.py:15 // assert op.online_stake() online_stake assert - // avm_11/contract.py:22-23 + // avm_11/contract.py:9 + // assert op.mimc(op.MiMCConfigurations.BN254Mp110, op.bzero(32)) + pushint 32 // 32 + bzero + mimc BN254Mp110 + len + assert + // avm_11/contract.py:16-17 // # Block // assert not op.Block.blk_proposer(0), "proposer" intc_0 // 0 @@ -77,73 +68,73 @@ test_new_ops: global ZeroAddress == assert // proposer - // avm_11/contract.py:24 + // avm_11/contract.py:18 // assert op.Block.blk_fees_collected(0), "fees collected" intc_0 // 0 block BlkFeesCollected assert // fees collected - // avm_11/contract.py:25 + // avm_11/contract.py:19 // assert op.Block.blk_bonus(0), "bonus" intc_0 // 0 block BlkBonus assert // bonus - // avm_11/contract.py:26 + // avm_11/contract.py:20 // assert op.Block.blk_branch(0), "branch" intc_0 // 0 block BlkBranch len assert // branch - // avm_11/contract.py:27 + // avm_11/contract.py:21 // assert op.Block.blk_fee_sink(0), "fee sink" intc_0 // 0 block BlkFeeSink global ZeroAddress != assert // fee sink - // avm_11/contract.py:28 + // avm_11/contract.py:22 // assert op.Block.blk_protocol(0), "protocol" intc_0 // 0 block BlkProtocol len assert // protocol - // avm_11/contract.py:29 + // avm_11/contract.py:23 // assert op.Block.blk_txn_counter(0), "txn counter" intc_0 // 0 block BlkTxnCounter assert // txn counter - // avm_11/contract.py:30 + // avm_11/contract.py:24 // assert op.Block.blk_proposer_payout(0), "proposer payout" intc_0 // 0 block BlkProposerPayout assert // proposer payout - // avm_11/contract.py:32-33 + // avm_11/contract.py:26-27 // # Global // assert op.Global.payouts_enabled, "payouts_enabled" global PayoutsEnabled assert // payouts_enabled - // avm_11/contract.py:34 + // avm_11/contract.py:28 // assert op.Global.payouts_go_online_fee, "payouts_go_online_fee" global PayoutsGoOnlineFee assert // payouts_go_online_fee - // avm_11/contract.py:35 + // avm_11/contract.py:29 // assert op.Global.payouts_percent, "payouts_percent" global PayoutsPercent assert // payouts_percent - // avm_11/contract.py:36 + // avm_11/contract.py:30 // assert op.Global.payouts_min_balance, "payouts_min_balance" global PayoutsMinBalance assert // payouts_min_balance - // avm_11/contract.py:37 + // avm_11/contract.py:31 // assert op.Global.payouts_max_balance, "payouts_max_balance" global PayoutsMaxBalance assert // payouts_max_balance - // avm_11/contract.py:39-40 + // avm_11/contract.py:33-34 // # Voter params // g, h = op.VoterParamsGet.voter_balance(0) intc_0 // 0 voter_params_get VoterBalance popn 2 - // avm_11/contract.py:41 + // avm_11/contract.py:35 // i, j = op.VoterParamsGet.voter_incentive_eligible(0) intc_0 // 0 voter_params_get VoterIncentiveEligible diff --git a/test_cases/avm_11/out/Contract.arc32.json b/test_cases/avm_11/out/Contract.arc32.json index 6754afed38..d994a87542 100644 --- a/test_cases/avm_11/out/Contract.arc32.json +++ b/test_cases/avm_11/out/Contract.arc32.json @@ -7,7 +7,7 @@ } }, "source": { - "approval": "I3ByYWdtYSB2ZXJzaW9uIDExCiNwcmFnbWEgdHlwZXRyYWNrIGZhbHNlCgovLyBhbGdvcHkuYXJjNC5BUkM0Q29udHJhY3QuYXBwcm92YWxfcHJvZ3JhbSgpIC0+IHVpbnQ2NDoKbWFpbjoKICAgIGludGNibG9jayAwIDEKICAgIC8vIGF2bV8xMS9jb250cmFjdC5weTo5CiAgICAvLyBjbGFzcyBDb250cmFjdChBUkM0Q29udHJhY3QsIGF2bV92ZXJzaW9uPTExKToKICAgIHR4biBOdW1BcHBBcmdzCiAgICBieiBtYWluX2JhcmVfcm91dGluZ0A2CiAgICBwdXNoYnl0ZXMgMHhjMmI4ZGQ4YSAvLyBtZXRob2QgInRlc3RfbmV3X29wcygpdm9pZCIKICAgIHR4bmEgQXBwbGljYXRpb25BcmdzIDAKICAgIG1hdGNoIG1haW5fdGVzdF9uZXdfb3BzX3JvdXRlQDMKCm1haW5fYWZ0ZXJfaWZfZWxzZUAxMDoKICAgIC8vIGF2bV8xMS9jb250cmFjdC5weTo5CiAgICAvLyBjbGFzcyBDb250cmFjdChBUkM0Q29udHJhY3QsIGF2bV92ZXJzaW9uPTExKToKICAgIGludGNfMCAvLyAwCiAgICByZXR1cm4KCm1haW5fdGVzdF9uZXdfb3BzX3JvdXRlQDM6CiAgICAvLyBhdm1fMTEvY29udHJhY3QucHk6MTAKICAgIC8vIEBhcmM0LmFiaW1ldGhvZAogICAgdHhuIE9uQ29tcGxldGlvbgogICAgIQogICAgYXNzZXJ0IC8vIE9uQ29tcGxldGlvbiBpcyBub3QgTm9PcAogICAgdHhuIEFwcGxpY2F0aW9uSUQKICAgIGFzc2VydCAvLyBjYW4gb25seSBjYWxsIHdoZW4gbm90IGNyZWF0aW5nCiAgICBjYWxsc3ViIHRlc3RfbmV3X29wcwogICAgaW50Y18xIC8vIDEKICAgIHJldHVybgoKbWFpbl9iYXJlX3JvdXRpbmdANjoKICAgIC8vIGF2bV8xMS9jb250cmFjdC5weTo5CiAgICAvLyBjbGFzcyBDb250cmFjdChBUkM0Q29udHJhY3QsIGF2bV92ZXJzaW9uPTExKToKICAgIHR4biBPbkNvbXBsZXRpb24KICAgIGJueiBtYWluX2FmdGVyX2lmX2Vsc2VAMTAKICAgIHR4biBBcHBsaWNhdGlvbklECiAgICAhCiAgICBhc3NlcnQgLy8gY2FuIG9ubHkgY2FsbCB3aGVuIGNyZWF0aW5nCiAgICBpbnRjXzEgLy8gMQogICAgcmV0dXJuCgoKLy8gdGVzdF9jYXNlcy5hdm1fMTEuY29udHJhY3QuQ29udHJhY3QudGVzdF9uZXdfb3BzKCkgLT4gdm9pZDoKdGVzdF9uZXdfb3BzOgogICAgLy8gYXZtXzExL2NvbnRyYWN0LnB5OjEwLTExCiAgICAvLyBAYXJjNC5hYmltZXRob2QKICAgIC8vIGRlZiB0ZXN0X25ld19vcHMoc2VsZikgLT4gTm9uZToKICAgIHByb3RvIDAgMAogICAgLy8gYXZtXzExL2NvbnRyYWN0LnB5OjEyLTEzCiAgICAvLyAjIG9wIGZ1bmN0aW9ucwogICAgLy8gYXNzZXJ0IG5vdCBvcC5mYWxjb25fdmVyaWZ5KGIiIiwgYiIiLCBvcC5iemVybygxNzkzKSkKICAgIHB1c2hpbnQgMTc5MyAvLyAxNzkzCiAgICBiemVybwogICAgcHVzaGJ5dGVzIDB4CiAgICBkdXAKICAgIHVuY292ZXIgMgogICAgZmFsY29uX3ZlcmlmeQogICAgIQogICAgYXNzZXJ0CiAgICAvLyBhdm1fMTEvY29udHJhY3QucHk6MTQKICAgIC8vIGFzc2VydCBvcC5zdW1oYXNoNTEyKGIiIikKICAgIHB1c2hieXRlcyAweAogICAgc3VtaGFzaDUxMgogICAgbGVuCiAgICBhc3NlcnQKICAgIC8vIGF2bV8xMS9jb250cmFjdC5weToxNQogICAgLy8gYXNzZXJ0IG9wLm9ubGluZV9zdGFrZSgpCiAgICBvbmxpbmVfc3Rha2UKICAgIGFzc2VydAogICAgLy8gYXZtXzExL2NvbnRyYWN0LnB5OjIyLTIzCiAgICAvLyAjIEJsb2NrCiAgICAvLyBhc3NlcnQgbm90IG9wLkJsb2NrLmJsa19wcm9wb3NlcigwKSwgInByb3Bvc2VyIgogICAgaW50Y18wIC8vIDAKICAgIGJsb2NrIEJsa1Byb3Bvc2VyCiAgICBnbG9iYWwgWmVyb0FkZHJlc3MKICAgID09CiAgICBhc3NlcnQgLy8gcHJvcG9zZXIKICAgIC8vIGF2bV8xMS9jb250cmFjdC5weToyNAogICAgLy8gYXNzZXJ0IG9wLkJsb2NrLmJsa19mZWVzX2NvbGxlY3RlZCgwKSwgImZlZXMgY29sbGVjdGVkIgogICAgaW50Y18wIC8vIDAKICAgIGJsb2NrIEJsa0ZlZXNDb2xsZWN0ZWQKICAgIGFzc2VydCAvLyBmZWVzIGNvbGxlY3RlZAogICAgLy8gYXZtXzExL2NvbnRyYWN0LnB5OjI1CiAgICAvLyBhc3NlcnQgb3AuQmxvY2suYmxrX2JvbnVzKDApLCAiYm9udXMiCiAgICBpbnRjXzAgLy8gMAogICAgYmxvY2sgQmxrQm9udXMKICAgIGFzc2VydCAvLyBib251cwogICAgLy8gYXZtXzExL2NvbnRyYWN0LnB5OjI2CiAgICAvLyBhc3NlcnQgb3AuQmxvY2suYmxrX2JyYW5jaCgwKSwgImJyYW5jaCIKICAgIGludGNfMCAvLyAwCiAgICBibG9jayBCbGtCcmFuY2gKICAgIGxlbgogICAgYXNzZXJ0IC8vIGJyYW5jaAogICAgLy8gYXZtXzExL2NvbnRyYWN0LnB5OjI3CiAgICAvLyBhc3NlcnQgb3AuQmxvY2suYmxrX2ZlZV9zaW5rKDApLCAiZmVlIHNpbmsiCiAgICBpbnRjXzAgLy8gMAogICAgYmxvY2sgQmxrRmVlU2luawogICAgZ2xvYmFsIFplcm9BZGRyZXNzCiAgICAhPQogICAgYXNzZXJ0IC8vIGZlZSBzaW5rCiAgICAvLyBhdm1fMTEvY29udHJhY3QucHk6MjgKICAgIC8vIGFzc2VydCBvcC5CbG9jay5ibGtfcHJvdG9jb2woMCksICJwcm90b2NvbCIKICAgIGludGNfMCAvLyAwCiAgICBibG9jayBCbGtQcm90b2NvbAogICAgbGVuCiAgICBhc3NlcnQgLy8gcHJvdG9jb2wKICAgIC8vIGF2bV8xMS9jb250cmFjdC5weToyOQogICAgLy8gYXNzZXJ0IG9wLkJsb2NrLmJsa190eG5fY291bnRlcigwKSwgInR4biBjb3VudGVyIgogICAgaW50Y18wIC8vIDAKICAgIGJsb2NrIEJsa1R4bkNvdW50ZXIKICAgIGFzc2VydCAvLyB0eG4gY291bnRlcgogICAgLy8gYXZtXzExL2NvbnRyYWN0LnB5OjMwCiAgICAvLyBhc3NlcnQgb3AuQmxvY2suYmxrX3Byb3Bvc2VyX3BheW91dCgwKSwgInByb3Bvc2VyIHBheW91dCIKICAgIGludGNfMCAvLyAwCiAgICBibG9jayBCbGtQcm9wb3NlclBheW91dAogICAgYXNzZXJ0IC8vIHByb3Bvc2VyIHBheW91dAogICAgLy8gYXZtXzExL2NvbnRyYWN0LnB5OjMyLTMzCiAgICAvLyAjIEdsb2JhbAogICAgLy8gYXNzZXJ0IG9wLkdsb2JhbC5wYXlvdXRzX2VuYWJsZWQsICJwYXlvdXRzX2VuYWJsZWQiCiAgICBnbG9iYWwgUGF5b3V0c0VuYWJsZWQKICAgIGFzc2VydCAvLyBwYXlvdXRzX2VuYWJsZWQKICAgIC8vIGF2bV8xMS9jb250cmFjdC5weTozNAogICAgLy8gYXNzZXJ0IG9wLkdsb2JhbC5wYXlvdXRzX2dvX29ubGluZV9mZWUsICJwYXlvdXRzX2dvX29ubGluZV9mZWUiCiAgICBnbG9iYWwgUGF5b3V0c0dvT25saW5lRmVlCiAgICBhc3NlcnQgLy8gcGF5b3V0c19nb19vbmxpbmVfZmVlCiAgICAvLyBhdm1fMTEvY29udHJhY3QucHk6MzUKICAgIC8vIGFzc2VydCBvcC5HbG9iYWwucGF5b3V0c19wZXJjZW50LCAicGF5b3V0c19wZXJjZW50IgogICAgZ2xvYmFsIFBheW91dHNQZXJjZW50CiAgICBhc3NlcnQgLy8gcGF5b3V0c19wZXJjZW50CiAgICAvLyBhdm1fMTEvY29udHJhY3QucHk6MzYKICAgIC8vIGFzc2VydCBvcC5HbG9iYWwucGF5b3V0c19taW5fYmFsYW5jZSwgInBheW91dHNfbWluX2JhbGFuY2UiCiAgICBnbG9iYWwgUGF5b3V0c01pbkJhbGFuY2UKICAgIGFzc2VydCAvLyBwYXlvdXRzX21pbl9iYWxhbmNlCiAgICAvLyBhdm1fMTEvY29udHJhY3QucHk6MzcKICAgIC8vIGFzc2VydCBvcC5HbG9iYWwucGF5b3V0c19tYXhfYmFsYW5jZSwgInBheW91dHNfbWF4X2JhbGFuY2UiCiAgICBnbG9iYWwgUGF5b3V0c01heEJhbGFuY2UKICAgIGFzc2VydCAvLyBwYXlvdXRzX21heF9iYWxhbmNlCiAgICAvLyBhdm1fMTEvY29udHJhY3QucHk6MzktNDAKICAgIC8vICMgVm90ZXIgcGFyYW1zCiAgICAvLyBnLCBoID0gb3AuVm90ZXJQYXJhbXNHZXQudm90ZXJfYmFsYW5jZSgwKQogICAgaW50Y18wIC8vIDAKICAgIHZvdGVyX3BhcmFtc19nZXQgVm90ZXJCYWxhbmNlCiAgICBwb3BuIDIKICAgIC8vIGF2bV8xMS9jb250cmFjdC5weTo0MQogICAgLy8gaSwgaiA9IG9wLlZvdGVyUGFyYW1zR2V0LnZvdGVyX2luY2VudGl2ZV9lbGlnaWJsZSgwKQogICAgaW50Y18wIC8vIDAKICAgIHZvdGVyX3BhcmFtc19nZXQgVm90ZXJJbmNlbnRpdmVFbGlnaWJsZQogICAgcG9wbiAyCiAgICByZXRzdWIK", + "approval": "I3ByYWdtYSB2ZXJzaW9uIDExCiNwcmFnbWEgdHlwZXRyYWNrIGZhbHNlCgovLyBhbGdvcHkuYXJjNC5BUkM0Q29udHJhY3QuYXBwcm92YWxfcHJvZ3JhbSgpIC0+IHVpbnQ2NDoKbWFpbjoKICAgIGludGNibG9jayAwIDEKICAgIC8vIGF2bV8xMS9jb250cmFjdC5weTo0CiAgICAvLyBjbGFzcyBDb250cmFjdChBUkM0Q29udHJhY3QsIGF2bV92ZXJzaW9uPTExKToKICAgIHR4biBOdW1BcHBBcmdzCiAgICBieiBtYWluX2JhcmVfcm91dGluZ0A2CiAgICBwdXNoYnl0ZXMgMHhjMmI4ZGQ4YSAvLyBtZXRob2QgInRlc3RfbmV3X29wcygpdm9pZCIKICAgIHR4bmEgQXBwbGljYXRpb25BcmdzIDAKICAgIG1hdGNoIG1haW5fdGVzdF9uZXdfb3BzX3JvdXRlQDMKCm1haW5fYWZ0ZXJfaWZfZWxzZUAxMDoKICAgIC8vIGF2bV8xMS9jb250cmFjdC5weTo0CiAgICAvLyBjbGFzcyBDb250cmFjdChBUkM0Q29udHJhY3QsIGF2bV92ZXJzaW9uPTExKToKICAgIGludGNfMCAvLyAwCiAgICByZXR1cm4KCm1haW5fdGVzdF9uZXdfb3BzX3JvdXRlQDM6CiAgICAvLyBhdm1fMTEvY29udHJhY3QucHk6NQogICAgLy8gQGFyYzQuYWJpbWV0aG9kCiAgICB0eG4gT25Db21wbGV0aW9uCiAgICAhCiAgICBhc3NlcnQgLy8gT25Db21wbGV0aW9uIGlzIG5vdCBOb09wCiAgICB0eG4gQXBwbGljYXRpb25JRAogICAgYXNzZXJ0IC8vIGNhbiBvbmx5IGNhbGwgd2hlbiBub3QgY3JlYXRpbmcKICAgIGNhbGxzdWIgdGVzdF9uZXdfb3BzCiAgICBpbnRjXzEgLy8gMQogICAgcmV0dXJuCgptYWluX2JhcmVfcm91dGluZ0A2OgogICAgLy8gYXZtXzExL2NvbnRyYWN0LnB5OjQKICAgIC8vIGNsYXNzIENvbnRyYWN0KEFSQzRDb250cmFjdCwgYXZtX3ZlcnNpb249MTEpOgogICAgdHhuIE9uQ29tcGxldGlvbgogICAgYm56IG1haW5fYWZ0ZXJfaWZfZWxzZUAxMAogICAgdHhuIEFwcGxpY2F0aW9uSUQKICAgICEKICAgIGFzc2VydCAvLyBjYW4gb25seSBjYWxsIHdoZW4gY3JlYXRpbmcKICAgIGludGNfMSAvLyAxCiAgICByZXR1cm4KCgovLyB0ZXN0X2Nhc2VzLmF2bV8xMS5jb250cmFjdC5Db250cmFjdC50ZXN0X25ld19vcHMoKSAtPiB2b2lkOgp0ZXN0X25ld19vcHM6CiAgICAvLyBhdm1fMTEvY29udHJhY3QucHk6NS02CiAgICAvLyBAYXJjNC5hYmltZXRob2QKICAgIC8vIGRlZiB0ZXN0X25ld19vcHMoc2VsZikgLT4gTm9uZToKICAgIHByb3RvIDAgMAogICAgLy8gYXZtXzExL2NvbnRyYWN0LnB5OjctOAogICAgLy8gIyBvcCBmdW5jdGlvbnMKICAgIC8vIGFzc2VydCBvcC5vbmxpbmVfc3Rha2UoKQogICAgb25saW5lX3N0YWtlCiAgICBhc3NlcnQKICAgIC8vIGF2bV8xMS9jb250cmFjdC5weTo5CiAgICAvLyBhc3NlcnQgb3AubWltYyhvcC5NaU1DQ29uZmlndXJhdGlvbnMuQk4yNTRNcDExMCwgb3AuYnplcm8oMzIpKQogICAgcHVzaGludCAzMiAvLyAzMgogICAgYnplcm8KICAgIG1pbWMgQk4yNTRNcDExMAogICAgbGVuCiAgICBhc3NlcnQKICAgIC8vIGF2bV8xMS9jb250cmFjdC5weToxNi0xNwogICAgLy8gIyBCbG9jawogICAgLy8gYXNzZXJ0IG5vdCBvcC5CbG9jay5ibGtfcHJvcG9zZXIoMCksICJwcm9wb3NlciIKICAgIGludGNfMCAvLyAwCiAgICBibG9jayBCbGtQcm9wb3NlcgogICAgZ2xvYmFsIFplcm9BZGRyZXNzCiAgICA9PQogICAgYXNzZXJ0IC8vIHByb3Bvc2VyCiAgICAvLyBhdm1fMTEvY29udHJhY3QucHk6MTgKICAgIC8vIGFzc2VydCBvcC5CbG9jay5ibGtfZmVlc19jb2xsZWN0ZWQoMCksICJmZWVzIGNvbGxlY3RlZCIKICAgIGludGNfMCAvLyAwCiAgICBibG9jayBCbGtGZWVzQ29sbGVjdGVkCiAgICBhc3NlcnQgLy8gZmVlcyBjb2xsZWN0ZWQKICAgIC8vIGF2bV8xMS9jb250cmFjdC5weToxOQogICAgLy8gYXNzZXJ0IG9wLkJsb2NrLmJsa19ib251cygwKSwgImJvbnVzIgogICAgaW50Y18wIC8vIDAKICAgIGJsb2NrIEJsa0JvbnVzCiAgICBhc3NlcnQgLy8gYm9udXMKICAgIC8vIGF2bV8xMS9jb250cmFjdC5weToyMAogICAgLy8gYXNzZXJ0IG9wLkJsb2NrLmJsa19icmFuY2goMCksICJicmFuY2giCiAgICBpbnRjXzAgLy8gMAogICAgYmxvY2sgQmxrQnJhbmNoCiAgICBsZW4KICAgIGFzc2VydCAvLyBicmFuY2gKICAgIC8vIGF2bV8xMS9jb250cmFjdC5weToyMQogICAgLy8gYXNzZXJ0IG9wLkJsb2NrLmJsa19mZWVfc2luaygwKSwgImZlZSBzaW5rIgogICAgaW50Y18wIC8vIDAKICAgIGJsb2NrIEJsa0ZlZVNpbmsKICAgIGdsb2JhbCBaZXJvQWRkcmVzcwogICAgIT0KICAgIGFzc2VydCAvLyBmZWUgc2luawogICAgLy8gYXZtXzExL2NvbnRyYWN0LnB5OjIyCiAgICAvLyBhc3NlcnQgb3AuQmxvY2suYmxrX3Byb3RvY29sKDApLCAicHJvdG9jb2wiCiAgICBpbnRjXzAgLy8gMAogICAgYmxvY2sgQmxrUHJvdG9jb2wKICAgIGxlbgogICAgYXNzZXJ0IC8vIHByb3RvY29sCiAgICAvLyBhdm1fMTEvY29udHJhY3QucHk6MjMKICAgIC8vIGFzc2VydCBvcC5CbG9jay5ibGtfdHhuX2NvdW50ZXIoMCksICJ0eG4gY291bnRlciIKICAgIGludGNfMCAvLyAwCiAgICBibG9jayBCbGtUeG5Db3VudGVyCiAgICBhc3NlcnQgLy8gdHhuIGNvdW50ZXIKICAgIC8vIGF2bV8xMS9jb250cmFjdC5weToyNAogICAgLy8gYXNzZXJ0IG9wLkJsb2NrLmJsa19wcm9wb3Nlcl9wYXlvdXQoMCksICJwcm9wb3NlciBwYXlvdXQiCiAgICBpbnRjXzAgLy8gMAogICAgYmxvY2sgQmxrUHJvcG9zZXJQYXlvdXQKICAgIGFzc2VydCAvLyBwcm9wb3NlciBwYXlvdXQKICAgIC8vIGF2bV8xMS9jb250cmFjdC5weToyNi0yNwogICAgLy8gIyBHbG9iYWwKICAgIC8vIGFzc2VydCBvcC5HbG9iYWwucGF5b3V0c19lbmFibGVkLCAicGF5b3V0c19lbmFibGVkIgogICAgZ2xvYmFsIFBheW91dHNFbmFibGVkCiAgICBhc3NlcnQgLy8gcGF5b3V0c19lbmFibGVkCiAgICAvLyBhdm1fMTEvY29udHJhY3QucHk6MjgKICAgIC8vIGFzc2VydCBvcC5HbG9iYWwucGF5b3V0c19nb19vbmxpbmVfZmVlLCAicGF5b3V0c19nb19vbmxpbmVfZmVlIgogICAgZ2xvYmFsIFBheW91dHNHb09ubGluZUZlZQogICAgYXNzZXJ0IC8vIHBheW91dHNfZ29fb25saW5lX2ZlZQogICAgLy8gYXZtXzExL2NvbnRyYWN0LnB5OjI5CiAgICAvLyBhc3NlcnQgb3AuR2xvYmFsLnBheW91dHNfcGVyY2VudCwgInBheW91dHNfcGVyY2VudCIKICAgIGdsb2JhbCBQYXlvdXRzUGVyY2VudAogICAgYXNzZXJ0IC8vIHBheW91dHNfcGVyY2VudAogICAgLy8gYXZtXzExL2NvbnRyYWN0LnB5OjMwCiAgICAvLyBhc3NlcnQgb3AuR2xvYmFsLnBheW91dHNfbWluX2JhbGFuY2UsICJwYXlvdXRzX21pbl9iYWxhbmNlIgogICAgZ2xvYmFsIFBheW91dHNNaW5CYWxhbmNlCiAgICBhc3NlcnQgLy8gcGF5b3V0c19taW5fYmFsYW5jZQogICAgLy8gYXZtXzExL2NvbnRyYWN0LnB5OjMxCiAgICAvLyBhc3NlcnQgb3AuR2xvYmFsLnBheW91dHNfbWF4X2JhbGFuY2UsICJwYXlvdXRzX21heF9iYWxhbmNlIgogICAgZ2xvYmFsIFBheW91dHNNYXhCYWxhbmNlCiAgICBhc3NlcnQgLy8gcGF5b3V0c19tYXhfYmFsYW5jZQogICAgLy8gYXZtXzExL2NvbnRyYWN0LnB5OjMzLTM0CiAgICAvLyAjIFZvdGVyIHBhcmFtcwogICAgLy8gZywgaCA9IG9wLlZvdGVyUGFyYW1zR2V0LnZvdGVyX2JhbGFuY2UoMCkKICAgIGludGNfMCAvLyAwCiAgICB2b3Rlcl9wYXJhbXNfZ2V0IFZvdGVyQmFsYW5jZQogICAgcG9wbiAyCiAgICAvLyBhdm1fMTEvY29udHJhY3QucHk6MzUKICAgIC8vIGksIGogPSBvcC5Wb3RlclBhcmFtc0dldC52b3Rlcl9pbmNlbnRpdmVfZWxpZ2libGUoMCkKICAgIGludGNfMCAvLyAwCiAgICB2b3Rlcl9wYXJhbXNfZ2V0IFZvdGVySW5jZW50aXZlRWxpZ2libGUKICAgIHBvcG4gMgogICAgcmV0c3ViCg==", "clear": "I3ByYWdtYSB2ZXJzaW9uIDExCiNwcmFnbWEgdHlwZXRyYWNrIGZhbHNlCgovLyBhbGdvcHkuYXJjNC5BUkM0Q29udHJhY3QuY2xlYXJfc3RhdGVfcHJvZ3JhbSgpIC0+IHVpbnQ2NDoKbWFpbjoKICAgIHB1c2hpbnQgMSAvLyAxCiAgICByZXR1cm4K" }, "state": { diff --git a/test_cases/avm_11/out/Contract.arc56.json b/test_cases/avm_11/out/Contract.arc56.json index 4ac1fb1d63..ad52df080c 100644 --- a/test_cases/avm_11/out/Contract.arc56.json +++ b/test_cases/avm_11/out/Contract.arc56.json @@ -63,13 +63,13 @@ }, { "pc": [ - 84 + 74 ], "errorMessage": "bonus" }, { "pc": [ - 89 + 79 ], "errorMessage": "branch" }, @@ -87,67 +87,67 @@ }, { "pc": [ - 96 + 86 ], "errorMessage": "fee sink" }, { "pc": [ - 80 + 70 ], "errorMessage": "fees collected" }, { "pc": [ - 112 + 102 ], "errorMessage": "payouts_enabled" }, { "pc": [ - 115 + 105 ], "errorMessage": "payouts_go_online_fee" }, { "pc": [ - 124 + 114 ], "errorMessage": "payouts_max_balance" }, { "pc": [ - 121 + 111 ], "errorMessage": "payouts_min_balance" }, { "pc": [ - 118 + 108 ], "errorMessage": "payouts_percent" }, { "pc": [ - 76 + 66 ], "errorMessage": "proposer" }, { "pc": [ - 109 + 99 ], "errorMessage": "proposer payout" }, { "pc": [ - 101 + 91 ], "errorMessage": "protocol" }, { "pc": [ - 105 + 95 ], "errorMessage": "txn counter" } @@ -160,11 +160,11 @@ } }, "source": { - "approval": "I3ByYWdtYSB2ZXJzaW9uIDExCiNwcmFnbWEgdHlwZXRyYWNrIGZhbHNlCgovLyBhbGdvcHkuYXJjNC5BUkM0Q29udHJhY3QuYXBwcm92YWxfcHJvZ3JhbSgpIC0+IHVpbnQ2NDoKbWFpbjoKICAgIGludGNibG9jayAwIDEKICAgIC8vIGF2bV8xMS9jb250cmFjdC5weTo5CiAgICAvLyBjbGFzcyBDb250cmFjdChBUkM0Q29udHJhY3QsIGF2bV92ZXJzaW9uPTExKToKICAgIHR4biBOdW1BcHBBcmdzCiAgICBieiBtYWluX2JhcmVfcm91dGluZ0A2CiAgICBwdXNoYnl0ZXMgMHhjMmI4ZGQ4YSAvLyBtZXRob2QgInRlc3RfbmV3X29wcygpdm9pZCIKICAgIHR4bmEgQXBwbGljYXRpb25BcmdzIDAKICAgIG1hdGNoIG1haW5fdGVzdF9uZXdfb3BzX3JvdXRlQDMKCm1haW5fYWZ0ZXJfaWZfZWxzZUAxMDoKICAgIC8vIGF2bV8xMS9jb250cmFjdC5weTo5CiAgICAvLyBjbGFzcyBDb250cmFjdChBUkM0Q29udHJhY3QsIGF2bV92ZXJzaW9uPTExKToKICAgIGludGNfMCAvLyAwCiAgICByZXR1cm4KCm1haW5fdGVzdF9uZXdfb3BzX3JvdXRlQDM6CiAgICAvLyBhdm1fMTEvY29udHJhY3QucHk6MTAKICAgIC8vIEBhcmM0LmFiaW1ldGhvZAogICAgdHhuIE9uQ29tcGxldGlvbgogICAgIQogICAgYXNzZXJ0IC8vIE9uQ29tcGxldGlvbiBpcyBub3QgTm9PcAogICAgdHhuIEFwcGxpY2F0aW9uSUQKICAgIGFzc2VydCAvLyBjYW4gb25seSBjYWxsIHdoZW4gbm90IGNyZWF0aW5nCiAgICBjYWxsc3ViIHRlc3RfbmV3X29wcwogICAgaW50Y18xIC8vIDEKICAgIHJldHVybgoKbWFpbl9iYXJlX3JvdXRpbmdANjoKICAgIC8vIGF2bV8xMS9jb250cmFjdC5weTo5CiAgICAvLyBjbGFzcyBDb250cmFjdChBUkM0Q29udHJhY3QsIGF2bV92ZXJzaW9uPTExKToKICAgIHR4biBPbkNvbXBsZXRpb24KICAgIGJueiBtYWluX2FmdGVyX2lmX2Vsc2VAMTAKICAgIHR4biBBcHBsaWNhdGlvbklECiAgICAhCiAgICBhc3NlcnQgLy8gY2FuIG9ubHkgY2FsbCB3aGVuIGNyZWF0aW5nCiAgICBpbnRjXzEgLy8gMQogICAgcmV0dXJuCgoKLy8gdGVzdF9jYXNlcy5hdm1fMTEuY29udHJhY3QuQ29udHJhY3QudGVzdF9uZXdfb3BzKCkgLT4gdm9pZDoKdGVzdF9uZXdfb3BzOgogICAgLy8gYXZtXzExL2NvbnRyYWN0LnB5OjEwLTExCiAgICAvLyBAYXJjNC5hYmltZXRob2QKICAgIC8vIGRlZiB0ZXN0X25ld19vcHMoc2VsZikgLT4gTm9uZToKICAgIHByb3RvIDAgMAogICAgLy8gYXZtXzExL2NvbnRyYWN0LnB5OjEyLTEzCiAgICAvLyAjIG9wIGZ1bmN0aW9ucwogICAgLy8gYXNzZXJ0IG5vdCBvcC5mYWxjb25fdmVyaWZ5KGIiIiwgYiIiLCBvcC5iemVybygxNzkzKSkKICAgIHB1c2hpbnQgMTc5MyAvLyAxNzkzCiAgICBiemVybwogICAgcHVzaGJ5dGVzIDB4CiAgICBkdXAKICAgIHVuY292ZXIgMgogICAgZmFsY29uX3ZlcmlmeQogICAgIQogICAgYXNzZXJ0CiAgICAvLyBhdm1fMTEvY29udHJhY3QucHk6MTQKICAgIC8vIGFzc2VydCBvcC5zdW1oYXNoNTEyKGIiIikKICAgIHB1c2hieXRlcyAweAogICAgc3VtaGFzaDUxMgogICAgbGVuCiAgICBhc3NlcnQKICAgIC8vIGF2bV8xMS9jb250cmFjdC5weToxNQogICAgLy8gYXNzZXJ0IG9wLm9ubGluZV9zdGFrZSgpCiAgICBvbmxpbmVfc3Rha2UKICAgIGFzc2VydAogICAgLy8gYXZtXzExL2NvbnRyYWN0LnB5OjIyLTIzCiAgICAvLyAjIEJsb2NrCiAgICAvLyBhc3NlcnQgbm90IG9wLkJsb2NrLmJsa19wcm9wb3NlcigwKSwgInByb3Bvc2VyIgogICAgaW50Y18wIC8vIDAKICAgIGJsb2NrIEJsa1Byb3Bvc2VyCiAgICBnbG9iYWwgWmVyb0FkZHJlc3MKICAgID09CiAgICBhc3NlcnQgLy8gcHJvcG9zZXIKICAgIC8vIGF2bV8xMS9jb250cmFjdC5weToyNAogICAgLy8gYXNzZXJ0IG9wLkJsb2NrLmJsa19mZWVzX2NvbGxlY3RlZCgwKSwgImZlZXMgY29sbGVjdGVkIgogICAgaW50Y18wIC8vIDAKICAgIGJsb2NrIEJsa0ZlZXNDb2xsZWN0ZWQKICAgIGFzc2VydCAvLyBmZWVzIGNvbGxlY3RlZAogICAgLy8gYXZtXzExL2NvbnRyYWN0LnB5OjI1CiAgICAvLyBhc3NlcnQgb3AuQmxvY2suYmxrX2JvbnVzKDApLCAiYm9udXMiCiAgICBpbnRjXzAgLy8gMAogICAgYmxvY2sgQmxrQm9udXMKICAgIGFzc2VydCAvLyBib251cwogICAgLy8gYXZtXzExL2NvbnRyYWN0LnB5OjI2CiAgICAvLyBhc3NlcnQgb3AuQmxvY2suYmxrX2JyYW5jaCgwKSwgImJyYW5jaCIKICAgIGludGNfMCAvLyAwCiAgICBibG9jayBCbGtCcmFuY2gKICAgIGxlbgogICAgYXNzZXJ0IC8vIGJyYW5jaAogICAgLy8gYXZtXzExL2NvbnRyYWN0LnB5OjI3CiAgICAvLyBhc3NlcnQgb3AuQmxvY2suYmxrX2ZlZV9zaW5rKDApLCAiZmVlIHNpbmsiCiAgICBpbnRjXzAgLy8gMAogICAgYmxvY2sgQmxrRmVlU2luawogICAgZ2xvYmFsIFplcm9BZGRyZXNzCiAgICAhPQogICAgYXNzZXJ0IC8vIGZlZSBzaW5rCiAgICAvLyBhdm1fMTEvY29udHJhY3QucHk6MjgKICAgIC8vIGFzc2VydCBvcC5CbG9jay5ibGtfcHJvdG9jb2woMCksICJwcm90b2NvbCIKICAgIGludGNfMCAvLyAwCiAgICBibG9jayBCbGtQcm90b2NvbAogICAgbGVuCiAgICBhc3NlcnQgLy8gcHJvdG9jb2wKICAgIC8vIGF2bV8xMS9jb250cmFjdC5weToyOQogICAgLy8gYXNzZXJ0IG9wLkJsb2NrLmJsa190eG5fY291bnRlcigwKSwgInR4biBjb3VudGVyIgogICAgaW50Y18wIC8vIDAKICAgIGJsb2NrIEJsa1R4bkNvdW50ZXIKICAgIGFzc2VydCAvLyB0eG4gY291bnRlcgogICAgLy8gYXZtXzExL2NvbnRyYWN0LnB5OjMwCiAgICAvLyBhc3NlcnQgb3AuQmxvY2suYmxrX3Byb3Bvc2VyX3BheW91dCgwKSwgInByb3Bvc2VyIHBheW91dCIKICAgIGludGNfMCAvLyAwCiAgICBibG9jayBCbGtQcm9wb3NlclBheW91dAogICAgYXNzZXJ0IC8vIHByb3Bvc2VyIHBheW91dAogICAgLy8gYXZtXzExL2NvbnRyYWN0LnB5OjMyLTMzCiAgICAvLyAjIEdsb2JhbAogICAgLy8gYXNzZXJ0IG9wLkdsb2JhbC5wYXlvdXRzX2VuYWJsZWQsICJwYXlvdXRzX2VuYWJsZWQiCiAgICBnbG9iYWwgUGF5b3V0c0VuYWJsZWQKICAgIGFzc2VydCAvLyBwYXlvdXRzX2VuYWJsZWQKICAgIC8vIGF2bV8xMS9jb250cmFjdC5weTozNAogICAgLy8gYXNzZXJ0IG9wLkdsb2JhbC5wYXlvdXRzX2dvX29ubGluZV9mZWUsICJwYXlvdXRzX2dvX29ubGluZV9mZWUiCiAgICBnbG9iYWwgUGF5b3V0c0dvT25saW5lRmVlCiAgICBhc3NlcnQgLy8gcGF5b3V0c19nb19vbmxpbmVfZmVlCiAgICAvLyBhdm1fMTEvY29udHJhY3QucHk6MzUKICAgIC8vIGFzc2VydCBvcC5HbG9iYWwucGF5b3V0c19wZXJjZW50LCAicGF5b3V0c19wZXJjZW50IgogICAgZ2xvYmFsIFBheW91dHNQZXJjZW50CiAgICBhc3NlcnQgLy8gcGF5b3V0c19wZXJjZW50CiAgICAvLyBhdm1fMTEvY29udHJhY3QucHk6MzYKICAgIC8vIGFzc2VydCBvcC5HbG9iYWwucGF5b3V0c19taW5fYmFsYW5jZSwgInBheW91dHNfbWluX2JhbGFuY2UiCiAgICBnbG9iYWwgUGF5b3V0c01pbkJhbGFuY2UKICAgIGFzc2VydCAvLyBwYXlvdXRzX21pbl9iYWxhbmNlCiAgICAvLyBhdm1fMTEvY29udHJhY3QucHk6MzcKICAgIC8vIGFzc2VydCBvcC5HbG9iYWwucGF5b3V0c19tYXhfYmFsYW5jZSwgInBheW91dHNfbWF4X2JhbGFuY2UiCiAgICBnbG9iYWwgUGF5b3V0c01heEJhbGFuY2UKICAgIGFzc2VydCAvLyBwYXlvdXRzX21heF9iYWxhbmNlCiAgICAvLyBhdm1fMTEvY29udHJhY3QucHk6MzktNDAKICAgIC8vICMgVm90ZXIgcGFyYW1zCiAgICAvLyBnLCBoID0gb3AuVm90ZXJQYXJhbXNHZXQudm90ZXJfYmFsYW5jZSgwKQogICAgaW50Y18wIC8vIDAKICAgIHZvdGVyX3BhcmFtc19nZXQgVm90ZXJCYWxhbmNlCiAgICBwb3BuIDIKICAgIC8vIGF2bV8xMS9jb250cmFjdC5weTo0MQogICAgLy8gaSwgaiA9IG9wLlZvdGVyUGFyYW1zR2V0LnZvdGVyX2luY2VudGl2ZV9lbGlnaWJsZSgwKQogICAgaW50Y18wIC8vIDAKICAgIHZvdGVyX3BhcmFtc19nZXQgVm90ZXJJbmNlbnRpdmVFbGlnaWJsZQogICAgcG9wbiAyCiAgICByZXRzdWIK", + "approval": "I3ByYWdtYSB2ZXJzaW9uIDExCiNwcmFnbWEgdHlwZXRyYWNrIGZhbHNlCgovLyBhbGdvcHkuYXJjNC5BUkM0Q29udHJhY3QuYXBwcm92YWxfcHJvZ3JhbSgpIC0+IHVpbnQ2NDoKbWFpbjoKICAgIGludGNibG9jayAwIDEKICAgIC8vIGF2bV8xMS9jb250cmFjdC5weTo0CiAgICAvLyBjbGFzcyBDb250cmFjdChBUkM0Q29udHJhY3QsIGF2bV92ZXJzaW9uPTExKToKICAgIHR4biBOdW1BcHBBcmdzCiAgICBieiBtYWluX2JhcmVfcm91dGluZ0A2CiAgICBwdXNoYnl0ZXMgMHhjMmI4ZGQ4YSAvLyBtZXRob2QgInRlc3RfbmV3X29wcygpdm9pZCIKICAgIHR4bmEgQXBwbGljYXRpb25BcmdzIDAKICAgIG1hdGNoIG1haW5fdGVzdF9uZXdfb3BzX3JvdXRlQDMKCm1haW5fYWZ0ZXJfaWZfZWxzZUAxMDoKICAgIC8vIGF2bV8xMS9jb250cmFjdC5weTo0CiAgICAvLyBjbGFzcyBDb250cmFjdChBUkM0Q29udHJhY3QsIGF2bV92ZXJzaW9uPTExKToKICAgIGludGNfMCAvLyAwCiAgICByZXR1cm4KCm1haW5fdGVzdF9uZXdfb3BzX3JvdXRlQDM6CiAgICAvLyBhdm1fMTEvY29udHJhY3QucHk6NQogICAgLy8gQGFyYzQuYWJpbWV0aG9kCiAgICB0eG4gT25Db21wbGV0aW9uCiAgICAhCiAgICBhc3NlcnQgLy8gT25Db21wbGV0aW9uIGlzIG5vdCBOb09wCiAgICB0eG4gQXBwbGljYXRpb25JRAogICAgYXNzZXJ0IC8vIGNhbiBvbmx5IGNhbGwgd2hlbiBub3QgY3JlYXRpbmcKICAgIGNhbGxzdWIgdGVzdF9uZXdfb3BzCiAgICBpbnRjXzEgLy8gMQogICAgcmV0dXJuCgptYWluX2JhcmVfcm91dGluZ0A2OgogICAgLy8gYXZtXzExL2NvbnRyYWN0LnB5OjQKICAgIC8vIGNsYXNzIENvbnRyYWN0KEFSQzRDb250cmFjdCwgYXZtX3ZlcnNpb249MTEpOgogICAgdHhuIE9uQ29tcGxldGlvbgogICAgYm56IG1haW5fYWZ0ZXJfaWZfZWxzZUAxMAogICAgdHhuIEFwcGxpY2F0aW9uSUQKICAgICEKICAgIGFzc2VydCAvLyBjYW4gb25seSBjYWxsIHdoZW4gY3JlYXRpbmcKICAgIGludGNfMSAvLyAxCiAgICByZXR1cm4KCgovLyB0ZXN0X2Nhc2VzLmF2bV8xMS5jb250cmFjdC5Db250cmFjdC50ZXN0X25ld19vcHMoKSAtPiB2b2lkOgp0ZXN0X25ld19vcHM6CiAgICAvLyBhdm1fMTEvY29udHJhY3QucHk6NS02CiAgICAvLyBAYXJjNC5hYmltZXRob2QKICAgIC8vIGRlZiB0ZXN0X25ld19vcHMoc2VsZikgLT4gTm9uZToKICAgIHByb3RvIDAgMAogICAgLy8gYXZtXzExL2NvbnRyYWN0LnB5OjctOAogICAgLy8gIyBvcCBmdW5jdGlvbnMKICAgIC8vIGFzc2VydCBvcC5vbmxpbmVfc3Rha2UoKQogICAgb25saW5lX3N0YWtlCiAgICBhc3NlcnQKICAgIC8vIGF2bV8xMS9jb250cmFjdC5weTo5CiAgICAvLyBhc3NlcnQgb3AubWltYyhvcC5NaU1DQ29uZmlndXJhdGlvbnMuQk4yNTRNcDExMCwgb3AuYnplcm8oMzIpKQogICAgcHVzaGludCAzMiAvLyAzMgogICAgYnplcm8KICAgIG1pbWMgQk4yNTRNcDExMAogICAgbGVuCiAgICBhc3NlcnQKICAgIC8vIGF2bV8xMS9jb250cmFjdC5weToxNi0xNwogICAgLy8gIyBCbG9jawogICAgLy8gYXNzZXJ0IG5vdCBvcC5CbG9jay5ibGtfcHJvcG9zZXIoMCksICJwcm9wb3NlciIKICAgIGludGNfMCAvLyAwCiAgICBibG9jayBCbGtQcm9wb3NlcgogICAgZ2xvYmFsIFplcm9BZGRyZXNzCiAgICA9PQogICAgYXNzZXJ0IC8vIHByb3Bvc2VyCiAgICAvLyBhdm1fMTEvY29udHJhY3QucHk6MTgKICAgIC8vIGFzc2VydCBvcC5CbG9jay5ibGtfZmVlc19jb2xsZWN0ZWQoMCksICJmZWVzIGNvbGxlY3RlZCIKICAgIGludGNfMCAvLyAwCiAgICBibG9jayBCbGtGZWVzQ29sbGVjdGVkCiAgICBhc3NlcnQgLy8gZmVlcyBjb2xsZWN0ZWQKICAgIC8vIGF2bV8xMS9jb250cmFjdC5weToxOQogICAgLy8gYXNzZXJ0IG9wLkJsb2NrLmJsa19ib251cygwKSwgImJvbnVzIgogICAgaW50Y18wIC8vIDAKICAgIGJsb2NrIEJsa0JvbnVzCiAgICBhc3NlcnQgLy8gYm9udXMKICAgIC8vIGF2bV8xMS9jb250cmFjdC5weToyMAogICAgLy8gYXNzZXJ0IG9wLkJsb2NrLmJsa19icmFuY2goMCksICJicmFuY2giCiAgICBpbnRjXzAgLy8gMAogICAgYmxvY2sgQmxrQnJhbmNoCiAgICBsZW4KICAgIGFzc2VydCAvLyBicmFuY2gKICAgIC8vIGF2bV8xMS9jb250cmFjdC5weToyMQogICAgLy8gYXNzZXJ0IG9wLkJsb2NrLmJsa19mZWVfc2luaygwKSwgImZlZSBzaW5rIgogICAgaW50Y18wIC8vIDAKICAgIGJsb2NrIEJsa0ZlZVNpbmsKICAgIGdsb2JhbCBaZXJvQWRkcmVzcwogICAgIT0KICAgIGFzc2VydCAvLyBmZWUgc2luawogICAgLy8gYXZtXzExL2NvbnRyYWN0LnB5OjIyCiAgICAvLyBhc3NlcnQgb3AuQmxvY2suYmxrX3Byb3RvY29sKDApLCAicHJvdG9jb2wiCiAgICBpbnRjXzAgLy8gMAogICAgYmxvY2sgQmxrUHJvdG9jb2wKICAgIGxlbgogICAgYXNzZXJ0IC8vIHByb3RvY29sCiAgICAvLyBhdm1fMTEvY29udHJhY3QucHk6MjMKICAgIC8vIGFzc2VydCBvcC5CbG9jay5ibGtfdHhuX2NvdW50ZXIoMCksICJ0eG4gY291bnRlciIKICAgIGludGNfMCAvLyAwCiAgICBibG9jayBCbGtUeG5Db3VudGVyCiAgICBhc3NlcnQgLy8gdHhuIGNvdW50ZXIKICAgIC8vIGF2bV8xMS9jb250cmFjdC5weToyNAogICAgLy8gYXNzZXJ0IG9wLkJsb2NrLmJsa19wcm9wb3Nlcl9wYXlvdXQoMCksICJwcm9wb3NlciBwYXlvdXQiCiAgICBpbnRjXzAgLy8gMAogICAgYmxvY2sgQmxrUHJvcG9zZXJQYXlvdXQKICAgIGFzc2VydCAvLyBwcm9wb3NlciBwYXlvdXQKICAgIC8vIGF2bV8xMS9jb250cmFjdC5weToyNi0yNwogICAgLy8gIyBHbG9iYWwKICAgIC8vIGFzc2VydCBvcC5HbG9iYWwucGF5b3V0c19lbmFibGVkLCAicGF5b3V0c19lbmFibGVkIgogICAgZ2xvYmFsIFBheW91dHNFbmFibGVkCiAgICBhc3NlcnQgLy8gcGF5b3V0c19lbmFibGVkCiAgICAvLyBhdm1fMTEvY29udHJhY3QucHk6MjgKICAgIC8vIGFzc2VydCBvcC5HbG9iYWwucGF5b3V0c19nb19vbmxpbmVfZmVlLCAicGF5b3V0c19nb19vbmxpbmVfZmVlIgogICAgZ2xvYmFsIFBheW91dHNHb09ubGluZUZlZQogICAgYXNzZXJ0IC8vIHBheW91dHNfZ29fb25saW5lX2ZlZQogICAgLy8gYXZtXzExL2NvbnRyYWN0LnB5OjI5CiAgICAvLyBhc3NlcnQgb3AuR2xvYmFsLnBheW91dHNfcGVyY2VudCwgInBheW91dHNfcGVyY2VudCIKICAgIGdsb2JhbCBQYXlvdXRzUGVyY2VudAogICAgYXNzZXJ0IC8vIHBheW91dHNfcGVyY2VudAogICAgLy8gYXZtXzExL2NvbnRyYWN0LnB5OjMwCiAgICAvLyBhc3NlcnQgb3AuR2xvYmFsLnBheW91dHNfbWluX2JhbGFuY2UsICJwYXlvdXRzX21pbl9iYWxhbmNlIgogICAgZ2xvYmFsIFBheW91dHNNaW5CYWxhbmNlCiAgICBhc3NlcnQgLy8gcGF5b3V0c19taW5fYmFsYW5jZQogICAgLy8gYXZtXzExL2NvbnRyYWN0LnB5OjMxCiAgICAvLyBhc3NlcnQgb3AuR2xvYmFsLnBheW91dHNfbWF4X2JhbGFuY2UsICJwYXlvdXRzX21heF9iYWxhbmNlIgogICAgZ2xvYmFsIFBheW91dHNNYXhCYWxhbmNlCiAgICBhc3NlcnQgLy8gcGF5b3V0c19tYXhfYmFsYW5jZQogICAgLy8gYXZtXzExL2NvbnRyYWN0LnB5OjMzLTM0CiAgICAvLyAjIFZvdGVyIHBhcmFtcwogICAgLy8gZywgaCA9IG9wLlZvdGVyUGFyYW1zR2V0LnZvdGVyX2JhbGFuY2UoMCkKICAgIGludGNfMCAvLyAwCiAgICB2b3Rlcl9wYXJhbXNfZ2V0IFZvdGVyQmFsYW5jZQogICAgcG9wbiAyCiAgICAvLyBhdm1fMTEvY29udHJhY3QucHk6MzUKICAgIC8vIGksIGogPSBvcC5Wb3RlclBhcmFtc0dldC52b3Rlcl9pbmNlbnRpdmVfZWxpZ2libGUoMCkKICAgIGludGNfMCAvLyAwCiAgICB2b3Rlcl9wYXJhbXNfZ2V0IFZvdGVySW5jZW50aXZlRWxpZ2libGUKICAgIHBvcG4gMgogICAgcmV0c3ViCg==", "clear": "I3ByYWdtYSB2ZXJzaW9uIDExCiNwcmFnbWEgdHlwZXRyYWNrIGZhbHNlCgovLyBhbGdvcHkuYXJjNC5BUkM0Q29udHJhY3QuY2xlYXJfc3RhdGVfcHJvZ3JhbSgpIC0+IHVpbnQ2NDoKbWFpbjoKICAgIHB1c2hpbnQgMSAvLyAxCiAgICByZXR1cm4K" }, "byteCode": { - "approval": "CyACAAExG0EAG4AEwrjdijYaAI4BAAIiQzEZFEQxGESIAA0jQzEZQP/tMRgURCNDigAAgYEOr4AASU8ChRREgACGFUR1RCLRAjIDEkQi0QNEItEERCLRBRVEItEGMgMTRCLRBxVEItEIRCLRCUQyEkQyE0QyFEQyFUQyFkQidABGAiJ0AUYCiQ==", + "approval": "CyACAAExG0EAG4AEwrjdijYaAI4BAAIiQzEZFEQxGESIAA0jQzEZQP/tMRgURCNDigAAdUSBIK/mABVEItECMgMSRCLRA0Qi0QREItEFFUQi0QYyAxNEItEHFUQi0QhEItEJRDISRDITRDIURDIVRDIWRCJ0AEYCInQBRgKJ", "clear": "C4EBQw==" }, "compilerInfo": { diff --git a/test_cases/avm_11/out/Contract.ir/Contract.approval.0.ssa.ir b/test_cases/avm_11/out/Contract.ir/Contract.approval.0.ssa.ir index 0443f6bad6..2c24d58eca 100644 --- a/test_cases/avm_11/out/Contract.ir/Contract.approval.0.ssa.ir +++ b/test_cases/avm_11/out/Contract.ir/Contract.approval.0.ssa.ir @@ -4,14 +4,14 @@ main algopy.arc4.ARC4Contract.approval_program: return tmp%0#0 subroutine test_cases.avm_11.contract.Contract.__puya_arc4_router__() -> bool: - block@0: // L9 + block@0: // L4 let tmp%0#0: uint64 = (txn NumAppArgs) let tmp%1#0: bool = (!= tmp%0#0 0u) goto tmp%1#0 ? block@1 : block@5 - block@1: // abi_routing_L9 + block@1: // abi_routing_L4 let tmp%2#0: bytes = (txna ApplicationArgs 0) switch tmp%2#0 {method "test_new_ops()void" => block@2, * => block@3} - block@2: // test_new_ops_route_L10 + block@2: // test_new_ops_route_L5 let tmp%3#0: uint64 = (txn OnCompletion) let tmp%4#0: bool = (== tmp%3#0 NoOp) (assert tmp%4#0) // OnCompletion is not NoOp @@ -20,11 +20,11 @@ subroutine test_cases.avm_11.contract.Contract.__puya_arc4_router__() -> bool: (assert tmp%6#0) // can only call when not creating test_cases.avm_11.contract.Contract.test_new_ops() return 1u - block@3: // switch_case_default_L9 + block@3: // switch_case_default_L4 goto block@4 - block@4: // switch_case_next_L9 + block@4: // switch_case_next_L4 goto block@9 - block@5: // bare_routing_L9 + block@5: // bare_routing_L4 let tmp%7#0: uint64 = (txn OnCompletion) switch tmp%7#0 {0u => block@6, * => block@7} block@6: // __algopy_default_create_L1 @@ -33,80 +33,77 @@ subroutine test_cases.avm_11.contract.Contract.__puya_arc4_router__() -> bool: (assert tmp%9#0) // can only call when creating test_cases.avm_11.contract.Contract.__algopy_default_create() return 1u - block@7: // switch_case_default_L9 + block@7: // switch_case_default_L4 goto block@8 - block@8: // switch_case_next_L9 + block@8: // switch_case_next_L4 goto block@9 - block@9: // after_if_else_L9 + block@9: // after_if_else_L4 return 0u subroutine test_cases.avm_11.contract.Contract.test_new_ops() -> void: - block@0: // L10 - let tmp%0#0: bytes = (bzero 1793u) - let tmp%1#0: bool = (falcon_verify 0x 0x tmp%0#0) - let tmp%2#0: bool = (! tmp%1#0) - (assert tmp%2#0) - let tmp%3#0: bytes = (sumhash512 0x) + block@0: // L5 + let tmp%0#0: uint64 = online_stake + let tmp%1#0: bool = (!= tmp%0#0 0u) + (assert tmp%1#0) + let tmp%2#0: bytes = (bzero 32u) + let tmp%3#0: bytes = ((mimc BN254Mp110) tmp%2#0) let tmp%4#0: uint64 = (len tmp%3#0) let tmp%5#0: bool = (!= tmp%4#0 0u) (assert tmp%5#0) - let tmp%6#0: uint64 = online_stake - let tmp%7#0: bool = (!= tmp%6#0 0u) - (assert tmp%7#0) - let tmp%8#0: bytes = (txn Sender) - let (tuple_assignment%0#0: bool, tuple_assignment%1#0: bool) = ((acct_params_get AcctIncentiveEligible) tmp%8#0) + let tmp%6#0: bytes = (txn Sender) + let (tuple_assignment%0#0: bool, tuple_assignment%1#0: bool) = ((acct_params_get AcctIncentiveEligible) tmp%6#0) let a#0: bool = tuple_assignment%0#0 let b#0: bool = tuple_assignment%1#0 - let tmp%9#0: bytes = (txn Sender) - let (tuple_assignment%2#0: uint64, tuple_assignment%3#0: bool) = ((acct_params_get AcctLastProposed) tmp%9#0) + let tmp%7#0: bytes = (txn Sender) + let (tuple_assignment%2#0: uint64, tuple_assignment%3#0: bool) = ((acct_params_get AcctLastProposed) tmp%7#0) let c#0: uint64 = tuple_assignment%2#0 let d#0: bool = tuple_assignment%3#0 - let tmp%10#0: bytes = (txn Sender) - let (tuple_assignment%4#0: uint64, tuple_assignment%5#0: bool) = ((acct_params_get AcctLastHeartbeat) tmp%10#0) + let tmp%8#0: bytes = (txn Sender) + let (tuple_assignment%4#0: uint64, tuple_assignment%5#0: bool) = ((acct_params_get AcctLastHeartbeat) tmp%8#0) let e#0: uint64 = tuple_assignment%4#0 let f#0: bool = tuple_assignment%5#0 - let tmp%11#0: bytes = ((block BlkProposer) 0u) - let tmp%12#0: bytes = (global ZeroAddress) - let tmp%13#0: bool = (== tmp%11#0 tmp%12#0) - (assert tmp%13#0) // proposer - let tmp%14#0: uint64 = ((block BlkFeesCollected) 0u) + let tmp%9#0: bytes = ((block BlkProposer) 0u) + let tmp%10#0: bytes = (global ZeroAddress) + let tmp%11#0: bool = (== tmp%9#0 tmp%10#0) + (assert tmp%11#0) // proposer + let tmp%12#0: uint64 = ((block BlkFeesCollected) 0u) + let tmp%13#0: bool = (!= tmp%12#0 0u) + (assert tmp%13#0) // fees collected + let tmp%14#0: uint64 = ((block BlkBonus) 0u) let tmp%15#0: bool = (!= tmp%14#0 0u) - (assert tmp%15#0) // fees collected - let tmp%16#0: uint64 = ((block BlkBonus) 0u) - let tmp%17#0: bool = (!= tmp%16#0 0u) - (assert tmp%17#0) // bonus - let tmp%18#0: bytes = ((block BlkBranch) 0u) - let tmp%19#0: uint64 = (len tmp%18#0) - let tmp%20#0: bool = (!= tmp%19#0 0u) - (assert tmp%20#0) // branch - let tmp%21#0: bytes = ((block BlkFeeSink) 0u) - let tmp%22#0: bytes = (global ZeroAddress) - let tmp%23#0: bool = (!= tmp%21#0 tmp%22#0) - (assert tmp%23#0) // fee sink - let tmp%24#0: bytes = ((block BlkProtocol) 0u) - let tmp%25#0: uint64 = (len tmp%24#0) + (assert tmp%15#0) // bonus + let tmp%16#0: bytes = ((block BlkBranch) 0u) + let tmp%17#0: uint64 = (len tmp%16#0) + let tmp%18#0: bool = (!= tmp%17#0 0u) + (assert tmp%18#0) // branch + let tmp%19#0: bytes = ((block BlkFeeSink) 0u) + let tmp%20#0: bytes = (global ZeroAddress) + let tmp%21#0: bool = (!= tmp%19#0 tmp%20#0) + (assert tmp%21#0) // fee sink + let tmp%22#0: bytes = ((block BlkProtocol) 0u) + let tmp%23#0: uint64 = (len tmp%22#0) + let tmp%24#0: bool = (!= tmp%23#0 0u) + (assert tmp%24#0) // protocol + let tmp%25#0: uint64 = ((block BlkTxnCounter) 0u) let tmp%26#0: bool = (!= tmp%25#0 0u) - (assert tmp%26#0) // protocol - let tmp%27#0: uint64 = ((block BlkTxnCounter) 0u) + (assert tmp%26#0) // txn counter + let tmp%27#0: uint64 = ((block BlkProposerPayout) 0u) let tmp%28#0: bool = (!= tmp%27#0 0u) - (assert tmp%28#0) // txn counter - let tmp%29#0: uint64 = ((block BlkProposerPayout) 0u) - let tmp%30#0: bool = (!= tmp%29#0 0u) - (assert tmp%30#0) // proposer payout - let tmp%31#0: bool = (global PayoutsEnabled) - (assert tmp%31#0) // payouts_enabled - let tmp%32#0: uint64 = (global PayoutsGoOnlineFee) + (assert tmp%28#0) // proposer payout + let tmp%29#0: bool = (global PayoutsEnabled) + (assert tmp%29#0) // payouts_enabled + let tmp%30#0: uint64 = (global PayoutsGoOnlineFee) + let tmp%31#0: bool = (!= tmp%30#0 0u) + (assert tmp%31#0) // payouts_go_online_fee + let tmp%32#0: uint64 = (global PayoutsPercent) let tmp%33#0: bool = (!= tmp%32#0 0u) - (assert tmp%33#0) // payouts_go_online_fee - let tmp%34#0: uint64 = (global PayoutsPercent) + (assert tmp%33#0) // payouts_percent + let tmp%34#0: uint64 = (global PayoutsMinBalance) let tmp%35#0: bool = (!= tmp%34#0 0u) - (assert tmp%35#0) // payouts_percent - let tmp%36#0: uint64 = (global PayoutsMinBalance) + (assert tmp%35#0) // payouts_min_balance + let tmp%36#0: uint64 = (global PayoutsMaxBalance) let tmp%37#0: bool = (!= tmp%36#0 0u) - (assert tmp%37#0) // payouts_min_balance - let tmp%38#0: uint64 = (global PayoutsMaxBalance) - let tmp%39#0: bool = (!= tmp%38#0 0u) - (assert tmp%39#0) // payouts_max_balance + (assert tmp%37#0) // payouts_max_balance let (tuple_assignment%6#0: uint64, tuple_assignment%7#0: bool) = ((voter_params_get VoterBalance) 0u) let g#0: uint64 = tuple_assignment%6#0 let h#0: bool = tuple_assignment%7#0 diff --git a/test_cases/avm_11/out/Contract.ir/Contract.approval.1.ssa.opt.ir b/test_cases/avm_11/out/Contract.ir/Contract.approval.1.ssa.opt.ir index 206dc388a0..bb52d88735 100644 --- a/test_cases/avm_11/out/Contract.ir/Contract.approval.1.ssa.opt.ir +++ b/test_cases/avm_11/out/Contract.ir/Contract.approval.1.ssa.opt.ir @@ -2,10 +2,10 @@ main algopy.arc4.ARC4Contract.approval_program: block@0: // L1 let tmp%0#1: uint64 = (txn NumAppArgs) goto tmp%0#1 ? block@2 : block@6 - block@2: // abi_routing_L9 + block@2: // abi_routing_L4 let tmp%2#0: bytes = (txna ApplicationArgs 0) switch tmp%2#0 {method "test_new_ops()void" => block@3, * => block@10} - block@3: // test_new_ops_route_L10 + block@3: // test_new_ops_route_L5 let tmp%3#0: uint64 = (txn OnCompletion) let tmp%4#0: bool = (! tmp%3#0) (assert tmp%4#0) // OnCompletion is not NoOp @@ -14,7 +14,7 @@ main algopy.arc4.ARC4Contract.approval_program: test_cases.avm_11.contract.Contract.test_new_ops() let test_cases.avm_11.contract.Contract.__puya_arc4_router__%0#0: bool = 1u goto block@11 - block@6: // bare_routing_L9 + block@6: // bare_routing_L4 let tmp%7#0: uint64 = (txn OnCompletion) goto tmp%7#0 ? block@10 : block@7 block@7: // __algopy_default_create_L1 @@ -24,7 +24,7 @@ main algopy.arc4.ARC4Contract.approval_program: test_cases.avm_11.contract.Contract.__algopy_default_create() let test_cases.avm_11.contract.Contract.__puya_arc4_router__%0#1: bool = 1u goto block@11 - block@10: // after_if_else_L9 + block@10: // after_if_else_L4 let test_cases.avm_11.contract.Contract.__puya_arc4_router__%0#2: bool = 0u goto block@11 block@11: // after_inlined_test_cases.avm_11.contract.Contract.__puya_arc4_router___L1 @@ -32,51 +32,48 @@ main algopy.arc4.ARC4Contract.approval_program: return tmp%0#0 subroutine test_cases.avm_11.contract.Contract.test_new_ops() -> void: - block@0: // L10 - let tmp%0#0: bytes = (bzero 1793u) - let tmp%1#0: bool = (falcon_verify 0x 0x tmp%0#0) - let tmp%2#0: bool = (! tmp%1#0) - (assert tmp%2#0) - let tmp%3#0: bytes = (sumhash512 0x) + block@0: // L5 + let tmp%0#0: uint64 = online_stake + (assert tmp%0#0) + let tmp%2#0: bytes = (bzero 32u) + let tmp%3#0: bytes = ((mimc BN254Mp110) tmp%2#0) let tmp%4#0: uint64 = (len tmp%3#0) (assert tmp%4#0) - let tmp%6#0: uint64 = online_stake - (assert tmp%6#0) + let tmp%6#0: bytes = (txn Sender) + let tmp%7#0: bytes = (txn Sender) let tmp%8#0: bytes = (txn Sender) - let tmp%9#0: bytes = (txn Sender) - let tmp%10#0: bytes = (txn Sender) - let tmp%11#0: bytes = ((block BlkProposer) 0u) - let tmp%12#0: bytes = (global ZeroAddress) - let tmp%13#0: bool = (== tmp%11#0 tmp%12#0) - (assert tmp%13#0) // proposer - let tmp%14#0: uint64 = ((block BlkFeesCollected) 0u) - (assert tmp%14#0) // fees collected - let tmp%16#0: uint64 = ((block BlkBonus) 0u) - (assert tmp%16#0) // bonus - let tmp%18#0: bytes = ((block BlkBranch) 0u) - let tmp%19#0: uint64 = (len tmp%18#0) - (assert tmp%19#0) // branch - let tmp%21#0: bytes = ((block BlkFeeSink) 0u) - let tmp%22#0: bytes = (global ZeroAddress) - let tmp%23#0: bool = (!= tmp%21#0 tmp%22#0) - (assert tmp%23#0) // fee sink - let tmp%24#0: bytes = ((block BlkProtocol) 0u) - let tmp%25#0: uint64 = (len tmp%24#0) - (assert tmp%25#0) // protocol - let tmp%27#0: uint64 = ((block BlkTxnCounter) 0u) - (assert tmp%27#0) // txn counter - let tmp%29#0: uint64 = ((block BlkProposerPayout) 0u) - (assert tmp%29#0) // proposer payout - let tmp%31#0: bool = (global PayoutsEnabled) - (assert tmp%31#0) // payouts_enabled - let tmp%32#0: uint64 = (global PayoutsGoOnlineFee) - (assert tmp%32#0) // payouts_go_online_fee - let tmp%34#0: uint64 = (global PayoutsPercent) - (assert tmp%34#0) // payouts_percent - let tmp%36#0: uint64 = (global PayoutsMinBalance) - (assert tmp%36#0) // payouts_min_balance - let tmp%38#0: uint64 = (global PayoutsMaxBalance) - (assert tmp%38#0) // payouts_max_balance + let tmp%9#0: bytes = ((block BlkProposer) 0u) + let tmp%10#0: bytes = (global ZeroAddress) + let tmp%11#0: bool = (== tmp%9#0 tmp%10#0) + (assert tmp%11#0) // proposer + let tmp%12#0: uint64 = ((block BlkFeesCollected) 0u) + (assert tmp%12#0) // fees collected + let tmp%14#0: uint64 = ((block BlkBonus) 0u) + (assert tmp%14#0) // bonus + let tmp%16#0: bytes = ((block BlkBranch) 0u) + let tmp%17#0: uint64 = (len tmp%16#0) + (assert tmp%17#0) // branch + let tmp%19#0: bytes = ((block BlkFeeSink) 0u) + let tmp%20#0: bytes = (global ZeroAddress) + let tmp%21#0: bool = (!= tmp%19#0 tmp%20#0) + (assert tmp%21#0) // fee sink + let tmp%22#0: bytes = ((block BlkProtocol) 0u) + let tmp%23#0: uint64 = (len tmp%22#0) + (assert tmp%23#0) // protocol + let tmp%25#0: uint64 = ((block BlkTxnCounter) 0u) + (assert tmp%25#0) // txn counter + let tmp%27#0: uint64 = ((block BlkProposerPayout) 0u) + (assert tmp%27#0) // proposer payout + let tmp%29#0: bool = (global PayoutsEnabled) + (assert tmp%29#0) // payouts_enabled + let tmp%30#0: uint64 = (global PayoutsGoOnlineFee) + (assert tmp%30#0) // payouts_go_online_fee + let tmp%32#0: uint64 = (global PayoutsPercent) + (assert tmp%32#0) // payouts_percent + let tmp%34#0: uint64 = (global PayoutsMinBalance) + (assert tmp%34#0) // payouts_min_balance + let tmp%36#0: uint64 = (global PayoutsMaxBalance) + (assert tmp%36#0) // payouts_max_balance let (g#0: uint64, h#0: bool) = ((voter_params_get VoterBalance) 0u) let (i#0: bool, j#0: bool) = ((voter_params_get VoterIncentiveEligible) 0u) return diff --git a/test_cases/avm_11/out/Contract.ir/Contract.approval.10.mir b/test_cases/avm_11/out/Contract.ir/Contract.approval.10.mir index 65978d0587..624b932971 100644 --- a/test_cases/avm_11/out/Contract.ir/Contract.approval.10.mir +++ b/test_cases/avm_11/out/Contract.ir/Contract.approval.10.mir @@ -1,13 +1,13 @@ // Op Stack (out) // algopy.arc4.ARC4Contract.approval_program() -> uint64: main: - // avm_11/contract.py:9 + // avm_11/contract.py:4 // class Contract(ARC4Contract, avm_version=11): txn NumAppArgs tmp%0#1 bz main_bare_routing@6 ; b main_abi_routing@2 main_abi_routing@2: - // avm_11/contract.py:9 + // avm_11/contract.py:4 // class Contract(ARC4Contract, avm_version=11): txna ApplicationArgs 0 tmp%2#0 method test_new_ops()void tmp%2#0,Method(test_new_ops()void) @@ -15,7 +15,7 @@ main_abi_routing@2: match main_test_new_ops_route@3 ; b main_after_if_else@10 main_test_new_ops_route@3: - // avm_11/contract.py:10 + // avm_11/contract.py:5 // @arc4.abimethod txn OnCompletion tmp%3#0 ! tmp%4#0 @@ -28,7 +28,7 @@ main_test_new_ops_route@3: b main_after_inlined_test_cases.avm_11.contract.Contract.__puya_arc4_router__@11 (𝕏) tmp%0#0 | main_bare_routing@6: - // avm_11/contract.py:9 + // avm_11/contract.py:4 // class Contract(ARC4Contract, avm_version=11): txn OnCompletion tmp%7#0 bz main___algopy_default_create@7 ; b main_after_if_else@10 @@ -42,7 +42,7 @@ main___algopy_default_create@7: b main_after_inlined_test_cases.avm_11.contract.Contract.__puya_arc4_router__@11 (𝕏) tmp%0#0 | main_after_if_else@10: - // avm_11/contract.py:9 + // avm_11/contract.py:4 // class Contract(ARC4Contract, avm_version=11): int 0 tmp%0#0 x-store tmp%0#0 (𝕏) tmp%0#0 | @@ -55,103 +55,94 @@ main_after_inlined_test_cases.avm_11.contract.Contract.__puya_arc4_router__@11: // test_cases.avm_11.contract.Contract.test_new_ops() -> void: test_new_ops: - // avm_11/contract.py:13 - // assert not op.falcon_verify(b"", b"", op.bzero(1793)) - int 1793 1793 - bzero tmp%0#0 - byte 0x tmp%0#0,0x - byte 0x tmp%0#0,0x,0x - l-load tmp%0#0 2 0x,0x,tmp%0#0 - falcon_verify tmp%1#0 - ! tmp%2#0 + // avm_11/contract.py:8 + // assert op.online_stake() + online_stake tmp%0#0 assert - // avm_11/contract.py:14 - // assert op.sumhash512(b"") - byte 0x 0x - sumhash512 tmp%3#0 + // avm_11/contract.py:9 + // assert op.mimc(op.MiMCConfigurations.BN254Mp110, op.bzero(32)) + int 32 32 + bzero tmp%2#0 + mimc BN254Mp110 tmp%3#0 len tmp%4#0 assert - // avm_11/contract.py:15 - // assert op.online_stake() - online_stake tmp%6#0 - assert - // avm_11/contract.py:23 + // avm_11/contract.py:17 // assert not op.Block.blk_proposer(0), "proposer" int 0 0 - block BlkProposer tmp%11#0 - global ZeroAddress tmp%11#0,tmp%12#0 - l-load tmp%11#0 1 tmp%12#0,tmp%11#0 - l-load tmp%12#0 1 tmp%11#0,tmp%12#0 - == tmp%13#0 + block BlkProposer tmp%9#0 + global ZeroAddress tmp%9#0,tmp%10#0 + l-load tmp%9#0 1 tmp%10#0,tmp%9#0 + l-load tmp%10#0 1 tmp%9#0,tmp%10#0 + == tmp%11#0 assert // proposer - // avm_11/contract.py:24 + // avm_11/contract.py:18 // assert op.Block.blk_fees_collected(0), "fees collected" int 0 0 - block BlkFeesCollected tmp%14#0 + block BlkFeesCollected tmp%12#0 assert // fees collected - // avm_11/contract.py:25 + // avm_11/contract.py:19 // assert op.Block.blk_bonus(0), "bonus" int 0 0 - block BlkBonus tmp%16#0 + block BlkBonus tmp%14#0 assert // bonus - // avm_11/contract.py:26 + // avm_11/contract.py:20 // assert op.Block.blk_branch(0), "branch" int 0 0 - block BlkBranch tmp%18#0 - len tmp%19#0 + block BlkBranch tmp%16#0 + len tmp%17#0 assert // branch - // avm_11/contract.py:27 + // avm_11/contract.py:21 // assert op.Block.blk_fee_sink(0), "fee sink" int 0 0 - block BlkFeeSink tmp%21#0 - global ZeroAddress tmp%21#0,tmp%22#0 - l-load tmp%21#0 1 tmp%22#0,tmp%21#0 - l-load tmp%22#0 1 tmp%21#0,tmp%22#0 - != tmp%23#0 + block BlkFeeSink tmp%19#0 + global ZeroAddress tmp%19#0,tmp%20#0 + l-load tmp%19#0 1 tmp%20#0,tmp%19#0 + l-load tmp%20#0 1 tmp%19#0,tmp%20#0 + != tmp%21#0 assert // fee sink - // avm_11/contract.py:28 + // avm_11/contract.py:22 // assert op.Block.blk_protocol(0), "protocol" int 0 0 - block BlkProtocol tmp%24#0 - len tmp%25#0 + block BlkProtocol tmp%22#0 + len tmp%23#0 assert // protocol - // avm_11/contract.py:29 + // avm_11/contract.py:23 // assert op.Block.blk_txn_counter(0), "txn counter" int 0 0 - block BlkTxnCounter tmp%27#0 + block BlkTxnCounter tmp%25#0 assert // txn counter - // avm_11/contract.py:30 + // avm_11/contract.py:24 // assert op.Block.blk_proposer_payout(0), "proposer payout" int 0 0 - block BlkProposerPayout tmp%29#0 + block BlkProposerPayout tmp%27#0 assert // proposer payout - // avm_11/contract.py:33 + // avm_11/contract.py:27 // assert op.Global.payouts_enabled, "payouts_enabled" - global PayoutsEnabled tmp%31#0 + global PayoutsEnabled tmp%29#0 assert // payouts_enabled - // avm_11/contract.py:34 + // avm_11/contract.py:28 // assert op.Global.payouts_go_online_fee, "payouts_go_online_fee" - global PayoutsGoOnlineFee tmp%32#0 + global PayoutsGoOnlineFee tmp%30#0 assert // payouts_go_online_fee - // avm_11/contract.py:35 + // avm_11/contract.py:29 // assert op.Global.payouts_percent, "payouts_percent" - global PayoutsPercent tmp%34#0 + global PayoutsPercent tmp%32#0 assert // payouts_percent - // avm_11/contract.py:36 + // avm_11/contract.py:30 // assert op.Global.payouts_min_balance, "payouts_min_balance" - global PayoutsMinBalance tmp%36#0 + global PayoutsMinBalance tmp%34#0 assert // payouts_min_balance - // avm_11/contract.py:37 + // avm_11/contract.py:31 // assert op.Global.payouts_max_balance, "payouts_max_balance" - global PayoutsMaxBalance tmp%38#0 + global PayoutsMaxBalance tmp%36#0 assert // payouts_max_balance - // avm_11/contract.py:40 + // avm_11/contract.py:34 // g, h = op.VoterParamsGet.voter_balance(0) int 0 0 voter_params_get VoterBalance g#0,h#0 pop 1 g#0 pop 1 - // avm_11/contract.py:41 + // avm_11/contract.py:35 // i, j = op.VoterParamsGet.voter_incentive_eligible(0) int 0 0 voter_params_get VoterIncentiveEligible i#0,j#0 diff --git a/test_cases/avm_11/out/Contract.ir/Contract.approval.2.ssa.opt.ir b/test_cases/avm_11/out/Contract.ir/Contract.approval.2.ssa.opt.ir index 8a97f3f06d..241e254809 100644 --- a/test_cases/avm_11/out/Contract.ir/Contract.approval.2.ssa.opt.ir +++ b/test_cases/avm_11/out/Contract.ir/Contract.approval.2.ssa.opt.ir @@ -2,10 +2,10 @@ main algopy.arc4.ARC4Contract.approval_program: block@0: // L1 let tmp%0#1: uint64 = (txn NumAppArgs) goto tmp%0#1 ? block@2 : block@6 - block@2: // abi_routing_L9 + block@2: // abi_routing_L4 let tmp%2#0: bytes = (txna ApplicationArgs 0) switch tmp%2#0 {method "test_new_ops()void" => block@3, * => block@10} - block@3: // test_new_ops_route_L10 + block@3: // test_new_ops_route_L5 let tmp%3#0: uint64 = (txn OnCompletion) let tmp%4#0: bool = (! tmp%3#0) (assert tmp%4#0) // OnCompletion is not NoOp @@ -14,7 +14,7 @@ main algopy.arc4.ARC4Contract.approval_program: test_cases.avm_11.contract.Contract.test_new_ops() let test_cases.avm_11.contract.Contract.__puya_arc4_router__%0#0: bool = 1u goto block@11 - block@6: // bare_routing_L9 + block@6: // bare_routing_L4 let tmp%7#0: uint64 = (txn OnCompletion) goto tmp%7#0 ? block@10 : block@7 block@7: // __algopy_default_create_L1 @@ -23,7 +23,7 @@ main algopy.arc4.ARC4Contract.approval_program: (assert tmp%9#0) // can only call when creating let test_cases.avm_11.contract.Contract.__puya_arc4_router__%0#1: bool = 1u goto block@11 - block@10: // after_if_else_L9 + block@10: // after_if_else_L4 let test_cases.avm_11.contract.Contract.__puya_arc4_router__%0#2: bool = 0u goto block@11 block@11: // after_inlined_test_cases.avm_11.contract.Contract.__puya_arc4_router___L1 @@ -31,48 +31,45 @@ main algopy.arc4.ARC4Contract.approval_program: return tmp%0#0 subroutine test_cases.avm_11.contract.Contract.test_new_ops() -> void: - block@0: // L10 - let tmp%0#0: bytes = (bzero 1793u) - let tmp%1#0: bool = (falcon_verify 0x 0x tmp%0#0) - let tmp%2#0: bool = (! tmp%1#0) - (assert tmp%2#0) - let tmp%3#0: bytes = (sumhash512 0x) + block@0: // L5 + let tmp%0#0: uint64 = online_stake + (assert tmp%0#0) + let tmp%2#0: bytes = (bzero 32u) + let tmp%3#0: bytes = ((mimc BN254Mp110) tmp%2#0) let tmp%4#0: uint64 = (len tmp%3#0) (assert tmp%4#0) - let tmp%6#0: uint64 = online_stake - (assert tmp%6#0) - let tmp%11#0: bytes = ((block BlkProposer) 0u) - let tmp%12#0: bytes = (global ZeroAddress) - let tmp%13#0: bool = (== tmp%11#0 tmp%12#0) - (assert tmp%13#0) // proposer - let tmp%14#0: uint64 = ((block BlkFeesCollected) 0u) - (assert tmp%14#0) // fees collected - let tmp%16#0: uint64 = ((block BlkBonus) 0u) - (assert tmp%16#0) // bonus - let tmp%18#0: bytes = ((block BlkBranch) 0u) - let tmp%19#0: uint64 = (len tmp%18#0) - (assert tmp%19#0) // branch - let tmp%21#0: bytes = ((block BlkFeeSink) 0u) - let tmp%22#0: bytes = (global ZeroAddress) - let tmp%23#0: bool = (!= tmp%21#0 tmp%22#0) - (assert tmp%23#0) // fee sink - let tmp%24#0: bytes = ((block BlkProtocol) 0u) - let tmp%25#0: uint64 = (len tmp%24#0) - (assert tmp%25#0) // protocol - let tmp%27#0: uint64 = ((block BlkTxnCounter) 0u) - (assert tmp%27#0) // txn counter - let tmp%29#0: uint64 = ((block BlkProposerPayout) 0u) - (assert tmp%29#0) // proposer payout - let tmp%31#0: bool = (global PayoutsEnabled) - (assert tmp%31#0) // payouts_enabled - let tmp%32#0: uint64 = (global PayoutsGoOnlineFee) - (assert tmp%32#0) // payouts_go_online_fee - let tmp%34#0: uint64 = (global PayoutsPercent) - (assert tmp%34#0) // payouts_percent - let tmp%36#0: uint64 = (global PayoutsMinBalance) - (assert tmp%36#0) // payouts_min_balance - let tmp%38#0: uint64 = (global PayoutsMaxBalance) - (assert tmp%38#0) // payouts_max_balance + let tmp%9#0: bytes = ((block BlkProposer) 0u) + let tmp%10#0: bytes = (global ZeroAddress) + let tmp%11#0: bool = (== tmp%9#0 tmp%10#0) + (assert tmp%11#0) // proposer + let tmp%12#0: uint64 = ((block BlkFeesCollected) 0u) + (assert tmp%12#0) // fees collected + let tmp%14#0: uint64 = ((block BlkBonus) 0u) + (assert tmp%14#0) // bonus + let tmp%16#0: bytes = ((block BlkBranch) 0u) + let tmp%17#0: uint64 = (len tmp%16#0) + (assert tmp%17#0) // branch + let tmp%19#0: bytes = ((block BlkFeeSink) 0u) + let tmp%20#0: bytes = (global ZeroAddress) + let tmp%21#0: bool = (!= tmp%19#0 tmp%20#0) + (assert tmp%21#0) // fee sink + let tmp%22#0: bytes = ((block BlkProtocol) 0u) + let tmp%23#0: uint64 = (len tmp%22#0) + (assert tmp%23#0) // protocol + let tmp%25#0: uint64 = ((block BlkTxnCounter) 0u) + (assert tmp%25#0) // txn counter + let tmp%27#0: uint64 = ((block BlkProposerPayout) 0u) + (assert tmp%27#0) // proposer payout + let tmp%29#0: bool = (global PayoutsEnabled) + (assert tmp%29#0) // payouts_enabled + let tmp%30#0: uint64 = (global PayoutsGoOnlineFee) + (assert tmp%30#0) // payouts_go_online_fee + let tmp%32#0: uint64 = (global PayoutsPercent) + (assert tmp%32#0) // payouts_percent + let tmp%34#0: uint64 = (global PayoutsMinBalance) + (assert tmp%34#0) // payouts_min_balance + let tmp%36#0: uint64 = (global PayoutsMaxBalance) + (assert tmp%36#0) // payouts_max_balance let (g#0: uint64, h#0: bool) = ((voter_params_get VoterBalance) 0u) let (i#0: bool, j#0: bool) = ((voter_params_get VoterIncentiveEligible) 0u) return \ No newline at end of file diff --git a/test_cases/avm_11/out/Contract.ir/Contract.approval.3.destructured.ir b/test_cases/avm_11/out/Contract.ir/Contract.approval.3.destructured.ir index 0c27d21aa5..9ce5007a95 100644 --- a/test_cases/avm_11/out/Contract.ir/Contract.approval.3.destructured.ir +++ b/test_cases/avm_11/out/Contract.ir/Contract.approval.3.destructured.ir @@ -2,10 +2,10 @@ main algopy.arc4.ARC4Contract.approval_program: block@0: // L1 let tmp%0#1: uint64 = (txn NumAppArgs) goto tmp%0#1 ? block@2 : block@6 - block@2: // abi_routing_L9 + block@2: // abi_routing_L4 let tmp%2#0: bytes = (txna ApplicationArgs 0) switch tmp%2#0 {method "test_new_ops()void" => block@3, * => block@10} - block@3: // test_new_ops_route_L10 + block@3: // test_new_ops_route_L5 let tmp%3#0: uint64 = (txn OnCompletion) let tmp%4#0: bool = (! tmp%3#0) (assert tmp%4#0) // OnCompletion is not NoOp @@ -15,7 +15,7 @@ main algopy.arc4.ARC4Contract.approval_program: let test_cases.avm_11.contract.Contract.__puya_arc4_router__%0#0: bool = 1u let tmp%0#0: bool = test_cases.avm_11.contract.Contract.__puya_arc4_router__%0#0 goto block@11 - block@6: // bare_routing_L9 + block@6: // bare_routing_L4 let tmp%7#0: uint64 = (txn OnCompletion) goto tmp%7#0 ? block@10 : block@7 block@7: // __algopy_default_create_L1 @@ -25,7 +25,7 @@ main algopy.arc4.ARC4Contract.approval_program: let test_cases.avm_11.contract.Contract.__puya_arc4_router__%0#0: bool = 1u let tmp%0#0: bool = test_cases.avm_11.contract.Contract.__puya_arc4_router__%0#0 goto block@11 - block@10: // after_if_else_L9 + block@10: // after_if_else_L4 let test_cases.avm_11.contract.Contract.__puya_arc4_router__%0#0: bool = 0u let tmp%0#0: bool = test_cases.avm_11.contract.Contract.__puya_arc4_router__%0#0 goto block@11 @@ -33,48 +33,45 @@ main algopy.arc4.ARC4Contract.approval_program: return tmp%0#0 subroutine test_cases.avm_11.contract.Contract.test_new_ops() -> void: - block@0: // L10 - let tmp%0#0: bytes = (bzero 1793u) - let tmp%1#0: bool = (falcon_verify 0x 0x tmp%0#0) - let tmp%2#0: bool = (! tmp%1#0) - (assert tmp%2#0) - let tmp%3#0: bytes = (sumhash512 0x) + block@0: // L5 + let tmp%0#0: uint64 = online_stake + (assert tmp%0#0) + let tmp%2#0: bytes = (bzero 32u) + let tmp%3#0: bytes = ((mimc BN254Mp110) tmp%2#0) let tmp%4#0: uint64 = (len tmp%3#0) (assert tmp%4#0) - let tmp%6#0: uint64 = online_stake - (assert tmp%6#0) - let tmp%11#0: bytes = ((block BlkProposer) 0u) - let tmp%12#0: bytes = (global ZeroAddress) - let tmp%13#0: bool = (== tmp%11#0 tmp%12#0) - (assert tmp%13#0) // proposer - let tmp%14#0: uint64 = ((block BlkFeesCollected) 0u) - (assert tmp%14#0) // fees collected - let tmp%16#0: uint64 = ((block BlkBonus) 0u) - (assert tmp%16#0) // bonus - let tmp%18#0: bytes = ((block BlkBranch) 0u) - let tmp%19#0: uint64 = (len tmp%18#0) - (assert tmp%19#0) // branch - let tmp%21#0: bytes = ((block BlkFeeSink) 0u) - let tmp%22#0: bytes = (global ZeroAddress) - let tmp%23#0: bool = (!= tmp%21#0 tmp%22#0) - (assert tmp%23#0) // fee sink - let tmp%24#0: bytes = ((block BlkProtocol) 0u) - let tmp%25#0: uint64 = (len tmp%24#0) - (assert tmp%25#0) // protocol - let tmp%27#0: uint64 = ((block BlkTxnCounter) 0u) - (assert tmp%27#0) // txn counter - let tmp%29#0: uint64 = ((block BlkProposerPayout) 0u) - (assert tmp%29#0) // proposer payout - let tmp%31#0: bool = (global PayoutsEnabled) - (assert tmp%31#0) // payouts_enabled - let tmp%32#0: uint64 = (global PayoutsGoOnlineFee) - (assert tmp%32#0) // payouts_go_online_fee - let tmp%34#0: uint64 = (global PayoutsPercent) - (assert tmp%34#0) // payouts_percent - let tmp%36#0: uint64 = (global PayoutsMinBalance) - (assert tmp%36#0) // payouts_min_balance - let tmp%38#0: uint64 = (global PayoutsMaxBalance) - (assert tmp%38#0) // payouts_max_balance + let tmp%9#0: bytes = ((block BlkProposer) 0u) + let tmp%10#0: bytes = (global ZeroAddress) + let tmp%11#0: bool = (== tmp%9#0 tmp%10#0) + (assert tmp%11#0) // proposer + let tmp%12#0: uint64 = ((block BlkFeesCollected) 0u) + (assert tmp%12#0) // fees collected + let tmp%14#0: uint64 = ((block BlkBonus) 0u) + (assert tmp%14#0) // bonus + let tmp%16#0: bytes = ((block BlkBranch) 0u) + let tmp%17#0: uint64 = (len tmp%16#0) + (assert tmp%17#0) // branch + let tmp%19#0: bytes = ((block BlkFeeSink) 0u) + let tmp%20#0: bytes = (global ZeroAddress) + let tmp%21#0: bool = (!= tmp%19#0 tmp%20#0) + (assert tmp%21#0) // fee sink + let tmp%22#0: bytes = ((block BlkProtocol) 0u) + let tmp%23#0: uint64 = (len tmp%22#0) + (assert tmp%23#0) // protocol + let tmp%25#0: uint64 = ((block BlkTxnCounter) 0u) + (assert tmp%25#0) // txn counter + let tmp%27#0: uint64 = ((block BlkProposerPayout) 0u) + (assert tmp%27#0) // proposer payout + let tmp%29#0: bool = (global PayoutsEnabled) + (assert tmp%29#0) // payouts_enabled + let tmp%30#0: uint64 = (global PayoutsGoOnlineFee) + (assert tmp%30#0) // payouts_go_online_fee + let tmp%32#0: uint64 = (global PayoutsPercent) + (assert tmp%32#0) // payouts_percent + let tmp%34#0: uint64 = (global PayoutsMinBalance) + (assert tmp%34#0) // payouts_min_balance + let tmp%36#0: uint64 = (global PayoutsMaxBalance) + (assert tmp%36#0) // payouts_max_balance let (g#0: uint64, h#0: bool) = ((voter_params_get VoterBalance) 0u) let (i#0: bool, j#0: bool) = ((voter_params_get VoterIncentiveEligible) 0u) return \ No newline at end of file diff --git a/test_cases/avm_11/out/Contract.ir/Contract.approval.4.lstack.mir b/test_cases/avm_11/out/Contract.ir/Contract.approval.4.lstack.mir index b1d58c9706..e2da1600d5 100644 --- a/test_cases/avm_11/out/Contract.ir/Contract.approval.4.lstack.mir +++ b/test_cases/avm_11/out/Contract.ir/Contract.approval.4.lstack.mir @@ -1,14 +1,14 @@ // Op Stack (out) // algopy.arc4.ARC4Contract.approval_program() -> uint64: main: - // avm_11/contract.py:9 + // avm_11/contract.py:4 // class Contract(ARC4Contract, avm_version=11): txn NumAppArgs tmp%0#1 l-load tmp%0#1 0 tmp%0#1 bz main_bare_routing@6 ; b main_abi_routing@2 main_abi_routing@2: - // avm_11/contract.py:9 + // avm_11/contract.py:4 // class Contract(ARC4Contract, avm_version=11): txna ApplicationArgs 0 tmp%2#0 method test_new_ops()void tmp%2#0,Method(test_new_ops()void) @@ -16,7 +16,7 @@ main_abi_routing@2: match main_test_new_ops_route@3 ; b main_after_if_else@10 main_test_new_ops_route@3: - // avm_11/contract.py:10 + // avm_11/contract.py:5 // @arc4.abimethod txn OnCompletion tmp%3#0 l-load tmp%3#0 0 tmp%3#0 @@ -34,7 +34,7 @@ main_test_new_ops_route@3: b main_after_inlined_test_cases.avm_11.contract.Contract.__puya_arc4_router__@11 main_bare_routing@6: - // avm_11/contract.py:9 + // avm_11/contract.py:4 // class Contract(ARC4Contract, avm_version=11): txn OnCompletion tmp%7#0 l-load tmp%7#0 0 tmp%7#0 @@ -53,7 +53,7 @@ main___algopy_default_create@7: b main_after_inlined_test_cases.avm_11.contract.Contract.__puya_arc4_router__@11 main_after_if_else@10: - // avm_11/contract.py:9 + // avm_11/contract.py:4 // class Contract(ARC4Contract, avm_version=11): int 0 0 l-store test_cases.avm_11.contract.Contract.__puya_arc4_router__%0#0 0 test_cases.avm_11.contract.Contract.__puya_arc4_router__%0#0 @@ -68,123 +68,113 @@ main_after_inlined_test_cases.avm_11.contract.Contract.__puya_arc4_router__@11: // test_cases.avm_11.contract.Contract.test_new_ops() -> void: test_new_ops: - // avm_11/contract.py:13 - // assert not op.falcon_verify(b"", b"", op.bzero(1793)) - int 1793 1793 - bzero tmp%0#0 - byte 0x tmp%0#0,0x - byte 0x tmp%0#0,0x,0x - l-load tmp%0#0 2 0x,0x,tmp%0#0 - falcon_verify tmp%1#0 - l-load tmp%1#0 0 tmp%1#0 - ! tmp%2#0 - l-load tmp%2#0 0 tmp%2#0 + // avm_11/contract.py:8 + // assert op.online_stake() + online_stake tmp%0#0 + l-load tmp%0#0 0 tmp%0#0 assert - // avm_11/contract.py:14 - // assert op.sumhash512(b"") - byte 0x 0x - sumhash512 tmp%3#0 + // avm_11/contract.py:9 + // assert op.mimc(op.MiMCConfigurations.BN254Mp110, op.bzero(32)) + int 32 32 + bzero tmp%2#0 + l-load tmp%2#0 0 tmp%2#0 + mimc BN254Mp110 tmp%3#0 l-load tmp%3#0 0 tmp%3#0 len tmp%4#0 l-load tmp%4#0 0 tmp%4#0 assert - // avm_11/contract.py:15 - // assert op.online_stake() - online_stake tmp%6#0 - l-load tmp%6#0 0 tmp%6#0 - assert - // avm_11/contract.py:23 + // avm_11/contract.py:17 // assert not op.Block.blk_proposer(0), "proposer" int 0 0 - block BlkProposer tmp%11#0 - global ZeroAddress tmp%11#0,tmp%12#0 - l-load tmp%11#0 1 tmp%12#0,tmp%11#0 - l-load tmp%12#0 1 tmp%11#0,tmp%12#0 - == tmp%13#0 - l-load tmp%13#0 0 tmp%13#0 + block BlkProposer tmp%9#0 + global ZeroAddress tmp%9#0,tmp%10#0 + l-load tmp%9#0 1 tmp%10#0,tmp%9#0 + l-load tmp%10#0 1 tmp%9#0,tmp%10#0 + == tmp%11#0 + l-load tmp%11#0 0 tmp%11#0 assert // proposer - // avm_11/contract.py:24 + // avm_11/contract.py:18 // assert op.Block.blk_fees_collected(0), "fees collected" int 0 0 - block BlkFeesCollected tmp%14#0 - l-load tmp%14#0 0 tmp%14#0 + block BlkFeesCollected tmp%12#0 + l-load tmp%12#0 0 tmp%12#0 assert // fees collected - // avm_11/contract.py:25 + // avm_11/contract.py:19 // assert op.Block.blk_bonus(0), "bonus" int 0 0 - block BlkBonus tmp%16#0 - l-load tmp%16#0 0 tmp%16#0 + block BlkBonus tmp%14#0 + l-load tmp%14#0 0 tmp%14#0 assert // bonus - // avm_11/contract.py:26 + // avm_11/contract.py:20 // assert op.Block.blk_branch(0), "branch" int 0 0 - block BlkBranch tmp%18#0 - l-load tmp%18#0 0 tmp%18#0 - len tmp%19#0 - l-load tmp%19#0 0 tmp%19#0 + block BlkBranch tmp%16#0 + l-load tmp%16#0 0 tmp%16#0 + len tmp%17#0 + l-load tmp%17#0 0 tmp%17#0 assert // branch - // avm_11/contract.py:27 + // avm_11/contract.py:21 // assert op.Block.blk_fee_sink(0), "fee sink" int 0 0 - block BlkFeeSink tmp%21#0 - global ZeroAddress tmp%21#0,tmp%22#0 - l-load tmp%21#0 1 tmp%22#0,tmp%21#0 - l-load tmp%22#0 1 tmp%21#0,tmp%22#0 - != tmp%23#0 - l-load tmp%23#0 0 tmp%23#0 + block BlkFeeSink tmp%19#0 + global ZeroAddress tmp%19#0,tmp%20#0 + l-load tmp%19#0 1 tmp%20#0,tmp%19#0 + l-load tmp%20#0 1 tmp%19#0,tmp%20#0 + != tmp%21#0 + l-load tmp%21#0 0 tmp%21#0 assert // fee sink - // avm_11/contract.py:28 + // avm_11/contract.py:22 // assert op.Block.blk_protocol(0), "protocol" int 0 0 - block BlkProtocol tmp%24#0 - l-load tmp%24#0 0 tmp%24#0 - len tmp%25#0 - l-load tmp%25#0 0 tmp%25#0 + block BlkProtocol tmp%22#0 + l-load tmp%22#0 0 tmp%22#0 + len tmp%23#0 + l-load tmp%23#0 0 tmp%23#0 assert // protocol - // avm_11/contract.py:29 + // avm_11/contract.py:23 // assert op.Block.blk_txn_counter(0), "txn counter" int 0 0 - block BlkTxnCounter tmp%27#0 - l-load tmp%27#0 0 tmp%27#0 + block BlkTxnCounter tmp%25#0 + l-load tmp%25#0 0 tmp%25#0 assert // txn counter - // avm_11/contract.py:30 + // avm_11/contract.py:24 // assert op.Block.blk_proposer_payout(0), "proposer payout" int 0 0 - block BlkProposerPayout tmp%29#0 - l-load tmp%29#0 0 tmp%29#0 + block BlkProposerPayout tmp%27#0 + l-load tmp%27#0 0 tmp%27#0 assert // proposer payout - // avm_11/contract.py:33 + // avm_11/contract.py:27 // assert op.Global.payouts_enabled, "payouts_enabled" - global PayoutsEnabled tmp%31#0 - l-load tmp%31#0 0 tmp%31#0 + global PayoutsEnabled tmp%29#0 + l-load tmp%29#0 0 tmp%29#0 assert // payouts_enabled - // avm_11/contract.py:34 + // avm_11/contract.py:28 // assert op.Global.payouts_go_online_fee, "payouts_go_online_fee" - global PayoutsGoOnlineFee tmp%32#0 - l-load tmp%32#0 0 tmp%32#0 + global PayoutsGoOnlineFee tmp%30#0 + l-load tmp%30#0 0 tmp%30#0 assert // payouts_go_online_fee - // avm_11/contract.py:35 + // avm_11/contract.py:29 // assert op.Global.payouts_percent, "payouts_percent" - global PayoutsPercent tmp%34#0 - l-load tmp%34#0 0 tmp%34#0 + global PayoutsPercent tmp%32#0 + l-load tmp%32#0 0 tmp%32#0 assert // payouts_percent - // avm_11/contract.py:36 + // avm_11/contract.py:30 // assert op.Global.payouts_min_balance, "payouts_min_balance" - global PayoutsMinBalance tmp%36#0 - l-load tmp%36#0 0 tmp%36#0 + global PayoutsMinBalance tmp%34#0 + l-load tmp%34#0 0 tmp%34#0 assert // payouts_min_balance - // avm_11/contract.py:37 + // avm_11/contract.py:31 // assert op.Global.payouts_max_balance, "payouts_max_balance" - global PayoutsMaxBalance tmp%38#0 - l-load tmp%38#0 0 tmp%38#0 + global PayoutsMaxBalance tmp%36#0 + l-load tmp%36#0 0 tmp%36#0 assert // payouts_max_balance - // avm_11/contract.py:40 + // avm_11/contract.py:34 // g, h = op.VoterParamsGet.voter_balance(0) int 0 0 voter_params_get VoterBalance g#0,h#0 v-store h#0 g#0 v-store g#0 - // avm_11/contract.py:41 + // avm_11/contract.py:35 // i, j = op.VoterParamsGet.voter_incentive_eligible(0) int 0 0 voter_params_get VoterIncentiveEligible i#0,j#0 diff --git a/test_cases/avm_11/out/Contract.ir/Contract.approval.5.lstack.opt.mir b/test_cases/avm_11/out/Contract.ir/Contract.approval.5.lstack.opt.mir index 951704e388..badb8e6cbf 100644 --- a/test_cases/avm_11/out/Contract.ir/Contract.approval.5.lstack.opt.mir +++ b/test_cases/avm_11/out/Contract.ir/Contract.approval.5.lstack.opt.mir @@ -1,13 +1,13 @@ // Op Stack (out) // algopy.arc4.ARC4Contract.approval_program() -> uint64: main: - // avm_11/contract.py:9 + // avm_11/contract.py:4 // class Contract(ARC4Contract, avm_version=11): txn NumAppArgs tmp%0#1 bz main_bare_routing@6 ; b main_abi_routing@2 main_abi_routing@2: - // avm_11/contract.py:9 + // avm_11/contract.py:4 // class Contract(ARC4Contract, avm_version=11): txna ApplicationArgs 0 tmp%2#0 method test_new_ops()void tmp%2#0,Method(test_new_ops()void) @@ -15,7 +15,7 @@ main_abi_routing@2: match main_test_new_ops_route@3 ; b main_after_if_else@10 main_test_new_ops_route@3: - // avm_11/contract.py:10 + // avm_11/contract.py:5 // @arc4.abimethod txn OnCompletion tmp%3#0 ! tmp%4#0 @@ -28,7 +28,7 @@ main_test_new_ops_route@3: b main_after_inlined_test_cases.avm_11.contract.Contract.__puya_arc4_router__@11 main_bare_routing@6: - // avm_11/contract.py:9 + // avm_11/contract.py:4 // class Contract(ARC4Contract, avm_version=11): txn OnCompletion tmp%7#0 bz main___algopy_default_create@7 ; b main_after_if_else@10 @@ -42,7 +42,7 @@ main___algopy_default_create@7: b main_after_inlined_test_cases.avm_11.contract.Contract.__puya_arc4_router__@11 main_after_if_else@10: - // avm_11/contract.py:9 + // avm_11/contract.py:4 // class Contract(ARC4Contract, avm_version=11): int 0 test_cases.avm_11.contract.Contract.__puya_arc4_router__%0#0 v-store tmp%0#0 @@ -55,103 +55,94 @@ main_after_inlined_test_cases.avm_11.contract.Contract.__puya_arc4_router__@11: // test_cases.avm_11.contract.Contract.test_new_ops() -> void: test_new_ops: - // avm_11/contract.py:13 - // assert not op.falcon_verify(b"", b"", op.bzero(1793)) - int 1793 1793 - bzero tmp%0#0 - byte 0x tmp%0#0,0x - byte 0x tmp%0#0,0x,0x - l-load tmp%0#0 2 0x,0x,tmp%0#0 - falcon_verify tmp%1#0 - ! tmp%2#0 + // avm_11/contract.py:8 + // assert op.online_stake() + online_stake tmp%0#0 assert - // avm_11/contract.py:14 - // assert op.sumhash512(b"") - byte 0x 0x - sumhash512 tmp%3#0 + // avm_11/contract.py:9 + // assert op.mimc(op.MiMCConfigurations.BN254Mp110, op.bzero(32)) + int 32 32 + bzero tmp%2#0 + mimc BN254Mp110 tmp%3#0 len tmp%4#0 assert - // avm_11/contract.py:15 - // assert op.online_stake() - online_stake tmp%6#0 - assert - // avm_11/contract.py:23 + // avm_11/contract.py:17 // assert not op.Block.blk_proposer(0), "proposer" int 0 0 - block BlkProposer tmp%11#0 - global ZeroAddress tmp%11#0,tmp%12#0 - l-load tmp%11#0 1 tmp%12#0,tmp%11#0 - l-load tmp%12#0 1 tmp%11#0,tmp%12#0 - == tmp%13#0 + block BlkProposer tmp%9#0 + global ZeroAddress tmp%9#0,tmp%10#0 + l-load tmp%9#0 1 tmp%10#0,tmp%9#0 + l-load tmp%10#0 1 tmp%9#0,tmp%10#0 + == tmp%11#0 assert // proposer - // avm_11/contract.py:24 + // avm_11/contract.py:18 // assert op.Block.blk_fees_collected(0), "fees collected" int 0 0 - block BlkFeesCollected tmp%14#0 + block BlkFeesCollected tmp%12#0 assert // fees collected - // avm_11/contract.py:25 + // avm_11/contract.py:19 // assert op.Block.blk_bonus(0), "bonus" int 0 0 - block BlkBonus tmp%16#0 + block BlkBonus tmp%14#0 assert // bonus - // avm_11/contract.py:26 + // avm_11/contract.py:20 // assert op.Block.blk_branch(0), "branch" int 0 0 - block BlkBranch tmp%18#0 - len tmp%19#0 + block BlkBranch tmp%16#0 + len tmp%17#0 assert // branch - // avm_11/contract.py:27 + // avm_11/contract.py:21 // assert op.Block.blk_fee_sink(0), "fee sink" int 0 0 - block BlkFeeSink tmp%21#0 - global ZeroAddress tmp%21#0,tmp%22#0 - l-load tmp%21#0 1 tmp%22#0,tmp%21#0 - l-load tmp%22#0 1 tmp%21#0,tmp%22#0 - != tmp%23#0 + block BlkFeeSink tmp%19#0 + global ZeroAddress tmp%19#0,tmp%20#0 + l-load tmp%19#0 1 tmp%20#0,tmp%19#0 + l-load tmp%20#0 1 tmp%19#0,tmp%20#0 + != tmp%21#0 assert // fee sink - // avm_11/contract.py:28 + // avm_11/contract.py:22 // assert op.Block.blk_protocol(0), "protocol" int 0 0 - block BlkProtocol tmp%24#0 - len tmp%25#0 + block BlkProtocol tmp%22#0 + len tmp%23#0 assert // protocol - // avm_11/contract.py:29 + // avm_11/contract.py:23 // assert op.Block.blk_txn_counter(0), "txn counter" int 0 0 - block BlkTxnCounter tmp%27#0 + block BlkTxnCounter tmp%25#0 assert // txn counter - // avm_11/contract.py:30 + // avm_11/contract.py:24 // assert op.Block.blk_proposer_payout(0), "proposer payout" int 0 0 - block BlkProposerPayout tmp%29#0 + block BlkProposerPayout tmp%27#0 assert // proposer payout - // avm_11/contract.py:33 + // avm_11/contract.py:27 // assert op.Global.payouts_enabled, "payouts_enabled" - global PayoutsEnabled tmp%31#0 + global PayoutsEnabled tmp%29#0 assert // payouts_enabled - // avm_11/contract.py:34 + // avm_11/contract.py:28 // assert op.Global.payouts_go_online_fee, "payouts_go_online_fee" - global PayoutsGoOnlineFee tmp%32#0 + global PayoutsGoOnlineFee tmp%30#0 assert // payouts_go_online_fee - // avm_11/contract.py:35 + // avm_11/contract.py:29 // assert op.Global.payouts_percent, "payouts_percent" - global PayoutsPercent tmp%34#0 + global PayoutsPercent tmp%32#0 assert // payouts_percent - // avm_11/contract.py:36 + // avm_11/contract.py:30 // assert op.Global.payouts_min_balance, "payouts_min_balance" - global PayoutsMinBalance tmp%36#0 + global PayoutsMinBalance tmp%34#0 assert // payouts_min_balance - // avm_11/contract.py:37 + // avm_11/contract.py:31 // assert op.Global.payouts_max_balance, "payouts_max_balance" - global PayoutsMaxBalance tmp%38#0 + global PayoutsMaxBalance tmp%36#0 assert // payouts_max_balance - // avm_11/contract.py:40 + // avm_11/contract.py:34 // g, h = op.VoterParamsGet.voter_balance(0) int 0 0 voter_params_get VoterBalance g#0,h#0 pop 1 g#0 pop 1 - // avm_11/contract.py:41 + // avm_11/contract.py:35 // i, j = op.VoterParamsGet.voter_incentive_eligible(0) int 0 0 voter_params_get VoterIncentiveEligible i#0,j#0 diff --git a/test_cases/avm_11/out/Contract.ir/Contract.approval.6.xstack.mir b/test_cases/avm_11/out/Contract.ir/Contract.approval.6.xstack.mir index 0258e5f596..be08a5dd06 100644 --- a/test_cases/avm_11/out/Contract.ir/Contract.approval.6.xstack.mir +++ b/test_cases/avm_11/out/Contract.ir/Contract.approval.6.xstack.mir @@ -1,13 +1,13 @@ // Op Stack (out) // algopy.arc4.ARC4Contract.approval_program() -> uint64: main: - // avm_11/contract.py:9 + // avm_11/contract.py:4 // class Contract(ARC4Contract, avm_version=11): txn NumAppArgs tmp%0#1 bz main_bare_routing@6 ; b main_abi_routing@2 main_abi_routing@2: - // avm_11/contract.py:9 + // avm_11/contract.py:4 // class Contract(ARC4Contract, avm_version=11): txna ApplicationArgs 0 tmp%2#0 method test_new_ops()void tmp%2#0,Method(test_new_ops()void) @@ -15,7 +15,7 @@ main_abi_routing@2: match main_test_new_ops_route@3 ; b main_after_if_else@10 main_test_new_ops_route@3: - // avm_11/contract.py:10 + // avm_11/contract.py:5 // @arc4.abimethod txn OnCompletion tmp%3#0 ! tmp%4#0 @@ -28,7 +28,7 @@ main_test_new_ops_route@3: b main_after_inlined_test_cases.avm_11.contract.Contract.__puya_arc4_router__@11 (𝕏) tmp%0#0 | main_bare_routing@6: - // avm_11/contract.py:9 + // avm_11/contract.py:4 // class Contract(ARC4Contract, avm_version=11): txn OnCompletion tmp%7#0 bz main___algopy_default_create@7 ; b main_after_if_else@10 @@ -42,7 +42,7 @@ main___algopy_default_create@7: b main_after_inlined_test_cases.avm_11.contract.Contract.__puya_arc4_router__@11 (𝕏) tmp%0#0 | main_after_if_else@10: - // avm_11/contract.py:9 + // avm_11/contract.py:4 // class Contract(ARC4Contract, avm_version=11): int 0 test_cases.avm_11.contract.Contract.__puya_arc4_router__%0#0 x-store tmp%0#0 (𝕏) tmp%0#0 | @@ -55,103 +55,94 @@ main_after_inlined_test_cases.avm_11.contract.Contract.__puya_arc4_router__@11: // test_cases.avm_11.contract.Contract.test_new_ops() -> void: test_new_ops: - // avm_11/contract.py:13 - // assert not op.falcon_verify(b"", b"", op.bzero(1793)) - int 1793 1793 - bzero tmp%0#0 - byte 0x tmp%0#0,0x - byte 0x tmp%0#0,0x,0x - l-load tmp%0#0 2 0x,0x,tmp%0#0 - falcon_verify tmp%1#0 - ! tmp%2#0 + // avm_11/contract.py:8 + // assert op.online_stake() + online_stake tmp%0#0 assert - // avm_11/contract.py:14 - // assert op.sumhash512(b"") - byte 0x 0x - sumhash512 tmp%3#0 + // avm_11/contract.py:9 + // assert op.mimc(op.MiMCConfigurations.BN254Mp110, op.bzero(32)) + int 32 32 + bzero tmp%2#0 + mimc BN254Mp110 tmp%3#0 len tmp%4#0 assert - // avm_11/contract.py:15 - // assert op.online_stake() - online_stake tmp%6#0 - assert - // avm_11/contract.py:23 + // avm_11/contract.py:17 // assert not op.Block.blk_proposer(0), "proposer" int 0 0 - block BlkProposer tmp%11#0 - global ZeroAddress tmp%11#0,tmp%12#0 - l-load tmp%11#0 1 tmp%12#0,tmp%11#0 - l-load tmp%12#0 1 tmp%11#0,tmp%12#0 - == tmp%13#0 + block BlkProposer tmp%9#0 + global ZeroAddress tmp%9#0,tmp%10#0 + l-load tmp%9#0 1 tmp%10#0,tmp%9#0 + l-load tmp%10#0 1 tmp%9#0,tmp%10#0 + == tmp%11#0 assert // proposer - // avm_11/contract.py:24 + // avm_11/contract.py:18 // assert op.Block.blk_fees_collected(0), "fees collected" int 0 0 - block BlkFeesCollected tmp%14#0 + block BlkFeesCollected tmp%12#0 assert // fees collected - // avm_11/contract.py:25 + // avm_11/contract.py:19 // assert op.Block.blk_bonus(0), "bonus" int 0 0 - block BlkBonus tmp%16#0 + block BlkBonus tmp%14#0 assert // bonus - // avm_11/contract.py:26 + // avm_11/contract.py:20 // assert op.Block.blk_branch(0), "branch" int 0 0 - block BlkBranch tmp%18#0 - len tmp%19#0 + block BlkBranch tmp%16#0 + len tmp%17#0 assert // branch - // avm_11/contract.py:27 + // avm_11/contract.py:21 // assert op.Block.blk_fee_sink(0), "fee sink" int 0 0 - block BlkFeeSink tmp%21#0 - global ZeroAddress tmp%21#0,tmp%22#0 - l-load tmp%21#0 1 tmp%22#0,tmp%21#0 - l-load tmp%22#0 1 tmp%21#0,tmp%22#0 - != tmp%23#0 + block BlkFeeSink tmp%19#0 + global ZeroAddress tmp%19#0,tmp%20#0 + l-load tmp%19#0 1 tmp%20#0,tmp%19#0 + l-load tmp%20#0 1 tmp%19#0,tmp%20#0 + != tmp%21#0 assert // fee sink - // avm_11/contract.py:28 + // avm_11/contract.py:22 // assert op.Block.blk_protocol(0), "protocol" int 0 0 - block BlkProtocol tmp%24#0 - len tmp%25#0 + block BlkProtocol tmp%22#0 + len tmp%23#0 assert // protocol - // avm_11/contract.py:29 + // avm_11/contract.py:23 // assert op.Block.blk_txn_counter(0), "txn counter" int 0 0 - block BlkTxnCounter tmp%27#0 + block BlkTxnCounter tmp%25#0 assert // txn counter - // avm_11/contract.py:30 + // avm_11/contract.py:24 // assert op.Block.blk_proposer_payout(0), "proposer payout" int 0 0 - block BlkProposerPayout tmp%29#0 + block BlkProposerPayout tmp%27#0 assert // proposer payout - // avm_11/contract.py:33 + // avm_11/contract.py:27 // assert op.Global.payouts_enabled, "payouts_enabled" - global PayoutsEnabled tmp%31#0 + global PayoutsEnabled tmp%29#0 assert // payouts_enabled - // avm_11/contract.py:34 + // avm_11/contract.py:28 // assert op.Global.payouts_go_online_fee, "payouts_go_online_fee" - global PayoutsGoOnlineFee tmp%32#0 + global PayoutsGoOnlineFee tmp%30#0 assert // payouts_go_online_fee - // avm_11/contract.py:35 + // avm_11/contract.py:29 // assert op.Global.payouts_percent, "payouts_percent" - global PayoutsPercent tmp%34#0 + global PayoutsPercent tmp%32#0 assert // payouts_percent - // avm_11/contract.py:36 + // avm_11/contract.py:30 // assert op.Global.payouts_min_balance, "payouts_min_balance" - global PayoutsMinBalance tmp%36#0 + global PayoutsMinBalance tmp%34#0 assert // payouts_min_balance - // avm_11/contract.py:37 + // avm_11/contract.py:31 // assert op.Global.payouts_max_balance, "payouts_max_balance" - global PayoutsMaxBalance tmp%38#0 + global PayoutsMaxBalance tmp%36#0 assert // payouts_max_balance - // avm_11/contract.py:40 + // avm_11/contract.py:34 // g, h = op.VoterParamsGet.voter_balance(0) int 0 0 voter_params_get VoterBalance g#0,h#0 pop 1 g#0 pop 1 - // avm_11/contract.py:41 + // avm_11/contract.py:35 // i, j = op.VoterParamsGet.voter_incentive_eligible(0) int 0 0 voter_params_get VoterIncentiveEligible i#0,j#0 diff --git a/test_cases/avm_11/out/Contract.ir/Contract.approval.7.xstack.opt.mir b/test_cases/avm_11/out/Contract.ir/Contract.approval.7.xstack.opt.mir index 65978d0587..624b932971 100644 --- a/test_cases/avm_11/out/Contract.ir/Contract.approval.7.xstack.opt.mir +++ b/test_cases/avm_11/out/Contract.ir/Contract.approval.7.xstack.opt.mir @@ -1,13 +1,13 @@ // Op Stack (out) // algopy.arc4.ARC4Contract.approval_program() -> uint64: main: - // avm_11/contract.py:9 + // avm_11/contract.py:4 // class Contract(ARC4Contract, avm_version=11): txn NumAppArgs tmp%0#1 bz main_bare_routing@6 ; b main_abi_routing@2 main_abi_routing@2: - // avm_11/contract.py:9 + // avm_11/contract.py:4 // class Contract(ARC4Contract, avm_version=11): txna ApplicationArgs 0 tmp%2#0 method test_new_ops()void tmp%2#0,Method(test_new_ops()void) @@ -15,7 +15,7 @@ main_abi_routing@2: match main_test_new_ops_route@3 ; b main_after_if_else@10 main_test_new_ops_route@3: - // avm_11/contract.py:10 + // avm_11/contract.py:5 // @arc4.abimethod txn OnCompletion tmp%3#0 ! tmp%4#0 @@ -28,7 +28,7 @@ main_test_new_ops_route@3: b main_after_inlined_test_cases.avm_11.contract.Contract.__puya_arc4_router__@11 (𝕏) tmp%0#0 | main_bare_routing@6: - // avm_11/contract.py:9 + // avm_11/contract.py:4 // class Contract(ARC4Contract, avm_version=11): txn OnCompletion tmp%7#0 bz main___algopy_default_create@7 ; b main_after_if_else@10 @@ -42,7 +42,7 @@ main___algopy_default_create@7: b main_after_inlined_test_cases.avm_11.contract.Contract.__puya_arc4_router__@11 (𝕏) tmp%0#0 | main_after_if_else@10: - // avm_11/contract.py:9 + // avm_11/contract.py:4 // class Contract(ARC4Contract, avm_version=11): int 0 tmp%0#0 x-store tmp%0#0 (𝕏) tmp%0#0 | @@ -55,103 +55,94 @@ main_after_inlined_test_cases.avm_11.contract.Contract.__puya_arc4_router__@11: // test_cases.avm_11.contract.Contract.test_new_ops() -> void: test_new_ops: - // avm_11/contract.py:13 - // assert not op.falcon_verify(b"", b"", op.bzero(1793)) - int 1793 1793 - bzero tmp%0#0 - byte 0x tmp%0#0,0x - byte 0x tmp%0#0,0x,0x - l-load tmp%0#0 2 0x,0x,tmp%0#0 - falcon_verify tmp%1#0 - ! tmp%2#0 + // avm_11/contract.py:8 + // assert op.online_stake() + online_stake tmp%0#0 assert - // avm_11/contract.py:14 - // assert op.sumhash512(b"") - byte 0x 0x - sumhash512 tmp%3#0 + // avm_11/contract.py:9 + // assert op.mimc(op.MiMCConfigurations.BN254Mp110, op.bzero(32)) + int 32 32 + bzero tmp%2#0 + mimc BN254Mp110 tmp%3#0 len tmp%4#0 assert - // avm_11/contract.py:15 - // assert op.online_stake() - online_stake tmp%6#0 - assert - // avm_11/contract.py:23 + // avm_11/contract.py:17 // assert not op.Block.blk_proposer(0), "proposer" int 0 0 - block BlkProposer tmp%11#0 - global ZeroAddress tmp%11#0,tmp%12#0 - l-load tmp%11#0 1 tmp%12#0,tmp%11#0 - l-load tmp%12#0 1 tmp%11#0,tmp%12#0 - == tmp%13#0 + block BlkProposer tmp%9#0 + global ZeroAddress tmp%9#0,tmp%10#0 + l-load tmp%9#0 1 tmp%10#0,tmp%9#0 + l-load tmp%10#0 1 tmp%9#0,tmp%10#0 + == tmp%11#0 assert // proposer - // avm_11/contract.py:24 + // avm_11/contract.py:18 // assert op.Block.blk_fees_collected(0), "fees collected" int 0 0 - block BlkFeesCollected tmp%14#0 + block BlkFeesCollected tmp%12#0 assert // fees collected - // avm_11/contract.py:25 + // avm_11/contract.py:19 // assert op.Block.blk_bonus(0), "bonus" int 0 0 - block BlkBonus tmp%16#0 + block BlkBonus tmp%14#0 assert // bonus - // avm_11/contract.py:26 + // avm_11/contract.py:20 // assert op.Block.blk_branch(0), "branch" int 0 0 - block BlkBranch tmp%18#0 - len tmp%19#0 + block BlkBranch tmp%16#0 + len tmp%17#0 assert // branch - // avm_11/contract.py:27 + // avm_11/contract.py:21 // assert op.Block.blk_fee_sink(0), "fee sink" int 0 0 - block BlkFeeSink tmp%21#0 - global ZeroAddress tmp%21#0,tmp%22#0 - l-load tmp%21#0 1 tmp%22#0,tmp%21#0 - l-load tmp%22#0 1 tmp%21#0,tmp%22#0 - != tmp%23#0 + block BlkFeeSink tmp%19#0 + global ZeroAddress tmp%19#0,tmp%20#0 + l-load tmp%19#0 1 tmp%20#0,tmp%19#0 + l-load tmp%20#0 1 tmp%19#0,tmp%20#0 + != tmp%21#0 assert // fee sink - // avm_11/contract.py:28 + // avm_11/contract.py:22 // assert op.Block.blk_protocol(0), "protocol" int 0 0 - block BlkProtocol tmp%24#0 - len tmp%25#0 + block BlkProtocol tmp%22#0 + len tmp%23#0 assert // protocol - // avm_11/contract.py:29 + // avm_11/contract.py:23 // assert op.Block.blk_txn_counter(0), "txn counter" int 0 0 - block BlkTxnCounter tmp%27#0 + block BlkTxnCounter tmp%25#0 assert // txn counter - // avm_11/contract.py:30 + // avm_11/contract.py:24 // assert op.Block.blk_proposer_payout(0), "proposer payout" int 0 0 - block BlkProposerPayout tmp%29#0 + block BlkProposerPayout tmp%27#0 assert // proposer payout - // avm_11/contract.py:33 + // avm_11/contract.py:27 // assert op.Global.payouts_enabled, "payouts_enabled" - global PayoutsEnabled tmp%31#0 + global PayoutsEnabled tmp%29#0 assert // payouts_enabled - // avm_11/contract.py:34 + // avm_11/contract.py:28 // assert op.Global.payouts_go_online_fee, "payouts_go_online_fee" - global PayoutsGoOnlineFee tmp%32#0 + global PayoutsGoOnlineFee tmp%30#0 assert // payouts_go_online_fee - // avm_11/contract.py:35 + // avm_11/contract.py:29 // assert op.Global.payouts_percent, "payouts_percent" - global PayoutsPercent tmp%34#0 + global PayoutsPercent tmp%32#0 assert // payouts_percent - // avm_11/contract.py:36 + // avm_11/contract.py:30 // assert op.Global.payouts_min_balance, "payouts_min_balance" - global PayoutsMinBalance tmp%36#0 + global PayoutsMinBalance tmp%34#0 assert // payouts_min_balance - // avm_11/contract.py:37 + // avm_11/contract.py:31 // assert op.Global.payouts_max_balance, "payouts_max_balance" - global PayoutsMaxBalance tmp%38#0 + global PayoutsMaxBalance tmp%36#0 assert // payouts_max_balance - // avm_11/contract.py:40 + // avm_11/contract.py:34 // g, h = op.VoterParamsGet.voter_balance(0) int 0 0 voter_params_get VoterBalance g#0,h#0 pop 1 g#0 pop 1 - // avm_11/contract.py:41 + // avm_11/contract.py:35 // i, j = op.VoterParamsGet.voter_incentive_eligible(0) int 0 0 voter_params_get VoterIncentiveEligible i#0,j#0 diff --git a/test_cases/avm_11/out/Contract.ir/Contract.approval.8.fstack.mir b/test_cases/avm_11/out/Contract.ir/Contract.approval.8.fstack.mir index 65978d0587..624b932971 100644 --- a/test_cases/avm_11/out/Contract.ir/Contract.approval.8.fstack.mir +++ b/test_cases/avm_11/out/Contract.ir/Contract.approval.8.fstack.mir @@ -1,13 +1,13 @@ // Op Stack (out) // algopy.arc4.ARC4Contract.approval_program() -> uint64: main: - // avm_11/contract.py:9 + // avm_11/contract.py:4 // class Contract(ARC4Contract, avm_version=11): txn NumAppArgs tmp%0#1 bz main_bare_routing@6 ; b main_abi_routing@2 main_abi_routing@2: - // avm_11/contract.py:9 + // avm_11/contract.py:4 // class Contract(ARC4Contract, avm_version=11): txna ApplicationArgs 0 tmp%2#0 method test_new_ops()void tmp%2#0,Method(test_new_ops()void) @@ -15,7 +15,7 @@ main_abi_routing@2: match main_test_new_ops_route@3 ; b main_after_if_else@10 main_test_new_ops_route@3: - // avm_11/contract.py:10 + // avm_11/contract.py:5 // @arc4.abimethod txn OnCompletion tmp%3#0 ! tmp%4#0 @@ -28,7 +28,7 @@ main_test_new_ops_route@3: b main_after_inlined_test_cases.avm_11.contract.Contract.__puya_arc4_router__@11 (𝕏) tmp%0#0 | main_bare_routing@6: - // avm_11/contract.py:9 + // avm_11/contract.py:4 // class Contract(ARC4Contract, avm_version=11): txn OnCompletion tmp%7#0 bz main___algopy_default_create@7 ; b main_after_if_else@10 @@ -42,7 +42,7 @@ main___algopy_default_create@7: b main_after_inlined_test_cases.avm_11.contract.Contract.__puya_arc4_router__@11 (𝕏) tmp%0#0 | main_after_if_else@10: - // avm_11/contract.py:9 + // avm_11/contract.py:4 // class Contract(ARC4Contract, avm_version=11): int 0 tmp%0#0 x-store tmp%0#0 (𝕏) tmp%0#0 | @@ -55,103 +55,94 @@ main_after_inlined_test_cases.avm_11.contract.Contract.__puya_arc4_router__@11: // test_cases.avm_11.contract.Contract.test_new_ops() -> void: test_new_ops: - // avm_11/contract.py:13 - // assert not op.falcon_verify(b"", b"", op.bzero(1793)) - int 1793 1793 - bzero tmp%0#0 - byte 0x tmp%0#0,0x - byte 0x tmp%0#0,0x,0x - l-load tmp%0#0 2 0x,0x,tmp%0#0 - falcon_verify tmp%1#0 - ! tmp%2#0 + // avm_11/contract.py:8 + // assert op.online_stake() + online_stake tmp%0#0 assert - // avm_11/contract.py:14 - // assert op.sumhash512(b"") - byte 0x 0x - sumhash512 tmp%3#0 + // avm_11/contract.py:9 + // assert op.mimc(op.MiMCConfigurations.BN254Mp110, op.bzero(32)) + int 32 32 + bzero tmp%2#0 + mimc BN254Mp110 tmp%3#0 len tmp%4#0 assert - // avm_11/contract.py:15 - // assert op.online_stake() - online_stake tmp%6#0 - assert - // avm_11/contract.py:23 + // avm_11/contract.py:17 // assert not op.Block.blk_proposer(0), "proposer" int 0 0 - block BlkProposer tmp%11#0 - global ZeroAddress tmp%11#0,tmp%12#0 - l-load tmp%11#0 1 tmp%12#0,tmp%11#0 - l-load tmp%12#0 1 tmp%11#0,tmp%12#0 - == tmp%13#0 + block BlkProposer tmp%9#0 + global ZeroAddress tmp%9#0,tmp%10#0 + l-load tmp%9#0 1 tmp%10#0,tmp%9#0 + l-load tmp%10#0 1 tmp%9#0,tmp%10#0 + == tmp%11#0 assert // proposer - // avm_11/contract.py:24 + // avm_11/contract.py:18 // assert op.Block.blk_fees_collected(0), "fees collected" int 0 0 - block BlkFeesCollected tmp%14#0 + block BlkFeesCollected tmp%12#0 assert // fees collected - // avm_11/contract.py:25 + // avm_11/contract.py:19 // assert op.Block.blk_bonus(0), "bonus" int 0 0 - block BlkBonus tmp%16#0 + block BlkBonus tmp%14#0 assert // bonus - // avm_11/contract.py:26 + // avm_11/contract.py:20 // assert op.Block.blk_branch(0), "branch" int 0 0 - block BlkBranch tmp%18#0 - len tmp%19#0 + block BlkBranch tmp%16#0 + len tmp%17#0 assert // branch - // avm_11/contract.py:27 + // avm_11/contract.py:21 // assert op.Block.blk_fee_sink(0), "fee sink" int 0 0 - block BlkFeeSink tmp%21#0 - global ZeroAddress tmp%21#0,tmp%22#0 - l-load tmp%21#0 1 tmp%22#0,tmp%21#0 - l-load tmp%22#0 1 tmp%21#0,tmp%22#0 - != tmp%23#0 + block BlkFeeSink tmp%19#0 + global ZeroAddress tmp%19#0,tmp%20#0 + l-load tmp%19#0 1 tmp%20#0,tmp%19#0 + l-load tmp%20#0 1 tmp%19#0,tmp%20#0 + != tmp%21#0 assert // fee sink - // avm_11/contract.py:28 + // avm_11/contract.py:22 // assert op.Block.blk_protocol(0), "protocol" int 0 0 - block BlkProtocol tmp%24#0 - len tmp%25#0 + block BlkProtocol tmp%22#0 + len tmp%23#0 assert // protocol - // avm_11/contract.py:29 + // avm_11/contract.py:23 // assert op.Block.blk_txn_counter(0), "txn counter" int 0 0 - block BlkTxnCounter tmp%27#0 + block BlkTxnCounter tmp%25#0 assert // txn counter - // avm_11/contract.py:30 + // avm_11/contract.py:24 // assert op.Block.blk_proposer_payout(0), "proposer payout" int 0 0 - block BlkProposerPayout tmp%29#0 + block BlkProposerPayout tmp%27#0 assert // proposer payout - // avm_11/contract.py:33 + // avm_11/contract.py:27 // assert op.Global.payouts_enabled, "payouts_enabled" - global PayoutsEnabled tmp%31#0 + global PayoutsEnabled tmp%29#0 assert // payouts_enabled - // avm_11/contract.py:34 + // avm_11/contract.py:28 // assert op.Global.payouts_go_online_fee, "payouts_go_online_fee" - global PayoutsGoOnlineFee tmp%32#0 + global PayoutsGoOnlineFee tmp%30#0 assert // payouts_go_online_fee - // avm_11/contract.py:35 + // avm_11/contract.py:29 // assert op.Global.payouts_percent, "payouts_percent" - global PayoutsPercent tmp%34#0 + global PayoutsPercent tmp%32#0 assert // payouts_percent - // avm_11/contract.py:36 + // avm_11/contract.py:30 // assert op.Global.payouts_min_balance, "payouts_min_balance" - global PayoutsMinBalance tmp%36#0 + global PayoutsMinBalance tmp%34#0 assert // payouts_min_balance - // avm_11/contract.py:37 + // avm_11/contract.py:31 // assert op.Global.payouts_max_balance, "payouts_max_balance" - global PayoutsMaxBalance tmp%38#0 + global PayoutsMaxBalance tmp%36#0 assert // payouts_max_balance - // avm_11/contract.py:40 + // avm_11/contract.py:34 // g, h = op.VoterParamsGet.voter_balance(0) int 0 0 voter_params_get VoterBalance g#0,h#0 pop 1 g#0 pop 1 - // avm_11/contract.py:41 + // avm_11/contract.py:35 // i, j = op.VoterParamsGet.voter_incentive_eligible(0) int 0 0 voter_params_get VoterIncentiveEligible i#0,j#0 diff --git a/test_cases/avm_11/out/Contract.ir/Contract.approval.9.fstack.opt.mir b/test_cases/avm_11/out/Contract.ir/Contract.approval.9.fstack.opt.mir index 65978d0587..624b932971 100644 --- a/test_cases/avm_11/out/Contract.ir/Contract.approval.9.fstack.opt.mir +++ b/test_cases/avm_11/out/Contract.ir/Contract.approval.9.fstack.opt.mir @@ -1,13 +1,13 @@ // Op Stack (out) // algopy.arc4.ARC4Contract.approval_program() -> uint64: main: - // avm_11/contract.py:9 + // avm_11/contract.py:4 // class Contract(ARC4Contract, avm_version=11): txn NumAppArgs tmp%0#1 bz main_bare_routing@6 ; b main_abi_routing@2 main_abi_routing@2: - // avm_11/contract.py:9 + // avm_11/contract.py:4 // class Contract(ARC4Contract, avm_version=11): txna ApplicationArgs 0 tmp%2#0 method test_new_ops()void tmp%2#0,Method(test_new_ops()void) @@ -15,7 +15,7 @@ main_abi_routing@2: match main_test_new_ops_route@3 ; b main_after_if_else@10 main_test_new_ops_route@3: - // avm_11/contract.py:10 + // avm_11/contract.py:5 // @arc4.abimethod txn OnCompletion tmp%3#0 ! tmp%4#0 @@ -28,7 +28,7 @@ main_test_new_ops_route@3: b main_after_inlined_test_cases.avm_11.contract.Contract.__puya_arc4_router__@11 (𝕏) tmp%0#0 | main_bare_routing@6: - // avm_11/contract.py:9 + // avm_11/contract.py:4 // class Contract(ARC4Contract, avm_version=11): txn OnCompletion tmp%7#0 bz main___algopy_default_create@7 ; b main_after_if_else@10 @@ -42,7 +42,7 @@ main___algopy_default_create@7: b main_after_inlined_test_cases.avm_11.contract.Contract.__puya_arc4_router__@11 (𝕏) tmp%0#0 | main_after_if_else@10: - // avm_11/contract.py:9 + // avm_11/contract.py:4 // class Contract(ARC4Contract, avm_version=11): int 0 tmp%0#0 x-store tmp%0#0 (𝕏) tmp%0#0 | @@ -55,103 +55,94 @@ main_after_inlined_test_cases.avm_11.contract.Contract.__puya_arc4_router__@11: // test_cases.avm_11.contract.Contract.test_new_ops() -> void: test_new_ops: - // avm_11/contract.py:13 - // assert not op.falcon_verify(b"", b"", op.bzero(1793)) - int 1793 1793 - bzero tmp%0#0 - byte 0x tmp%0#0,0x - byte 0x tmp%0#0,0x,0x - l-load tmp%0#0 2 0x,0x,tmp%0#0 - falcon_verify tmp%1#0 - ! tmp%2#0 + // avm_11/contract.py:8 + // assert op.online_stake() + online_stake tmp%0#0 assert - // avm_11/contract.py:14 - // assert op.sumhash512(b"") - byte 0x 0x - sumhash512 tmp%3#0 + // avm_11/contract.py:9 + // assert op.mimc(op.MiMCConfigurations.BN254Mp110, op.bzero(32)) + int 32 32 + bzero tmp%2#0 + mimc BN254Mp110 tmp%3#0 len tmp%4#0 assert - // avm_11/contract.py:15 - // assert op.online_stake() - online_stake tmp%6#0 - assert - // avm_11/contract.py:23 + // avm_11/contract.py:17 // assert not op.Block.blk_proposer(0), "proposer" int 0 0 - block BlkProposer tmp%11#0 - global ZeroAddress tmp%11#0,tmp%12#0 - l-load tmp%11#0 1 tmp%12#0,tmp%11#0 - l-load tmp%12#0 1 tmp%11#0,tmp%12#0 - == tmp%13#0 + block BlkProposer tmp%9#0 + global ZeroAddress tmp%9#0,tmp%10#0 + l-load tmp%9#0 1 tmp%10#0,tmp%9#0 + l-load tmp%10#0 1 tmp%9#0,tmp%10#0 + == tmp%11#0 assert // proposer - // avm_11/contract.py:24 + // avm_11/contract.py:18 // assert op.Block.blk_fees_collected(0), "fees collected" int 0 0 - block BlkFeesCollected tmp%14#0 + block BlkFeesCollected tmp%12#0 assert // fees collected - // avm_11/contract.py:25 + // avm_11/contract.py:19 // assert op.Block.blk_bonus(0), "bonus" int 0 0 - block BlkBonus tmp%16#0 + block BlkBonus tmp%14#0 assert // bonus - // avm_11/contract.py:26 + // avm_11/contract.py:20 // assert op.Block.blk_branch(0), "branch" int 0 0 - block BlkBranch tmp%18#0 - len tmp%19#0 + block BlkBranch tmp%16#0 + len tmp%17#0 assert // branch - // avm_11/contract.py:27 + // avm_11/contract.py:21 // assert op.Block.blk_fee_sink(0), "fee sink" int 0 0 - block BlkFeeSink tmp%21#0 - global ZeroAddress tmp%21#0,tmp%22#0 - l-load tmp%21#0 1 tmp%22#0,tmp%21#0 - l-load tmp%22#0 1 tmp%21#0,tmp%22#0 - != tmp%23#0 + block BlkFeeSink tmp%19#0 + global ZeroAddress tmp%19#0,tmp%20#0 + l-load tmp%19#0 1 tmp%20#0,tmp%19#0 + l-load tmp%20#0 1 tmp%19#0,tmp%20#0 + != tmp%21#0 assert // fee sink - // avm_11/contract.py:28 + // avm_11/contract.py:22 // assert op.Block.blk_protocol(0), "protocol" int 0 0 - block BlkProtocol tmp%24#0 - len tmp%25#0 + block BlkProtocol tmp%22#0 + len tmp%23#0 assert // protocol - // avm_11/contract.py:29 + // avm_11/contract.py:23 // assert op.Block.blk_txn_counter(0), "txn counter" int 0 0 - block BlkTxnCounter tmp%27#0 + block BlkTxnCounter tmp%25#0 assert // txn counter - // avm_11/contract.py:30 + // avm_11/contract.py:24 // assert op.Block.blk_proposer_payout(0), "proposer payout" int 0 0 - block BlkProposerPayout tmp%29#0 + block BlkProposerPayout tmp%27#0 assert // proposer payout - // avm_11/contract.py:33 + // avm_11/contract.py:27 // assert op.Global.payouts_enabled, "payouts_enabled" - global PayoutsEnabled tmp%31#0 + global PayoutsEnabled tmp%29#0 assert // payouts_enabled - // avm_11/contract.py:34 + // avm_11/contract.py:28 // assert op.Global.payouts_go_online_fee, "payouts_go_online_fee" - global PayoutsGoOnlineFee tmp%32#0 + global PayoutsGoOnlineFee tmp%30#0 assert // payouts_go_online_fee - // avm_11/contract.py:35 + // avm_11/contract.py:29 // assert op.Global.payouts_percent, "payouts_percent" - global PayoutsPercent tmp%34#0 + global PayoutsPercent tmp%32#0 assert // payouts_percent - // avm_11/contract.py:36 + // avm_11/contract.py:30 // assert op.Global.payouts_min_balance, "payouts_min_balance" - global PayoutsMinBalance tmp%36#0 + global PayoutsMinBalance tmp%34#0 assert // payouts_min_balance - // avm_11/contract.py:37 + // avm_11/contract.py:31 // assert op.Global.payouts_max_balance, "payouts_max_balance" - global PayoutsMaxBalance tmp%38#0 + global PayoutsMaxBalance tmp%36#0 assert // payouts_max_balance - // avm_11/contract.py:40 + // avm_11/contract.py:34 // g, h = op.VoterParamsGet.voter_balance(0) int 0 0 voter_params_get VoterBalance g#0,h#0 pop 1 g#0 pop 1 - // avm_11/contract.py:41 + // avm_11/contract.py:35 // i, j = op.VoterParamsGet.voter_incentive_eligible(0) int 0 0 voter_params_get VoterIncentiveEligible i#0,j#0 diff --git a/test_cases/avm_11/out/avm_11_sig.ir/avm_11_sig.7.fstack.opt.mir b/test_cases/avm_11/out/avm_11_sig.ir/avm_11_sig.7.fstack.opt.mir deleted file mode 100644 index 1ef7148193..0000000000 --- a/test_cases/avm_11/out/avm_11_sig.ir/avm_11_sig.7.fstack.opt.mir +++ /dev/null @@ -1,11 +0,0 @@ -// Op Stack (out) -// test_cases.avm_11.contract.avm_11_sig() -> uint64: -main: - // avm_11/contract.py:6 - // return op.sumhash512(b"").length - byte 0x 0x - sumhash512 tmp%0#0 - len tmp%1#0 - return - - diff --git a/test_cases/avm_11/out/avm_11_sig.ir/avm_11_sig.8.mir b/test_cases/avm_11/out/avm_11_sig.ir/avm_11_sig.8.mir deleted file mode 100644 index 1ef7148193..0000000000 --- a/test_cases/avm_11/out/avm_11_sig.ir/avm_11_sig.8.mir +++ /dev/null @@ -1,11 +0,0 @@ -// Op Stack (out) -// test_cases.avm_11.contract.avm_11_sig() -> uint64: -main: - // avm_11/contract.py:6 - // return op.sumhash512(b"").length - byte 0x 0x - sumhash512 tmp%0#0 - len tmp%1#0 - return - - diff --git a/test_cases/avm_11/out/module.awst b/test_cases/avm_11/out/module.awst index 1d1ae024a2..109b460e92 100644 --- a/test_cases/avm_11/out/module.awst +++ b/test_cases/avm_11/out/module.awst @@ -1,8 +1,3 @@ -logicsig test_cases.avm_11.contract.avm_11_sig -{ - return len(sumhash512(hex<"">)) -} - contract Contract { method_resolution_order: ( @@ -21,9 +16,8 @@ contract Contract abimethod test_cases.avm_11.contract.Contract.test_new_ops(): void { - assert(!(falcon_verify(hex<"">, hex<"">, bzero(1793u)))) - assert(len(sumhash512(hex<"">)) != 0u) assert(online_stake() != 0u) + assert(len(mimc(bzero(32u))) != 0u) (a, b): tuple = acct_params_get(txn()) (c, d): tuple = acct_params_get(txn()) (e, f): tuple = acct_params_get(txn()) diff --git a/test_cases/avm_11/out_O2/Contract.approval.puya.map b/test_cases/avm_11/out_O2/Contract.approval.puya.map index ef637fd4f8..e371aee0cc 100644 --- a/test_cases/avm_11/out_O2/Contract.approval.puya.map +++ b/test_cases/avm_11/out_O2/Contract.approval.puya.map @@ -3,7 +3,7 @@ "sources": [ "../contract.py" ], - "mappings": ";;;;;AAQA;;AAAA;;;AAAA;;;;;;AAAA;;;AAAA;;;;AAAA;;AACK;;AAAA;AAAA;AAAA;;AAAA;AAGkD;;;AAAT;AAAV;;AAAK;AAAtB;;AAAA;AAAJ;AAAP;AACqB;;AAAd;AAAA;AAAP;AACO;AAAP;AAQiC;AAAtB;;AAAJ;;AAAA;AAAP;AACmC;AAA5B;;AAAP;AAC0B;AAAnB;;AAAP;AAC2B;AAApB;;AAAA;AAAP;AAC6B;AAAtB;;AAAA;;AAAA;AAAP;AAC6B;AAAtB;;AAAA;AAAP;AACgC;AAAzB;;AAAP;AACoC;AAA7B;;AAAP;AAGO;;AAAP;AACO;;AAAP;AACO;;AAAP;AACO;;AAAP;AACO;;AAAP;AAGuC;AAAhC;;AAAA;;AAC2C;AAA3C;;AAAA;;AA/BV;;AADL;;AAAA;;;;;;;;", + "mappings": ";;;;;AAGA;;AAAA;;;AAAA;;;;;;AAAA;;;AAAA;;;;AAAA;;AACK;;AAAA;AAAA;AAAA;;AAAA;AAGU;AAAP;AAC0D;;AAAT;AAA1C;;AAAA;AAAP;AAQiC;AAAtB;;AAAJ;;AAAA;AAAP;AACmC;AAA5B;;AAAP;AAC0B;AAAnB;;AAAP;AAC2B;AAApB;;AAAA;AAAP;AAC6B;AAAtB;;AAAA;;AAAA;AAAP;AAC6B;AAAtB;;AAAA;AAAP;AACgC;AAAzB;;AAAP;AACoC;AAA7B;;AAAP;AAGO;;AAAP;AACO;;AAAP;AACO;;AAAP;AACO;;AAAP;AACO;;AAAP;AAGuC;AAAhC;;AAAA;;AAC2C;AAA3C;;AAAA;;AA9BV;;AADL;;AAAA;;;;;;;;", "op_pc_offset": 0, "pc_events": { "1": { @@ -89,80 +89,38 @@ "stack_out": [] }, "32": { - "op": "pushint 1793 // 1793", - "defined_out": [ - "1793" - ], - "stack_out": [ - "1793" - ] - }, - "35": { - "op": "bzero", - "defined_out": [ - "tmp%0#2" - ], - "stack_out": [ - "tmp%0#2" - ] - }, - "36": { - "op": "pushbytes 0x", + "op": "online_stake", "defined_out": [ - "0x", - "tmp%0#2" + "tmp%0#1" ], "stack_out": [ - "tmp%0#2", - "0x" - ] - }, - "38": { - "op": "dup", - "stack_out": [ - "tmp%0#2", - "0x", - "0x" + "tmp%0#1" ] }, - "39": { - "op": "uncover 2", - "stack_out": [ - "0x", - "0x", - "tmp%0#2" - ] + "33": { + "op": "assert", + "stack_out": [] }, - "41": { - "op": "falcon_verify", + "34": { + "op": "pushint 32 // 32", "defined_out": [ - "tmp%1#0" + "32" ], "stack_out": [ - "tmp%1#0" + "32" ] }, - "42": { - "op": "!", + "36": { + "op": "bzero", "defined_out": [ - "tmp%2#1" + "tmp%2#0" ], "stack_out": [ - "tmp%2#1" - ] - }, - "43": { - "op": "assert", - "stack_out": [] - }, - "44": { - "op": "pushbytes 0x", - "stack_out": [ - "0x" + "tmp%2#0" ] }, - "46": { - "op": "sumhash512", + "37": { + "op": "mimc BN254Mp110", "defined_out": [ "tmp%3#1" ], @@ -170,7 +128,7 @@ "tmp%3#1" ] }, - "47": { + "39": { "op": "len", "defined_out": [ "tmp%4#1" @@ -179,24 +137,11 @@ "tmp%4#1" ] }, - "48": { - "op": "assert", - "stack_out": [] - }, - "49": { - "op": "online_stake", - "defined_out": [ - "tmp%6#0" - ], - "stack_out": [ - "tmp%6#0" - ] - }, - "50": { + "40": { "op": "assert", "stack_out": [] }, - "51": { + "41": { "op": "intc_0 // 0", "defined_out": [ "0" @@ -205,295 +150,295 @@ "0" ] }, - "52": { + "42": { "op": "block BlkProposer", "defined_out": [ - "tmp%11#0" + "tmp%9#1" ], "stack_out": [ - "tmp%11#0" + "tmp%9#1" ] }, - "54": { + "44": { "op": "global ZeroAddress", "defined_out": [ - "tmp%11#0", - "tmp%12#0" + "tmp%10#0", + "tmp%9#1" ], "stack_out": [ - "tmp%11#0", - "tmp%12#0" + "tmp%9#1", + "tmp%10#0" ] }, - "56": { + "46": { "op": "==", "defined_out": [ - "tmp%13#0" + "tmp%11#0" ], "stack_out": [ - "tmp%13#0" + "tmp%11#0" ] }, - "57": { + "47": { "error": "proposer", "op": "assert // proposer", "stack_out": [] }, - "58": { + "48": { "op": "intc_0 // 0", "stack_out": [ "0" ] }, - "59": { + "49": { "op": "block BlkFeesCollected", "defined_out": [ - "tmp%14#0" + "tmp%12#0" ], "stack_out": [ - "tmp%14#0" + "tmp%12#0" ] }, - "61": { + "51": { "error": "fees collected", "op": "assert // fees collected", "stack_out": [] }, - "62": { + "52": { "op": "intc_0 // 0", "stack_out": [ "0" ] }, - "63": { + "53": { "op": "block BlkBonus", "defined_out": [ - "tmp%16#0" + "tmp%14#0" ], "stack_out": [ - "tmp%16#0" + "tmp%14#0" ] }, - "65": { + "55": { "error": "bonus", "op": "assert // bonus", "stack_out": [] }, - "66": { + "56": { "op": "intc_0 // 0", "stack_out": [ "0" ] }, - "67": { + "57": { "op": "block BlkBranch", "defined_out": [ - "tmp%18#0" + "tmp%16#0" ], "stack_out": [ - "tmp%18#0" + "tmp%16#0" ] }, - "69": { + "59": { "op": "len", "defined_out": [ - "tmp%19#0" + "tmp%17#0" ], "stack_out": [ - "tmp%19#0" + "tmp%17#0" ] }, - "70": { + "60": { "error": "branch", "op": "assert // branch", "stack_out": [] }, - "71": { + "61": { "op": "intc_0 // 0", "stack_out": [ "0" ] }, - "72": { + "62": { "op": "block BlkFeeSink", "defined_out": [ - "tmp%21#0" + "tmp%19#0" ], "stack_out": [ - "tmp%21#0" + "tmp%19#0" ] }, - "74": { + "64": { "op": "global ZeroAddress", "defined_out": [ - "tmp%21#0", - "tmp%22#0" + "tmp%19#0", + "tmp%20#0" ], "stack_out": [ - "tmp%21#0", - "tmp%22#0" + "tmp%19#0", + "tmp%20#0" ] }, - "76": { + "66": { "op": "!=", "defined_out": [ - "tmp%23#0" + "tmp%21#0" ], "stack_out": [ - "tmp%23#0" + "tmp%21#0" ] }, - "77": { + "67": { "error": "fee sink", "op": "assert // fee sink", "stack_out": [] }, - "78": { + "68": { "op": "intc_0 // 0", "stack_out": [ "0" ] }, - "79": { + "69": { "op": "block BlkProtocol", "defined_out": [ - "tmp%24#0" + "tmp%22#0" ], "stack_out": [ - "tmp%24#0" + "tmp%22#0" ] }, - "81": { + "71": { "op": "len", "defined_out": [ - "tmp%25#0" + "tmp%23#0" ], "stack_out": [ - "tmp%25#0" + "tmp%23#0" ] }, - "82": { + "72": { "error": "protocol", "op": "assert // protocol", "stack_out": [] }, - "83": { + "73": { "op": "intc_0 // 0", "stack_out": [ "0" ] }, - "84": { + "74": { "op": "block BlkTxnCounter", "defined_out": [ - "tmp%27#0" + "tmp%25#0" ], "stack_out": [ - "tmp%27#0" + "tmp%25#0" ] }, - "86": { + "76": { "error": "txn counter", "op": "assert // txn counter", "stack_out": [] }, - "87": { + "77": { "op": "intc_0 // 0", "stack_out": [ "0" ] }, - "88": { + "78": { "op": "block BlkProposerPayout", "defined_out": [ - "tmp%29#0" + "tmp%27#0" ], "stack_out": [ - "tmp%29#0" + "tmp%27#0" ] }, - "90": { + "80": { "error": "proposer payout", "op": "assert // proposer payout", "stack_out": [] }, - "91": { + "81": { "op": "global PayoutsEnabled", "defined_out": [ - "tmp%31#0" + "tmp%29#0" ], "stack_out": [ - "tmp%31#0" + "tmp%29#0" ] }, - "93": { + "83": { "error": "payouts_enabled", "op": "assert // payouts_enabled", "stack_out": [] }, - "94": { + "84": { "op": "global PayoutsGoOnlineFee", "defined_out": [ - "tmp%32#0" + "tmp%30#0" ], "stack_out": [ - "tmp%32#0" + "tmp%30#0" ] }, - "96": { + "86": { "error": "payouts_go_online_fee", "op": "assert // payouts_go_online_fee", "stack_out": [] }, - "97": { + "87": { "op": "global PayoutsPercent", "defined_out": [ - "tmp%34#0" + "tmp%32#0" ], "stack_out": [ - "tmp%34#0" + "tmp%32#0" ] }, - "99": { + "89": { "error": "payouts_percent", "op": "assert // payouts_percent", "stack_out": [] }, - "100": { + "90": { "op": "global PayoutsMinBalance", "defined_out": [ - "tmp%36#0" + "tmp%34#0" ], "stack_out": [ - "tmp%36#0" + "tmp%34#0" ] }, - "102": { + "92": { "error": "payouts_min_balance", "op": "assert // payouts_min_balance", "stack_out": [] }, - "103": { + "93": { "op": "global PayoutsMaxBalance", "defined_out": [ - "tmp%38#0" + "tmp%36#0" ], "stack_out": [ - "tmp%38#0" + "tmp%36#0" ] }, - "105": { + "95": { "error": "payouts_max_balance", "op": "assert // payouts_max_balance", "stack_out": [] }, - "106": { + "96": { "op": "intc_0 // 0", "stack_out": [ "0" ] }, - "107": { + "97": { "op": "voter_params_get VoterBalance", "defined_out": [ "g#0", @@ -504,17 +449,17 @@ "h#0" ] }, - "109": { + "99": { "op": "popn 2", "stack_out": [] }, - "111": { + "101": { "op": "intc_0 // 0", "stack_out": [ "0" ] }, - "112": { + "102": { "op": "voter_params_get VoterIncentiveEligible", "defined_out": [ "i#0", @@ -525,11 +470,11 @@ "j#0" ] }, - "114": { + "104": { "op": "popn 2", "stack_out": [] }, - "116": { + "106": { "op": "intc_1 // 1", "defined_out": [ "tmp%0#0" @@ -538,10 +483,10 @@ "tmp%0#0" ] }, - "117": { + "107": { "op": "return" }, - "118": { + "108": { "block": "main_bare_routing@6", "stack_in": [], "op": "txn OnCompletion", @@ -552,24 +497,24 @@ "tmp%7#0" ] }, - "120": { + "110": { "op": "bnz main_after_if_else@10", "stack_out": [] }, - "123": { + "113": { "op": "txn ApplicationID" }, - "125": { + "115": { "op": "!" }, - "126": { + "116": { "error": "can only call when creating", "op": "assert // can only call when creating" }, - "127": { + "117": { "op": "intc_1 // 1" }, - "128": { + "118": { "op": "return" } } diff --git a/test_cases/avm_11/out_O2/Contract.approval.teal b/test_cases/avm_11/out_O2/Contract.approval.teal index 252fb4716c..4f81c44111 100644 --- a/test_cases/avm_11/out_O2/Contract.approval.teal +++ b/test_cases/avm_11/out_O2/Contract.approval.teal @@ -20,20 +20,13 @@ main_test_new_ops_route@3: assert // OnCompletion is not NoOp txn ApplicationID assert // can only call when not creating - pushint 1793 // 1793 - bzero - pushbytes 0x - dup - uncover 2 - falcon_verify - ! + online_stake assert - pushbytes 0x - sumhash512 + pushint 32 // 32 + bzero + mimc BN254Mp110 len assert - online_stake - assert intc_0 // 0 block BlkProposer global ZeroAddress diff --git a/test_cases/avm_11/out_O2/Contract.ir/Contract.approval.0.destructured.ir b/test_cases/avm_11/out_O2/Contract.ir/Contract.approval.0.destructured.ir index ac3b248c61..0edb5ceb6d 100644 --- a/test_cases/avm_11/out_O2/Contract.ir/Contract.approval.0.destructured.ir +++ b/test_cases/avm_11/out_O2/Contract.ir/Contract.approval.0.destructured.ir @@ -2,62 +2,59 @@ main algopy.arc4.ARC4Contract.approval_program: block@0: // L1 let tmp%0#1: uint64 = (txn NumAppArgs) goto tmp%0#1 ? block@2 : block@6 - block@2: // abi_routing_L9 + block@2: // abi_routing_L4 let tmp%2#0: bytes = (txna ApplicationArgs 0) switch tmp%2#0 {method "test_new_ops()void" => block@3, * => block@10} - block@3: // test_new_ops_route_L10 + block@3: // test_new_ops_route_L5 let tmp%3#0: uint64 = (txn OnCompletion) let tmp%4#0: bool = (! tmp%3#0) (assert tmp%4#0) // OnCompletion is not NoOp let tmp%5#0: uint64 = (txn ApplicationID) (assert tmp%5#0) // can only call when not creating - let tmp%0#2: bytes = (bzero 1793u) - let tmp%1#0: bool = (falcon_verify 0x 0x tmp%0#2) - let tmp%2#1: bool = (! tmp%1#0) - (assert tmp%2#1) - let tmp%3#1: bytes = (sumhash512 0x) + let tmp%0#1: uint64 = online_stake + (assert tmp%0#1) + let tmp%2#0: bytes = (bzero 32u) + let tmp%3#1: bytes = ((mimc BN254Mp110) tmp%2#0) let tmp%4#1: uint64 = (len tmp%3#1) (assert tmp%4#1) - let tmp%6#0: uint64 = online_stake - (assert tmp%6#0) - let tmp%11#0: bytes = ((block BlkProposer) 0u) - let tmp%12#0: bytes = (global ZeroAddress) - let tmp%13#0: bool = (== tmp%11#0 tmp%12#0) - (assert tmp%13#0) // proposer - let tmp%14#0: uint64 = ((block BlkFeesCollected) 0u) - (assert tmp%14#0) // fees collected - let tmp%16#0: uint64 = ((block BlkBonus) 0u) - (assert tmp%16#0) // bonus - let tmp%18#0: bytes = ((block BlkBranch) 0u) - let tmp%19#0: uint64 = (len tmp%18#0) - (assert tmp%19#0) // branch - let tmp%21#0: bytes = ((block BlkFeeSink) 0u) - let tmp%22#0: bytes = (global ZeroAddress) - let tmp%23#0: bool = (!= tmp%21#0 tmp%22#0) - (assert tmp%23#0) // fee sink - let tmp%24#0: bytes = ((block BlkProtocol) 0u) - let tmp%25#0: uint64 = (len tmp%24#0) - (assert tmp%25#0) // protocol - let tmp%27#0: uint64 = ((block BlkTxnCounter) 0u) - (assert tmp%27#0) // txn counter - let tmp%29#0: uint64 = ((block BlkProposerPayout) 0u) - (assert tmp%29#0) // proposer payout - let tmp%31#0: bool = (global PayoutsEnabled) - (assert tmp%31#0) // payouts_enabled - let tmp%32#0: uint64 = (global PayoutsGoOnlineFee) - (assert tmp%32#0) // payouts_go_online_fee - let tmp%34#0: uint64 = (global PayoutsPercent) - (assert tmp%34#0) // payouts_percent - let tmp%36#0: uint64 = (global PayoutsMinBalance) - (assert tmp%36#0) // payouts_min_balance - let tmp%38#0: uint64 = (global PayoutsMaxBalance) - (assert tmp%38#0) // payouts_max_balance + let tmp%9#1: bytes = ((block BlkProposer) 0u) + let tmp%10#0: bytes = (global ZeroAddress) + let tmp%11#0: bool = (== tmp%9#1 tmp%10#0) + (assert tmp%11#0) // proposer + let tmp%12#0: uint64 = ((block BlkFeesCollected) 0u) + (assert tmp%12#0) // fees collected + let tmp%14#0: uint64 = ((block BlkBonus) 0u) + (assert tmp%14#0) // bonus + let tmp%16#0: bytes = ((block BlkBranch) 0u) + let tmp%17#0: uint64 = (len tmp%16#0) + (assert tmp%17#0) // branch + let tmp%19#0: bytes = ((block BlkFeeSink) 0u) + let tmp%20#0: bytes = (global ZeroAddress) + let tmp%21#0: bool = (!= tmp%19#0 tmp%20#0) + (assert tmp%21#0) // fee sink + let tmp%22#0: bytes = ((block BlkProtocol) 0u) + let tmp%23#0: uint64 = (len tmp%22#0) + (assert tmp%23#0) // protocol + let tmp%25#0: uint64 = ((block BlkTxnCounter) 0u) + (assert tmp%25#0) // txn counter + let tmp%27#0: uint64 = ((block BlkProposerPayout) 0u) + (assert tmp%27#0) // proposer payout + let tmp%29#0: bool = (global PayoutsEnabled) + (assert tmp%29#0) // payouts_enabled + let tmp%30#0: uint64 = (global PayoutsGoOnlineFee) + (assert tmp%30#0) // payouts_go_online_fee + let tmp%32#0: uint64 = (global PayoutsPercent) + (assert tmp%32#0) // payouts_percent + let tmp%34#0: uint64 = (global PayoutsMinBalance) + (assert tmp%34#0) // payouts_min_balance + let tmp%36#0: uint64 = (global PayoutsMaxBalance) + (assert tmp%36#0) // payouts_max_balance let (g#0: uint64, h#0: bool) = ((voter_params_get VoterBalance) 0u) let (i#0: bool, j#0: bool) = ((voter_params_get VoterIncentiveEligible) 0u) let test_cases.avm_11.contract.Contract.__puya_arc4_router__%0#0: bool = 1u let tmp%0#0: bool = test_cases.avm_11.contract.Contract.__puya_arc4_router__%0#0 goto block@11 - block@6: // bare_routing_L9 + block@6: // bare_routing_L4 let tmp%7#0: uint64 = (txn OnCompletion) goto tmp%7#0 ? block@10 : block@7 block@7: // __algopy_default_create_L1 @@ -67,7 +64,7 @@ main algopy.arc4.ARC4Contract.approval_program: let test_cases.avm_11.contract.Contract.__puya_arc4_router__%0#0: bool = 1u let tmp%0#0: bool = test_cases.avm_11.contract.Contract.__puya_arc4_router__%0#0 goto block@11 - block@10: // after_if_else_L9 + block@10: // after_if_else_L4 let test_cases.avm_11.contract.Contract.__puya_arc4_router__%0#0: bool = 0u let tmp%0#0: bool = test_cases.avm_11.contract.Contract.__puya_arc4_router__%0#0 goto block@11 diff --git a/test_cases/avm_11/out_unoptimized/Contract.approval.puya.map b/test_cases/avm_11/out_unoptimized/Contract.approval.puya.map index 612362cf97..b4e52df6cd 100644 --- a/test_cases/avm_11/out_unoptimized/Contract.approval.puya.map +++ b/test_cases/avm_11/out_unoptimized/Contract.approval.puya.map @@ -3,7 +3,7 @@ "sources": [ "../contract.py" ], - "mappings": ";;;;;AAQA;;AAAA;AAAA;AAAA;;;AAAA;;;AAAA;;;;;;AAAA;AAAA;;;;AAAA;;AACK;;AAAA;AAAA;AAAA;AAAA;;AAAA;AAAA;AAAA;AAAA;;;AAAA;;;;AADL;;AAAA;AAAA;AAAA;;;;;;;;;;;;;;;;AACA;;;AAGuD;;;AAAT;AAAV;;AAAK;AAAtB;;AAAA;AAAJ;AAAP;AACqB;;AAAd;AAAA;AAAA;AAAA;AAAP;AACO;AAAA;AAAA;AAAP;AAQiC;AAAtB;;AAAJ;;AAAA;AAAP;AACmC;AAA5B;;AAAA;AAAA;AAAP;AAC0B;AAAnB;;AAAA;AAAA;AAAP;AAC2B;AAApB;;AAAA;AAAA;AAAA;AAAP;AAC6B;AAAtB;;AAAA;;AAAA;AAAP;AAC6B;AAAtB;;AAAA;AAAA;AAAA;AAAP;AACgC;AAAzB;;AAAA;AAAA;AAAP;AACoC;AAA7B;;AAAA;AAAA;AAAP;AAGO;;AAAP;AACO;;AAAA;AAAA;AAAP;AACO;;AAAA;AAAA;AAAP;AACO;;AAAA;AAAA;AAAP;AACO;;AAAA;AAAA;AAAP;AAGuC;AAAhC;;AAAA;;AAC2C;AAA3C;;AAAA;;", + "mappings": ";;;;;AAGA;;AAAA;AAAA;AAAA;;;AAAA;;;AAAA;;;;;;AAAA;AAAA;;;;AAAA;;AACK;;AAAA;AAAA;AAAA;AAAA;;AAAA;AAAA;AAAA;AAAA;;;AAAA;;;;AADL;;AAAA;AAAA;AAAA;;;;;;;;;;;;;;;;AACA;;;AAGe;AAAA;AAAA;AAAP;AAC0D;;AAAT;AAA1C;;AAAA;AAAA;AAAA;AAAP;AAQiC;AAAtB;;AAAJ;;AAAA;AAAP;AACmC;AAA5B;;AAAA;AAAA;AAAP;AAC0B;AAAnB;;AAAA;AAAA;AAAP;AAC2B;AAApB;;AAAA;AAAA;AAAA;AAAP;AAC6B;AAAtB;;AAAA;;AAAA;AAAP;AAC6B;AAAtB;;AAAA;AAAA;AAAA;AAAP;AACgC;AAAzB;;AAAA;AAAA;AAAP;AACoC;AAA7B;;AAAA;AAAA;AAAP;AAGO;;AAAP;AACO;;AAAA;AAAA;AAAP;AACO;;AAAA;AAAA;AAAP;AACO;;AAAA;AAAA;AAAP;AACO;;AAAA;AAAA;AAAP;AAGuC;AAAhC;;AAAA;;AAC2C;AAA3C;;AAAA;;", "op_pc_offset": 0, "pc_events": { "1": { @@ -283,16 +283,7 @@ "op": "proto 0 0" }, "68": { - "op": "pushint 1793 // 1793", - "defined_out": [ - "1793" - ], - "stack_out": [ - "1793" - ] - }, - "71": { - "op": "bzero", + "op": "online_stake", "defined_out": [ "tmp%0#0" ], @@ -300,44 +291,41 @@ "tmp%0#0" ] }, - "72": { - "op": "pushbytes 0x", + "69": { + "op": "intc_0 // 0", "defined_out": [ - "0x", + "0", "tmp%0#0" ], "stack_out": [ "tmp%0#0", - "0x" + "0" ] }, - "74": { - "op": "dup", + "70": { + "op": "!=", + "defined_out": [ + "tmp%1#0" + ], "stack_out": [ - "tmp%0#0", - "0x", - "0x" + "tmp%1#0" ] }, - "75": { - "op": "uncover 2", - "stack_out": [ - "0x", - "0x", - "tmp%0#0" - ] + "71": { + "op": "assert", + "stack_out": [] }, - "77": { - "op": "falcon_verify", + "72": { + "op": "pushint 32 // 32", "defined_out": [ - "tmp%1#0" + "32" ], "stack_out": [ - "tmp%1#0" + "32" ] }, - "78": { - "op": "!", + "74": { + "op": "bzero", "defined_out": [ "tmp%2#0" ], @@ -345,18 +333,8 @@ "tmp%2#0" ] }, - "79": { - "op": "assert", - "stack_out": [] - }, - "80": { - "op": "pushbytes 0x", - "stack_out": [ - "0x" - ] - }, - "82": { - "op": "sumhash512", + "75": { + "op": "mimc BN254Mp110", "defined_out": [ "tmp%3#0" ], @@ -364,7 +342,7 @@ "tmp%3#0" ] }, - "83": { + "77": { "op": "len", "defined_out": [ "tmp%4#0" @@ -373,18 +351,14 @@ "tmp%4#0" ] }, - "84": { + "78": { "op": "intc_0 // 0", - "defined_out": [ - "0", - "tmp%4#0" - ], "stack_out": [ "tmp%4#0", "0" ] }, - "85": { + "79": { "op": "!=", "defined_out": [ "tmp%5#0" @@ -393,494 +367,465 @@ "tmp%5#0" ] }, - "86": { - "op": "assert", - "stack_out": [] - }, - "87": { - "op": "online_stake", - "defined_out": [ - "tmp%6#0" - ], - "stack_out": [ - "tmp%6#0" - ] - }, - "88": { - "op": "intc_0 // 0", - "stack_out": [ - "tmp%6#0", - "0" - ] - }, - "89": { - "op": "!=", - "defined_out": [ - "tmp%7#0" - ], - "stack_out": [ - "tmp%7#0" - ] - }, - "90": { + "80": { "op": "assert", "stack_out": [] }, - "91": { + "81": { "op": "intc_0 // 0", "stack_out": [ "0" ] }, - "92": { + "82": { "op": "block BlkProposer", "defined_out": [ - "tmp%11#0" + "tmp%9#0" ], "stack_out": [ - "tmp%11#0" + "tmp%9#0" ] }, - "94": { + "84": { "op": "global ZeroAddress", "defined_out": [ - "tmp%11#0", - "tmp%12#0" + "tmp%10#0", + "tmp%9#0" ], "stack_out": [ - "tmp%11#0", - "tmp%12#0" + "tmp%9#0", + "tmp%10#0" ] }, - "96": { + "86": { "op": "==", "defined_out": [ - "tmp%13#0" + "tmp%11#0" ], "stack_out": [ - "tmp%13#0" + "tmp%11#0" ] }, - "97": { + "87": { "error": "proposer", "op": "assert // proposer", "stack_out": [] }, - "98": { + "88": { "op": "intc_0 // 0", "stack_out": [ "0" ] }, - "99": { + "89": { "op": "block BlkFeesCollected", "defined_out": [ - "tmp%14#0" + "tmp%12#0" ], "stack_out": [ - "tmp%14#0" + "tmp%12#0" ] }, - "101": { + "91": { "op": "intc_0 // 0", "stack_out": [ - "tmp%14#0", + "tmp%12#0", "0" ] }, - "102": { + "92": { "op": "!=", "defined_out": [ - "tmp%15#0" + "tmp%13#0" ], "stack_out": [ - "tmp%15#0" + "tmp%13#0" ] }, - "103": { + "93": { "error": "fees collected", "op": "assert // fees collected", "stack_out": [] }, - "104": { + "94": { "op": "intc_0 // 0", "stack_out": [ "0" ] }, - "105": { + "95": { "op": "block BlkBonus", "defined_out": [ - "tmp%16#0" + "tmp%14#0" ], "stack_out": [ - "tmp%16#0" + "tmp%14#0" ] }, - "107": { + "97": { "op": "intc_0 // 0", "stack_out": [ - "tmp%16#0", + "tmp%14#0", "0" ] }, - "108": { + "98": { "op": "!=", "defined_out": [ - "tmp%17#0" + "tmp%15#0" ], "stack_out": [ - "tmp%17#0" + "tmp%15#0" ] }, - "109": { + "99": { "error": "bonus", "op": "assert // bonus", "stack_out": [] }, - "110": { + "100": { "op": "intc_0 // 0", "stack_out": [ "0" ] }, - "111": { + "101": { "op": "block BlkBranch", "defined_out": [ - "tmp%18#0" + "tmp%16#0" ], "stack_out": [ - "tmp%18#0" + "tmp%16#0" ] }, - "113": { + "103": { "op": "len", "defined_out": [ - "tmp%19#0" + "tmp%17#0" ], "stack_out": [ - "tmp%19#0" + "tmp%17#0" ] }, - "114": { + "104": { "op": "intc_0 // 0", "stack_out": [ - "tmp%19#0", + "tmp%17#0", "0" ] }, - "115": { + "105": { "op": "!=", "defined_out": [ - "tmp%20#0" + "tmp%18#0" ], "stack_out": [ - "tmp%20#0" + "tmp%18#0" ] }, - "116": { + "106": { "error": "branch", "op": "assert // branch", "stack_out": [] }, - "117": { + "107": { "op": "intc_0 // 0", "stack_out": [ "0" ] }, - "118": { + "108": { "op": "block BlkFeeSink", "defined_out": [ - "tmp%21#0" + "tmp%19#0" ], "stack_out": [ - "tmp%21#0" + "tmp%19#0" ] }, - "120": { + "110": { "op": "global ZeroAddress", "defined_out": [ - "tmp%21#0", - "tmp%22#0" + "tmp%19#0", + "tmp%20#0" ], "stack_out": [ - "tmp%21#0", - "tmp%22#0" + "tmp%19#0", + "tmp%20#0" ] }, - "122": { + "112": { "op": "!=", "defined_out": [ - "tmp%23#0" + "tmp%21#0" ], "stack_out": [ - "tmp%23#0" + "tmp%21#0" ] }, - "123": { + "113": { "error": "fee sink", "op": "assert // fee sink", "stack_out": [] }, - "124": { + "114": { "op": "intc_0 // 0", "stack_out": [ "0" ] }, - "125": { + "115": { "op": "block BlkProtocol", "defined_out": [ - "tmp%24#0" + "tmp%22#0" ], "stack_out": [ - "tmp%24#0" + "tmp%22#0" ] }, - "127": { + "117": { "op": "len", "defined_out": [ - "tmp%25#0" + "tmp%23#0" ], "stack_out": [ - "tmp%25#0" + "tmp%23#0" ] }, - "128": { + "118": { "op": "intc_0 // 0", "stack_out": [ - "tmp%25#0", + "tmp%23#0", "0" ] }, - "129": { + "119": { "op": "!=", "defined_out": [ - "tmp%26#0" + "tmp%24#0" ], "stack_out": [ - "tmp%26#0" + "tmp%24#0" ] }, - "130": { + "120": { "error": "protocol", "op": "assert // protocol", "stack_out": [] }, - "131": { + "121": { "op": "intc_0 // 0", "stack_out": [ "0" ] }, - "132": { + "122": { "op": "block BlkTxnCounter", "defined_out": [ - "tmp%27#0" + "tmp%25#0" ], "stack_out": [ - "tmp%27#0" + "tmp%25#0" ] }, - "134": { + "124": { "op": "intc_0 // 0", "stack_out": [ - "tmp%27#0", + "tmp%25#0", "0" ] }, - "135": { + "125": { "op": "!=", "defined_out": [ - "tmp%28#0" + "tmp%26#0" ], "stack_out": [ - "tmp%28#0" + "tmp%26#0" ] }, - "136": { + "126": { "error": "txn counter", "op": "assert // txn counter", "stack_out": [] }, - "137": { + "127": { "op": "intc_0 // 0", "stack_out": [ "0" ] }, - "138": { + "128": { "op": "block BlkProposerPayout", "defined_out": [ - "tmp%29#0" + "tmp%27#0" ], "stack_out": [ - "tmp%29#0" + "tmp%27#0" ] }, - "140": { + "130": { "op": "intc_0 // 0", "stack_out": [ - "tmp%29#0", + "tmp%27#0", "0" ] }, - "141": { + "131": { "op": "!=", "defined_out": [ - "tmp%30#0" + "tmp%28#0" ], "stack_out": [ - "tmp%30#0" + "tmp%28#0" ] }, - "142": { + "132": { "error": "proposer payout", "op": "assert // proposer payout", "stack_out": [] }, - "143": { + "133": { "op": "global PayoutsEnabled", "defined_out": [ - "tmp%31#0" + "tmp%29#0" ], "stack_out": [ - "tmp%31#0" + "tmp%29#0" ] }, - "145": { + "135": { "error": "payouts_enabled", "op": "assert // payouts_enabled", "stack_out": [] }, - "146": { + "136": { "op": "global PayoutsGoOnlineFee", "defined_out": [ - "tmp%32#0" + "tmp%30#0" ], "stack_out": [ - "tmp%32#0" + "tmp%30#0" ] }, - "148": { + "138": { "op": "intc_0 // 0", "stack_out": [ - "tmp%32#0", + "tmp%30#0", "0" ] }, - "149": { + "139": { "op": "!=", "defined_out": [ - "tmp%33#0" + "tmp%31#0" ], "stack_out": [ - "tmp%33#0" + "tmp%31#0" ] }, - "150": { + "140": { "error": "payouts_go_online_fee", "op": "assert // payouts_go_online_fee", "stack_out": [] }, - "151": { + "141": { "op": "global PayoutsPercent", "defined_out": [ - "tmp%34#0" + "tmp%32#0" ], "stack_out": [ - "tmp%34#0" + "tmp%32#0" ] }, - "153": { + "143": { "op": "intc_0 // 0", "stack_out": [ - "tmp%34#0", + "tmp%32#0", "0" ] }, - "154": { + "144": { "op": "!=", "defined_out": [ - "tmp%35#0" + "tmp%33#0" ], "stack_out": [ - "tmp%35#0" + "tmp%33#0" ] }, - "155": { + "145": { "error": "payouts_percent", "op": "assert // payouts_percent", "stack_out": [] }, - "156": { + "146": { "op": "global PayoutsMinBalance", "defined_out": [ - "tmp%36#0" + "tmp%34#0" ], "stack_out": [ - "tmp%36#0" + "tmp%34#0" ] }, - "158": { + "148": { "op": "intc_0 // 0", "stack_out": [ - "tmp%36#0", + "tmp%34#0", "0" ] }, - "159": { + "149": { "op": "!=", "defined_out": [ - "tmp%37#0" + "tmp%35#0" ], "stack_out": [ - "tmp%37#0" + "tmp%35#0" ] }, - "160": { + "150": { "error": "payouts_min_balance", "op": "assert // payouts_min_balance", "stack_out": [] }, - "161": { + "151": { "op": "global PayoutsMaxBalance", "defined_out": [ - "tmp%38#0" + "tmp%36#0" ], "stack_out": [ - "tmp%38#0" + "tmp%36#0" ] }, - "163": { + "153": { "op": "intc_0 // 0", "stack_out": [ - "tmp%38#0", + "tmp%36#0", "0" ] }, - "164": { + "154": { "op": "!=", "defined_out": [ - "tmp%39#0" + "tmp%37#0" ], "stack_out": [ - "tmp%39#0" + "tmp%37#0" ] }, - "165": { + "155": { "error": "payouts_max_balance", "op": "assert // payouts_max_balance", "stack_out": [] }, - "166": { + "156": { "op": "intc_0 // 0", "stack_out": [ "0" ] }, - "167": { + "157": { "op": "voter_params_get VoterBalance", "defined_out": [ "tuple_assignment%6#0", @@ -891,17 +836,17 @@ "tuple_assignment%7#0" ] }, - "169": { + "159": { "op": "popn 2", "stack_out": [] }, - "171": { + "161": { "op": "intc_0 // 0", "stack_out": [ "0" ] }, - "172": { + "162": { "op": "voter_params_get VoterIncentiveEligible", "defined_out": [ "tuple_assignment%8#0", @@ -912,11 +857,11 @@ "tuple_assignment%9#0" ] }, - "174": { + "164": { "op": "popn 2", "stack_out": [] }, - "176": { + "166": { "retsub": true, "op": "retsub" } diff --git a/test_cases/avm_11/out_unoptimized/Contract.approval.teal b/test_cases/avm_11/out_unoptimized/Contract.approval.teal index ae80f3527d..852a2786c1 100644 --- a/test_cases/avm_11/out_unoptimized/Contract.approval.teal +++ b/test_cases/avm_11/out_unoptimized/Contract.approval.teal @@ -6,7 +6,7 @@ main: intcblock 0 1 main_block@1: - // avm_11/contract.py:9 + // avm_11/contract.py:4 // class Contract(ARC4Contract, avm_version=11): txn NumAppArgs intc_0 // 0 @@ -14,7 +14,7 @@ main_block@1: bz main_bare_routing@6 main_abi_routing@2: - // avm_11/contract.py:9 + // avm_11/contract.py:4 // class Contract(ARC4Contract, avm_version=11): txna ApplicationArgs 0 pushbytes 0xc2b8dd8a // method "test_new_ops()void" @@ -26,7 +26,7 @@ main_switch_case_default@4: main_switch_case_next@5: main_after_if_else@10: - // avm_11/contract.py:9 + // avm_11/contract.py:4 // class Contract(ARC4Contract, avm_version=11): intc_0 // 0 @@ -34,7 +34,7 @@ main_after_inlined_test_cases.avm_11.contract.Contract.__puya_arc4_router__@11: return main_test_new_ops_route@3: - // avm_11/contract.py:10 + // avm_11/contract.py:5 // @arc4.abimethod txn OnCompletion intc_0 // NoOp @@ -49,7 +49,7 @@ main_test_new_ops_route@3: b main_after_inlined_test_cases.avm_11.contract.Contract.__puya_arc4_router__@11 main_bare_routing@6: - // avm_11/contract.py:9 + // avm_11/contract.py:4 // class Contract(ARC4Contract, avm_version=11): txn OnCompletion intc_0 // 0 @@ -76,36 +76,27 @@ main_after_inlined_test_cases.avm_11.contract.Contract.__algopy_default_create@1 // test_cases.avm_11.contract.Contract.test_new_ops() -> void: test_new_ops: - // avm_11/contract.py:10-11 + // avm_11/contract.py:5-6 // @arc4.abimethod // def test_new_ops(self) -> None: proto 0 0 - // avm_11/contract.py:12-13 + // avm_11/contract.py:7-8 // # op functions - // assert not op.falcon_verify(b"", b"", op.bzero(1793)) - pushint 1793 // 1793 - bzero - pushbytes 0x - dup - uncover 2 - falcon_verify - ! - assert - // avm_11/contract.py:14 - // assert op.sumhash512(b"") - pushbytes 0x - sumhash512 - len + // assert op.online_stake() + online_stake intc_0 // 0 != assert - // avm_11/contract.py:15 - // assert op.online_stake() - online_stake + // avm_11/contract.py:9 + // assert op.mimc(op.MiMCConfigurations.BN254Mp110, op.bzero(32)) + pushint 32 // 32 + bzero + mimc BN254Mp110 + len intc_0 // 0 != assert - // avm_11/contract.py:22-23 + // avm_11/contract.py:16-17 // # Block // assert not op.Block.blk_proposer(0), "proposer" intc_0 // 0 @@ -113,21 +104,21 @@ test_new_ops: global ZeroAddress == assert // proposer - // avm_11/contract.py:24 + // avm_11/contract.py:18 // assert op.Block.blk_fees_collected(0), "fees collected" intc_0 // 0 block BlkFeesCollected intc_0 // 0 != assert // fees collected - // avm_11/contract.py:25 + // avm_11/contract.py:19 // assert op.Block.blk_bonus(0), "bonus" intc_0 // 0 block BlkBonus intc_0 // 0 != assert // bonus - // avm_11/contract.py:26 + // avm_11/contract.py:20 // assert op.Block.blk_branch(0), "branch" intc_0 // 0 block BlkBranch @@ -135,14 +126,14 @@ test_new_ops: intc_0 // 0 != assert // branch - // avm_11/contract.py:27 + // avm_11/contract.py:21 // assert op.Block.blk_fee_sink(0), "fee sink" intc_0 // 0 block BlkFeeSink global ZeroAddress != assert // fee sink - // avm_11/contract.py:28 + // avm_11/contract.py:22 // assert op.Block.blk_protocol(0), "protocol" intc_0 // 0 block BlkProtocol @@ -150,56 +141,56 @@ test_new_ops: intc_0 // 0 != assert // protocol - // avm_11/contract.py:29 + // avm_11/contract.py:23 // assert op.Block.blk_txn_counter(0), "txn counter" intc_0 // 0 block BlkTxnCounter intc_0 // 0 != assert // txn counter - // avm_11/contract.py:30 + // avm_11/contract.py:24 // assert op.Block.blk_proposer_payout(0), "proposer payout" intc_0 // 0 block BlkProposerPayout intc_0 // 0 != assert // proposer payout - // avm_11/contract.py:32-33 + // avm_11/contract.py:26-27 // # Global // assert op.Global.payouts_enabled, "payouts_enabled" global PayoutsEnabled assert // payouts_enabled - // avm_11/contract.py:34 + // avm_11/contract.py:28 // assert op.Global.payouts_go_online_fee, "payouts_go_online_fee" global PayoutsGoOnlineFee intc_0 // 0 != assert // payouts_go_online_fee - // avm_11/contract.py:35 + // avm_11/contract.py:29 // assert op.Global.payouts_percent, "payouts_percent" global PayoutsPercent intc_0 // 0 != assert // payouts_percent - // avm_11/contract.py:36 + // avm_11/contract.py:30 // assert op.Global.payouts_min_balance, "payouts_min_balance" global PayoutsMinBalance intc_0 // 0 != assert // payouts_min_balance - // avm_11/contract.py:37 + // avm_11/contract.py:31 // assert op.Global.payouts_max_balance, "payouts_max_balance" global PayoutsMaxBalance intc_0 // 0 != assert // payouts_max_balance - // avm_11/contract.py:39-40 + // avm_11/contract.py:33-34 // # Voter params // g, h = op.VoterParamsGet.voter_balance(0) intc_0 // 0 voter_params_get VoterBalance popn 2 - // avm_11/contract.py:41 + // avm_11/contract.py:35 // i, j = op.VoterParamsGet.voter_incentive_eligible(0) intc_0 // 0 voter_params_get VoterIncentiveEligible diff --git a/test_cases/avm_11/out_unoptimized/Contract.ir/Contract.approval.0.destructured.ir b/test_cases/avm_11/out_unoptimized/Contract.ir/Contract.approval.0.destructured.ir index 5eae97c5c3..d0fee42cc1 100644 --- a/test_cases/avm_11/out_unoptimized/Contract.ir/Contract.approval.0.destructured.ir +++ b/test_cases/avm_11/out_unoptimized/Contract.ir/Contract.approval.0.destructured.ir @@ -1,14 +1,14 @@ main algopy.arc4.ARC4Contract.approval_program: block@0: // L1 goto block@1 - block@1: // L9 + block@1: // L4 let tmp%0#1: uint64 = (txn NumAppArgs) let tmp%1#0: bool = (!= tmp%0#1 0u) goto tmp%1#0 ? block@2 : block@6 - block@2: // abi_routing_L9 + block@2: // abi_routing_L4 let tmp%2#0: bytes = (txna ApplicationArgs 0) switch tmp%2#0 {method "test_new_ops()void" => block@3, * => block@4} - block@3: // test_new_ops_route_L10 + block@3: // test_new_ops_route_L5 let tmp%3#0: uint64 = (txn OnCompletion) let tmp%4#0: bool = (== tmp%3#0 NoOp) (assert tmp%4#0) // OnCompletion is not NoOp @@ -19,11 +19,11 @@ main algopy.arc4.ARC4Contract.approval_program: let test_cases.avm_11.contract.Contract.__puya_arc4_router__%0#0: bool = 1u let tmp%0#0: bool = test_cases.avm_11.contract.Contract.__puya_arc4_router__%0#0 goto block@11 - block@4: // switch_case_default_L9 + block@4: // switch_case_default_L4 goto block@5 - block@5: // switch_case_next_L9 + block@5: // switch_case_next_L4 goto block@10 - block@6: // bare_routing_L9 + block@6: // bare_routing_L4 let tmp%7#0: uint64 = (txn OnCompletion) switch tmp%7#0 {0u => block@7, * => block@8} block@7: // __algopy_default_create_L1 @@ -37,11 +37,11 @@ main algopy.arc4.ARC4Contract.approval_program: let test_cases.avm_11.contract.Contract.__puya_arc4_router__%0#0: bool = 1u let tmp%0#0: bool = test_cases.avm_11.contract.Contract.__puya_arc4_router__%0#0 goto block@11 - block@8: // switch_case_default_L9 + block@8: // switch_case_default_L4 goto block@9 - block@9: // switch_case_next_L9 + block@9: // switch_case_next_L4 goto block@10 - block@10: // after_if_else_L9 + block@10: // after_if_else_L4 let test_cases.avm_11.contract.Contract.__puya_arc4_router__%0#0: bool = 0u let tmp%0#0: bool = test_cases.avm_11.contract.Contract.__puya_arc4_router__%0#0 goto block@11 @@ -49,60 +49,57 @@ main algopy.arc4.ARC4Contract.approval_program: return tmp%0#0 subroutine test_cases.avm_11.contract.Contract.test_new_ops() -> void: - block@0: // L10 - let tmp%0#0: bytes = (bzero 1793u) - let tmp%1#0: bool = (falcon_verify 0x 0x tmp%0#0) - let tmp%2#0: bool = (! tmp%1#0) - (assert tmp%2#0) - let tmp%3#0: bytes = (sumhash512 0x) + block@0: // L5 + let tmp%0#0: uint64 = online_stake + let tmp%1#0: bool = (!= tmp%0#0 0u) + (assert tmp%1#0) + let tmp%2#0: bytes = (bzero 32u) + let tmp%3#0: bytes = ((mimc BN254Mp110) tmp%2#0) let tmp%4#0: uint64 = (len tmp%3#0) let tmp%5#0: bool = (!= tmp%4#0 0u) (assert tmp%5#0) - let tmp%6#0: uint64 = online_stake - let tmp%7#0: bool = (!= tmp%6#0 0u) - (assert tmp%7#0) - let tmp%11#0: bytes = ((block BlkProposer) 0u) - let tmp%12#0: bytes = (global ZeroAddress) - let tmp%13#0: bool = (== tmp%11#0 tmp%12#0) - (assert tmp%13#0) // proposer - let tmp%14#0: uint64 = ((block BlkFeesCollected) 0u) + let tmp%9#0: bytes = ((block BlkProposer) 0u) + let tmp%10#0: bytes = (global ZeroAddress) + let tmp%11#0: bool = (== tmp%9#0 tmp%10#0) + (assert tmp%11#0) // proposer + let tmp%12#0: uint64 = ((block BlkFeesCollected) 0u) + let tmp%13#0: bool = (!= tmp%12#0 0u) + (assert tmp%13#0) // fees collected + let tmp%14#0: uint64 = ((block BlkBonus) 0u) let tmp%15#0: bool = (!= tmp%14#0 0u) - (assert tmp%15#0) // fees collected - let tmp%16#0: uint64 = ((block BlkBonus) 0u) - let tmp%17#0: bool = (!= tmp%16#0 0u) - (assert tmp%17#0) // bonus - let tmp%18#0: bytes = ((block BlkBranch) 0u) - let tmp%19#0: uint64 = (len tmp%18#0) - let tmp%20#0: bool = (!= tmp%19#0 0u) - (assert tmp%20#0) // branch - let tmp%21#0: bytes = ((block BlkFeeSink) 0u) - let tmp%22#0: bytes = (global ZeroAddress) - let tmp%23#0: bool = (!= tmp%21#0 tmp%22#0) - (assert tmp%23#0) // fee sink - let tmp%24#0: bytes = ((block BlkProtocol) 0u) - let tmp%25#0: uint64 = (len tmp%24#0) + (assert tmp%15#0) // bonus + let tmp%16#0: bytes = ((block BlkBranch) 0u) + let tmp%17#0: uint64 = (len tmp%16#0) + let tmp%18#0: bool = (!= tmp%17#0 0u) + (assert tmp%18#0) // branch + let tmp%19#0: bytes = ((block BlkFeeSink) 0u) + let tmp%20#0: bytes = (global ZeroAddress) + let tmp%21#0: bool = (!= tmp%19#0 tmp%20#0) + (assert tmp%21#0) // fee sink + let tmp%22#0: bytes = ((block BlkProtocol) 0u) + let tmp%23#0: uint64 = (len tmp%22#0) + let tmp%24#0: bool = (!= tmp%23#0 0u) + (assert tmp%24#0) // protocol + let tmp%25#0: uint64 = ((block BlkTxnCounter) 0u) let tmp%26#0: bool = (!= tmp%25#0 0u) - (assert tmp%26#0) // protocol - let tmp%27#0: uint64 = ((block BlkTxnCounter) 0u) + (assert tmp%26#0) // txn counter + let tmp%27#0: uint64 = ((block BlkProposerPayout) 0u) let tmp%28#0: bool = (!= tmp%27#0 0u) - (assert tmp%28#0) // txn counter - let tmp%29#0: uint64 = ((block BlkProposerPayout) 0u) - let tmp%30#0: bool = (!= tmp%29#0 0u) - (assert tmp%30#0) // proposer payout - let tmp%31#0: bool = (global PayoutsEnabled) - (assert tmp%31#0) // payouts_enabled - let tmp%32#0: uint64 = (global PayoutsGoOnlineFee) + (assert tmp%28#0) // proposer payout + let tmp%29#0: bool = (global PayoutsEnabled) + (assert tmp%29#0) // payouts_enabled + let tmp%30#0: uint64 = (global PayoutsGoOnlineFee) + let tmp%31#0: bool = (!= tmp%30#0 0u) + (assert tmp%31#0) // payouts_go_online_fee + let tmp%32#0: uint64 = (global PayoutsPercent) let tmp%33#0: bool = (!= tmp%32#0 0u) - (assert tmp%33#0) // payouts_go_online_fee - let tmp%34#0: uint64 = (global PayoutsPercent) + (assert tmp%33#0) // payouts_percent + let tmp%34#0: uint64 = (global PayoutsMinBalance) let tmp%35#0: bool = (!= tmp%34#0 0u) - (assert tmp%35#0) // payouts_percent - let tmp%36#0: uint64 = (global PayoutsMinBalance) + (assert tmp%35#0) // payouts_min_balance + let tmp%36#0: uint64 = (global PayoutsMaxBalance) let tmp%37#0: bool = (!= tmp%36#0 0u) - (assert tmp%37#0) // payouts_min_balance - let tmp%38#0: uint64 = (global PayoutsMaxBalance) - let tmp%39#0: bool = (!= tmp%38#0 0u) - (assert tmp%39#0) // payouts_max_balance + (assert tmp%37#0) // payouts_max_balance let (tuple_assignment%6#0: uint64, tuple_assignment%7#0: bool) = ((voter_params_get VoterBalance) 0u) let (tuple_assignment%8#0: bool, tuple_assignment%9#0: bool) = ((voter_params_get VoterIncentiveEligible) 0u) return \ No newline at end of file diff --git a/test_cases/avm_11/puya.log b/test_cases/avm_11/puya.log index 8849e6a80b..3df90d971d 100644 --- a/test_cases/avm_11/puya.log +++ b/test_cases/avm_11/puya.log @@ -364,23 +364,6 @@ debug: Added array_head_and_tail#0 to Phi node: let array_head_and_tail#1: bytes debug: Added array_head_and_tail#2 to Phi node: let array_head_and_tail#1: bytes = φ(array_head_and_tail#0 <- block@0, array_head_and_tail#2 <- block@3) in block@3 debug: Sealing block@4 debug: Terminated block@4 -debug: Building IR for function test_cases.avm_11.contract.avm_11_sig -debug: Sealing block@0 -debug: Terminated block@0 -debug: removing unused subroutine _puya_lib.util.ensure_budget -debug: removing unused subroutine _puya_lib.bytes_.is_substring -debug: removing unused subroutine _puya_lib.arc4.dynamic_array_pop_bit -debug: removing unused subroutine _puya_lib.arc4.dynamic_array_pop_fixed_size -debug: removing unused subroutine _puya_lib.arc4.dynamic_array_pop_byte_length_head -debug: removing unused subroutine _puya_lib.arc4.dynamic_array_pop_dynamic_element -debug: removing unused subroutine _puya_lib.arc4.dynamic_array_concat_bits -debug: removing unused subroutine _puya_lib.arc4.dynamic_array_concat_byte_length_head -debug: removing unused subroutine _puya_lib.arc4.dynamic_array_concat_dynamic_element -debug: removing unused subroutine _puya_lib.arc4.dynamic_array_replace_byte_length_head -debug: removing unused subroutine _puya_lib.arc4.dynamic_array_replace_dynamic_element -debug: removing unused subroutine _puya_lib.arc4.static_array_replace_dynamic_element -debug: removing unused subroutine _puya_lib.arc4.static_array_replace_byte_length_head -debug: removing unused subroutine _puya_lib.arc4.recalculate_head_for_elements_with_byte_length_head debug: Building IR for function test_cases.avm_11.contract.Contract.__puya_arc4_router__ debug: Sealing block@0 debug: Terminated block@0 @@ -442,39 +425,6 @@ debug: removing unused subroutine _puya_lib.arc4.dynamic_array_replace_dynamic_e debug: removing unused subroutine _puya_lib.arc4.static_array_replace_dynamic_element debug: removing unused subroutine _puya_lib.arc4.static_array_replace_byte_length_head debug: removing unused subroutine _puya_lib.arc4.recalculate_head_for_elements_with_byte_length_head -debug: Output IR to avm_11/out/avm_11_sig.ir/avm_11_sig.0.ssa.ir -info: optimizing lsig program of test_cases.avm_11.contract.avm_11_sig at level 1 -debug: Begin optimization pass 1/100 -debug: Optimizing subroutine test_cases.avm_11.contract.avm_11_sig -debug: Optimizer: Perform Subroutine Inlining -debug: Optimizer: Split Parallel Copies -debug: Optimizer: Constant Replacer -debug: Optimizer: Copy Propagation -debug: Optimizer: Intrinsic Simplifier -debug: Don't know how to simplify sumhash512 of 0x -debug: Optimizer: Elide Itxn Field Calls -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: No optimizations performed in pass 1, ending loop -debug: Performing SSA IR destructuring for test_cases.avm_11.contract.avm_11_sig -debug: Converting to CSSA -debug: Removing Phi nodes -debug: Coalescing local variables in test_cases.avm_11.contract.avm_11_sig using strategy RootOperandGrouping -debug: Coalescing resulted in 0 replacement/s -debug: Sequentializing parallel copies in test_cases.avm_11.contract.avm_11_sig -debug: Performing post-SSA optimizations at level 1 -debug: Output IR to avm_11/out/avm_11_sig.ir/avm_11_sig.1.destructured.ir -debug: Inserted main.ops[2]: 'l-store-copy tmp%0#0 0' -debug: Replaced main.ops[4]: 'v-load tmp%0#0' with 'l-load tmp%0#0' -debug: Inserted main.ops[6]: 'l-store-copy tmp%1#0 0' -debug: Replaced main.ops[8]: 'v-load tmp%1#0' with 'l-load tmp%1#0' -avm_11/contract.py:4 debug: optimizing TEAL subroutine test_cases.avm_11.contract.avm_11_sig() -> uint64: debug: Output IR to avm_11/out/Contract.ir/Contract.approval.0.ssa.ir info: optimizing approval program of test_cases.avm_11.contract.Contract at level 1 debug: Begin optimization pass 1/100 @@ -561,27 +511,26 @@ debug: Found equivalence set: tuple_assignment%8#0, i#0 debug: Found equivalence set: tuple_assignment%9#0, j#0 debug: Copy propagation made 10 modifications debug: Optimizer: Intrinsic Simplifier -debug: Don't know how to simplify sumhash512 of 0x debug: Optimizer: Elide Itxn Field Calls debug: Optimizer: Remove Unused Variables +debug: Removing unused variable tmp%1#0 debug: Removing unused variable tmp%5#0 -debug: Removing unused variable tmp%7#0 debug: Removing unused variable a#0 debug: Removing unused variable b#0 debug: Removing unused variable c#0 debug: Removing unused variable d#0 debug: Removing unused variable e#0 debug: Removing unused variable f#0 +debug: Removing unused variable tmp%13#0 debug: Removing unused variable tmp%15#0 -debug: Removing unused variable tmp%17#0 -debug: Removing unused variable tmp%20#0 +debug: Removing unused variable tmp%18#0 +debug: Removing unused variable tmp%24#0 debug: Removing unused variable tmp%26#0 debug: Removing unused variable tmp%28#0 -debug: Removing unused variable tmp%30#0 +debug: Removing unused variable tmp%31#0 debug: Removing unused variable tmp%33#0 debug: Removing unused variable tmp%35#0 debug: Removing unused variable tmp%37#0 -debug: Removing unused variable tmp%39#0 debug: Not removing unused assignment since source is not marked as pure: let (g#0: uint64, h#0: bool) = ((voter_params_get VoterBalance) 0u) debug: Not removing unused assignment since source is not marked as pure: let (i#0: bool, j#0: bool) = ((voter_params_get VoterIncentiveEligible) 0u) debug: Optimizer: Inner Txn Field Replacer @@ -635,12 +584,11 @@ debug: Optimizer: Split Parallel Copies debug: Optimizer: Constant Replacer debug: Optimizer: Copy Propagation debug: Optimizer: Intrinsic Simplifier -debug: Don't know how to simplify sumhash512 of 0x debug: Optimizer: Elide Itxn Field Calls debug: Optimizer: Remove Unused Variables +debug: Removing unused variable tmp%6#0 +debug: Removing unused variable tmp%7#0 debug: Removing unused variable tmp%8#0 -debug: Removing unused variable tmp%9#0 -debug: Removing unused variable tmp%10#0 debug: Not removing unused assignment since source is not marked as pure: let (g#0: uint64, h#0: bool) = ((voter_params_get VoterBalance) 0u) debug: Not removing unused assignment since source is not marked as pure: let (i#0: bool, j#0: bool) = ((voter_params_get VoterIncentiveEligible) 0u) debug: Optimizer: Inner Txn Field Replacer @@ -689,7 +637,6 @@ debug: Optimizer: Split Parallel Copies debug: Optimizer: Constant Replacer debug: Optimizer: Copy Propagation debug: Optimizer: Intrinsic Simplifier -debug: Don't know how to simplify sumhash512 of 0x debug: Optimizer: Elide Itxn Field Calls debug: Optimizer: Remove Unused Variables debug: Not removing unused assignment since source is not marked as pure: let (g#0: uint64, h#0: bool) = ((voter_params_get VoterBalance) 0u) @@ -768,56 +715,52 @@ debug: Inserted main___algopy_default_create@7.ops[10]: 'l-store-copy test_cases debug: Replaced main___algopy_default_create@7.ops[12]: 'v-load test_cases.avm_11.contract.Contract.__puya_arc4_router__%0#0' with 'l-load test_cases.avm_11.contract.Contract.__puya_arc4_router__%0#0' debug: Inserted main_after_if_else@10.ops[1]: 'l-store-copy test_cases.avm_11.contract.Contract.__puya_arc4_router__%0#0 0' debug: Replaced main_after_if_else@10.ops[3]: 'v-load test_cases.avm_11.contract.Contract.__puya_arc4_router__%0#0' with 'l-load test_cases.avm_11.contract.Contract.__puya_arc4_router__%0#0' -debug: Inserted test_new_ops.ops[7]: 'l-store-copy tmp%1#0 0' -debug: Replaced test_new_ops.ops[9]: 'v-load tmp%1#0' with 'l-load tmp%1#0' -debug: Inserted test_new_ops.ops[11]: 'l-store-copy tmp%2#0 0' -debug: Replaced test_new_ops.ops[13]: 'v-load tmp%2#0' with 'l-load tmp%2#0' -debug: Inserted test_new_ops.ops[17]: 'l-store-copy tmp%3#0 0' -debug: Replaced test_new_ops.ops[19]: 'v-load tmp%3#0' with 'l-load tmp%3#0' -debug: Inserted test_new_ops.ops[21]: 'l-store-copy tmp%4#0 0' -debug: Replaced test_new_ops.ops[23]: 'v-load tmp%4#0' with 'l-load tmp%4#0' -debug: Inserted test_new_ops.ops[26]: 'l-store-copy tmp%6#0 0' -debug: Replaced test_new_ops.ops[28]: 'v-load tmp%6#0' with 'l-load tmp%6#0' -debug: Inserted test_new_ops.ops[38]: 'l-store-copy tmp%13#0 0' -debug: Replaced test_new_ops.ops[40]: 'v-load tmp%13#0' with 'l-load tmp%13#0' -debug: Inserted test_new_ops.ops[44]: 'l-store-copy tmp%14#0 0' -debug: Replaced test_new_ops.ops[46]: 'v-load tmp%14#0' with 'l-load tmp%14#0' -debug: Inserted test_new_ops.ops[50]: 'l-store-copy tmp%16#0 0' -debug: Replaced test_new_ops.ops[52]: 'v-load tmp%16#0' with 'l-load tmp%16#0' -debug: Inserted test_new_ops.ops[56]: 'l-store-copy tmp%18#0 0' -debug: Replaced test_new_ops.ops[58]: 'v-load tmp%18#0' with 'l-load tmp%18#0' -debug: Inserted test_new_ops.ops[60]: 'l-store-copy tmp%19#0 0' +debug: Inserted test_new_ops.ops[1]: 'l-store-copy tmp%0#0 0' +debug: Replaced test_new_ops.ops[3]: 'v-load tmp%0#0' with 'l-load tmp%0#0' +debug: Inserted test_new_ops.ops[7]: 'l-store-copy tmp%2#0 0' +debug: Replaced test_new_ops.ops[9]: 'v-load tmp%2#0' with 'l-load tmp%2#0' +debug: Inserted test_new_ops.ops[11]: 'l-store-copy tmp%3#0 0' +debug: Replaced test_new_ops.ops[13]: 'v-load tmp%3#0' with 'l-load tmp%3#0' +debug: Inserted test_new_ops.ops[15]: 'l-store-copy tmp%4#0 0' +debug: Replaced test_new_ops.ops[17]: 'v-load tmp%4#0' with 'l-load tmp%4#0' +debug: Inserted test_new_ops.ops[27]: 'l-store-copy tmp%11#0 0' +debug: Replaced test_new_ops.ops[29]: 'v-load tmp%11#0' with 'l-load tmp%11#0' +debug: Inserted test_new_ops.ops[33]: 'l-store-copy tmp%12#0 0' +debug: Replaced test_new_ops.ops[35]: 'v-load tmp%12#0' with 'l-load tmp%12#0' +debug: Inserted test_new_ops.ops[39]: 'l-store-copy tmp%14#0 0' +debug: Replaced test_new_ops.ops[41]: 'v-load tmp%14#0' with 'l-load tmp%14#0' +debug: Inserted test_new_ops.ops[45]: 'l-store-copy tmp%16#0 0' +debug: Replaced test_new_ops.ops[47]: 'v-load tmp%16#0' with 'l-load tmp%16#0' +debug: Inserted test_new_ops.ops[49]: 'l-store-copy tmp%17#0 0' +debug: Replaced test_new_ops.ops[51]: 'v-load tmp%17#0' with 'l-load tmp%17#0' +debug: Inserted test_new_ops.ops[61]: 'l-store-copy tmp%21#0 0' +debug: Replaced test_new_ops.ops[63]: 'v-load tmp%21#0' with 'l-load tmp%21#0' +debug: Inserted test_new_ops.ops[67]: 'l-store-copy tmp%22#0 0' +debug: Replaced test_new_ops.ops[69]: 'v-load tmp%22#0' with 'l-load tmp%22#0' +debug: Inserted test_new_ops.ops[71]: 'l-store-copy tmp%23#0 0' +debug: Replaced test_new_ops.ops[73]: 'v-load tmp%23#0' with 'l-load tmp%23#0' +debug: Inserted test_new_ops.ops[77]: 'l-store-copy tmp%25#0 0' +debug: Replaced test_new_ops.ops[79]: 'v-load tmp%25#0' with 'l-load tmp%25#0' +debug: Inserted test_new_ops.ops[83]: 'l-store-copy tmp%27#0 0' +debug: Replaced test_new_ops.ops[85]: 'v-load tmp%27#0' with 'l-load tmp%27#0' +debug: Inserted test_new_ops.ops[88]: 'l-store-copy tmp%29#0 0' +debug: Replaced test_new_ops.ops[90]: 'v-load tmp%29#0' with 'l-load tmp%29#0' +debug: Inserted test_new_ops.ops[93]: 'l-store-copy tmp%30#0 0' +debug: Replaced test_new_ops.ops[95]: 'v-load tmp%30#0' with 'l-load tmp%30#0' +debug: Inserted test_new_ops.ops[98]: 'l-store-copy tmp%32#0 0' +debug: Replaced test_new_ops.ops[100]: 'v-load tmp%32#0' with 'l-load tmp%32#0' +debug: Inserted test_new_ops.ops[103]: 'l-store-copy tmp%34#0 0' +debug: Replaced test_new_ops.ops[105]: 'v-load tmp%34#0' with 'l-load tmp%34#0' +debug: Inserted test_new_ops.ops[108]: 'l-store-copy tmp%36#0 0' +debug: Replaced test_new_ops.ops[110]: 'v-load tmp%36#0' with 'l-load tmp%36#0' +debug: Inserted test_new_ops.ops[23]: 'l-store-copy tmp%10#0 0' +debug: Replaced test_new_ops.ops[26]: 'v-load tmp%10#0' with 'l-load tmp%10#0' +debug: Inserted test_new_ops.ops[58]: 'l-store-copy tmp%20#0 0' +debug: Replaced test_new_ops.ops[61]: 'v-load tmp%20#0' with 'l-load tmp%20#0' +debug: Inserted test_new_ops.ops[21]: 'l-store-copy tmp%9#0 0' +debug: Replaced test_new_ops.ops[26]: 'v-load tmp%9#0' with 'l-load tmp%9#0' +debug: Inserted test_new_ops.ops[57]: 'l-store-copy tmp%19#0 0' debug: Replaced test_new_ops.ops[62]: 'v-load tmp%19#0' with 'l-load tmp%19#0' -debug: Inserted test_new_ops.ops[72]: 'l-store-copy tmp%23#0 0' -debug: Replaced test_new_ops.ops[74]: 'v-load tmp%23#0' with 'l-load tmp%23#0' -debug: Inserted test_new_ops.ops[78]: 'l-store-copy tmp%24#0 0' -debug: Replaced test_new_ops.ops[80]: 'v-load tmp%24#0' with 'l-load tmp%24#0' -debug: Inserted test_new_ops.ops[82]: 'l-store-copy tmp%25#0 0' -debug: Replaced test_new_ops.ops[84]: 'v-load tmp%25#0' with 'l-load tmp%25#0' -debug: Inserted test_new_ops.ops[88]: 'l-store-copy tmp%27#0 0' -debug: Replaced test_new_ops.ops[90]: 'v-load tmp%27#0' with 'l-load tmp%27#0' -debug: Inserted test_new_ops.ops[94]: 'l-store-copy tmp%29#0 0' -debug: Replaced test_new_ops.ops[96]: 'v-load tmp%29#0' with 'l-load tmp%29#0' -debug: Inserted test_new_ops.ops[99]: 'l-store-copy tmp%31#0 0' -debug: Replaced test_new_ops.ops[101]: 'v-load tmp%31#0' with 'l-load tmp%31#0' -debug: Inserted test_new_ops.ops[104]: 'l-store-copy tmp%32#0 0' -debug: Replaced test_new_ops.ops[106]: 'v-load tmp%32#0' with 'l-load tmp%32#0' -debug: Inserted test_new_ops.ops[109]: 'l-store-copy tmp%34#0 0' -debug: Replaced test_new_ops.ops[111]: 'v-load tmp%34#0' with 'l-load tmp%34#0' -debug: Inserted test_new_ops.ops[114]: 'l-store-copy tmp%36#0 0' -debug: Replaced test_new_ops.ops[116]: 'v-load tmp%36#0' with 'l-load tmp%36#0' -debug: Inserted test_new_ops.ops[119]: 'l-store-copy tmp%38#0 0' -debug: Replaced test_new_ops.ops[121]: 'v-load tmp%38#0' with 'l-load tmp%38#0' -debug: Inserted test_new_ops.ops[34]: 'l-store-copy tmp%12#0 0' -debug: Replaced test_new_ops.ops[37]: 'v-load tmp%12#0' with 'l-load tmp%12#0' -debug: Inserted test_new_ops.ops[69]: 'l-store-copy tmp%22#0 0' -debug: Replaced test_new_ops.ops[72]: 'v-load tmp%22#0' with 'l-load tmp%22#0' -debug: Inserted test_new_ops.ops[2]: 'l-store-copy tmp%0#0 0' -debug: Replaced test_new_ops.ops[6]: 'v-load tmp%0#0' with 'l-load tmp%0#0' -debug: Inserted test_new_ops.ops[33]: 'l-store-copy tmp%11#0 0' -debug: Replaced test_new_ops.ops[38]: 'v-load tmp%11#0' with 'l-load tmp%11#0' -debug: Inserted test_new_ops.ops[69]: 'l-store-copy tmp%21#0 0' -debug: Replaced test_new_ops.ops[74]: 'v-load tmp%21#0' with 'l-load tmp%21#0' debug: Found 3 edge set/s for algopy.arc4.ARC4Contract.approval_program debug: Allocated 1 variable/s to x-stack: tmp%0#0 debug: shared x-stack for main_test_new_ops_route@3 -> main_after_inlined_test_cases.avm_11.contract.Contract.__puya_arc4_router__@11: tmp%0#0 @@ -830,11 +773,8 @@ debug: inlining single reference block main_abi_routing@2 into main debug: inlining single reference block main_after_inlined_test_cases.avm_11.contract.Contract.__puya_arc4_router__@11 into main_after_if_else@10 debug: inlining single reference block main___algopy_default_create@7 into main_bare_routing@6 debug: removing explicit jump to fall-through block main_after_if_else@10 -avm_11/contract.py:10 debug: optimizing TEAL subroutine test_cases.avm_11.contract.Contract.test_new_ops() -> void: +avm_11/contract.py:5 debug: optimizing TEAL subroutine test_cases.avm_11.contract.Contract.test_new_ops() -> void: debug: optimizing TEAL subroutine algopy.arc4.ARC4Contract.clear_state_program() -> uint64: -info: Writing avm_11/out/avm_11_sig.teal -info: Writing avm_11/out/avm_11_sig.bin -info: Writing avm_11/out/avm_11_sig.puya.map info: Writing avm_11/out/Contract.arc32.json info: Writing avm_11/out/Contract.arc56.json info: Writing avm_11/out/Contract.approval.teal diff --git a/test_cases/avm_11/puya_O2.log b/test_cases/avm_11/puya_O2.log index c715a75c1a..79ff132bc4 100644 --- a/test_cases/avm_11/puya_O2.log +++ b/test_cases/avm_11/puya_O2.log @@ -363,23 +363,6 @@ debug: Added array_head_and_tail#0 to Phi node: let array_head_and_tail#1: bytes debug: Added array_head_and_tail#2 to Phi node: let array_head_and_tail#1: bytes = φ(array_head_and_tail#0 <- block@0, array_head_and_tail#2 <- block@3) in block@3 debug: Sealing block@4 debug: Terminated block@4 -debug: Building IR for function test_cases.avm_11.contract.avm_11_sig -debug: Sealing block@0 -debug: Terminated block@0 -debug: removing unused subroutine _puya_lib.util.ensure_budget -debug: removing unused subroutine _puya_lib.bytes_.is_substring -debug: removing unused subroutine _puya_lib.arc4.dynamic_array_pop_bit -debug: removing unused subroutine _puya_lib.arc4.dynamic_array_pop_fixed_size -debug: removing unused subroutine _puya_lib.arc4.dynamic_array_pop_byte_length_head -debug: removing unused subroutine _puya_lib.arc4.dynamic_array_pop_dynamic_element -debug: removing unused subroutine _puya_lib.arc4.dynamic_array_concat_bits -debug: removing unused subroutine _puya_lib.arc4.dynamic_array_concat_byte_length_head -debug: removing unused subroutine _puya_lib.arc4.dynamic_array_concat_dynamic_element -debug: removing unused subroutine _puya_lib.arc4.dynamic_array_replace_byte_length_head -debug: removing unused subroutine _puya_lib.arc4.dynamic_array_replace_dynamic_element -debug: removing unused subroutine _puya_lib.arc4.static_array_replace_dynamic_element -debug: removing unused subroutine _puya_lib.arc4.static_array_replace_byte_length_head -debug: removing unused subroutine _puya_lib.arc4.recalculate_head_for_elements_with_byte_length_head debug: Building IR for function test_cases.avm_11.contract.Contract.__puya_arc4_router__ debug: Sealing block@0 debug: Terminated block@0 @@ -441,38 +424,6 @@ debug: removing unused subroutine _puya_lib.arc4.dynamic_array_replace_dynamic_e debug: removing unused subroutine _puya_lib.arc4.static_array_replace_dynamic_element debug: removing unused subroutine _puya_lib.arc4.static_array_replace_byte_length_head debug: removing unused subroutine _puya_lib.arc4.recalculate_head_for_elements_with_byte_length_head -info: optimizing lsig program of test_cases.avm_11.contract.avm_11_sig at level 2 -debug: Begin optimization pass 1/100 -debug: Optimizing subroutine test_cases.avm_11.contract.avm_11_sig -debug: Optimizer: Perform Subroutine Inlining -debug: Optimizer: Split Parallel Copies -debug: Optimizer: Constant Replacer -debug: Optimizer: Copy Propagation -debug: Optimizer: Intrinsic Simplifier -debug: Don't know how to simplify sumhash512 of 0x -debug: Optimizer: Elide Itxn Field Calls -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: No optimizations performed in pass 1, ending loop -debug: Performing SSA IR destructuring for test_cases.avm_11.contract.avm_11_sig -debug: Converting to CSSA -debug: Removing Phi nodes -debug: Coalescing local variables in test_cases.avm_11.contract.avm_11_sig using strategy RootOperandGrouping -debug: Coalescing resulted in 0 replacement/s -debug: Sequentializing parallel copies in test_cases.avm_11.contract.avm_11_sig -debug: Performing post-SSA optimizations at level 2 -debug: Output IR to avm_11/out_O2/avm_11_sig.ir/avm_11_sig.0.destructured.ir -debug: Inserted main.ops[2]: 'l-store-copy tmp%0#0 0' -debug: Replaced main.ops[4]: 'v-load tmp%0#0' with 'l-load tmp%0#0' -debug: Inserted main.ops[6]: 'l-store-copy tmp%1#0 0' -debug: Replaced main.ops[8]: 'v-load tmp%1#0' with 'l-load tmp%1#0' -avm_11/contract.py:4 debug: optimizing TEAL subroutine test_cases.avm_11.contract.avm_11_sig() -> uint64: info: optimizing approval program of test_cases.avm_11.contract.Contract at level 2 debug: Begin optimization pass 1/100 debug: marking single-use function test_cases.avm_11.contract.Contract.test_new_ops for inlining @@ -512,7 +463,7 @@ debug: Optimizer: Repeated Expression Elimination debug: Optimizing subroutine test_cases.avm_11.contract.Contract.__puya_arc4_router__ debug: Optimizer: Perform Subroutine Inlining debug: inlining call to test_cases.avm_11.contract.Contract.__algopy_default_create in test_cases.avm_11.contract.Contract.__puya_arc4_router__ -avm_11/contract.py:10:6 debug: inlining call to test_cases.avm_11.contract.Contract.test_new_ops in test_cases.avm_11.contract.Contract.__puya_arc4_router__ +avm_11/contract.py:5:6 debug: inlining call to test_cases.avm_11.contract.Contract.test_new_ops in test_cases.avm_11.contract.Contract.__puya_arc4_router__ debug: Optimizer: Split Parallel Copies debug: Optimizer: Constant Replacer debug: Optimizer: Copy Propagation @@ -529,30 +480,29 @@ debug: Found equivalence set: tuple_assignment%9#0, j#0 debug: Copy propagation made 10 modifications debug: Optimizer: Intrinsic Simplifier debug: Simplified (== tmp%3#0 NoOp) to (! tmp%3#0) -debug: Don't know how to simplify sumhash512 of 0x debug: Simplified (== tmp%8#0 0u) to (! tmp%8#0) debug: Optimizer: Elide Itxn Field Calls debug: Optimizer: Remove Unused Variables debug: Removing unused variable tmp%1#0 debug: Removing unused variable tmp%6#0 +debug: Removing unused variable tmp%1#1 debug: Removing unused variable tmp%5#1 -debug: Removing unused variable tmp%7#1 debug: Removing unused variable a#0 debug: Removing unused variable b#0 debug: Removing unused variable c#0 debug: Removing unused variable d#0 debug: Removing unused variable e#0 debug: Removing unused variable f#0 +debug: Removing unused variable tmp%13#0 debug: Removing unused variable tmp%15#0 -debug: Removing unused variable tmp%17#0 -debug: Removing unused variable tmp%20#0 +debug: Removing unused variable tmp%18#0 +debug: Removing unused variable tmp%24#0 debug: Removing unused variable tmp%26#0 debug: Removing unused variable tmp%28#0 -debug: Removing unused variable tmp%30#0 +debug: Removing unused variable tmp%31#0 debug: Removing unused variable tmp%33#0 debug: Removing unused variable tmp%35#0 debug: Removing unused variable tmp%37#0 -debug: Removing unused variable tmp%39#0 debug: Not removing unused assignment since source is not marked as pure: let (g#0: uint64, h#0: bool) = ((voter_params_get VoterBalance) 0u) debug: Not removing unused assignment since source is not marked as pure: let (i#0: bool, j#0: bool) = ((voter_params_get VoterIncentiveEligible) 0u) debug: Optimizer: Inner Txn Field Replacer @@ -595,27 +545,26 @@ debug: Found equivalence set: tuple_assignment%8#0, i#0 debug: Found equivalence set: tuple_assignment%9#0, j#0 debug: Copy propagation made 10 modifications debug: Optimizer: Intrinsic Simplifier -debug: Don't know how to simplify sumhash512 of 0x debug: Optimizer: Elide Itxn Field Calls debug: Optimizer: Remove Unused Variables +debug: Removing unused variable tmp%1#0 debug: Removing unused variable tmp%5#0 -debug: Removing unused variable tmp%7#0 debug: Removing unused variable a#0 debug: Removing unused variable b#0 debug: Removing unused variable c#0 debug: Removing unused variable d#0 debug: Removing unused variable e#0 debug: Removing unused variable f#0 +debug: Removing unused variable tmp%13#0 debug: Removing unused variable tmp%15#0 -debug: Removing unused variable tmp%17#0 -debug: Removing unused variable tmp%20#0 +debug: Removing unused variable tmp%18#0 +debug: Removing unused variable tmp%24#0 debug: Removing unused variable tmp%26#0 debug: Removing unused variable tmp%28#0 -debug: Removing unused variable tmp%30#0 +debug: Removing unused variable tmp%31#0 debug: Removing unused variable tmp%33#0 debug: Removing unused variable tmp%35#0 debug: Removing unused variable tmp%37#0 -debug: Removing unused variable tmp%39#0 debug: Not removing unused assignment since source is not marked as pure: let (g#0: uint64, h#0: bool) = ((voter_params_get VoterBalance) 0u) debug: Not removing unused assignment since source is not marked as pure: let (i#0: bool, j#0: bool) = ((voter_params_get VoterIncentiveEligible) 0u) debug: Optimizer: Inner Txn Field Replacer @@ -646,17 +595,16 @@ debug: marking single-use function test_cases.avm_11.contract.Contract.test_new_ debug: Optimizing subroutine algopy.arc4.ARC4Contract.approval_program debug: Optimizer: Perform Subroutine Inlining debug: inlining call to test_cases.avm_11.contract.Contract.__algopy_default_create in algopy.arc4.ARC4Contract.approval_program -avm_11/contract.py:10:6 debug: inlining call to test_cases.avm_11.contract.Contract.test_new_ops in algopy.arc4.ARC4Contract.approval_program +avm_11/contract.py:5:6 debug: inlining call to test_cases.avm_11.contract.Contract.test_new_ops in algopy.arc4.ARC4Contract.approval_program debug: Optimizer: Split Parallel Copies debug: Optimizer: Constant Replacer debug: Optimizer: Copy Propagation debug: Optimizer: Intrinsic Simplifier -debug: Don't know how to simplify sumhash512 of 0x debug: Optimizer: Elide Itxn Field Calls debug: Optimizer: Remove Unused Variables +debug: Removing unused variable tmp%6#0 +debug: Removing unused variable tmp%7#1 debug: Removing unused variable tmp%8#1 -debug: Removing unused variable tmp%9#1 -debug: Removing unused variable tmp%10#0 debug: Not removing unused assignment since source is not marked as pure: let (g#0: uint64, h#0: bool) = ((voter_params_get VoterBalance) 0u) debug: Not removing unused assignment since source is not marked as pure: let (i#0: bool, j#0: bool) = ((voter_params_get VoterIncentiveEligible) 0u) debug: Optimizer: Inner Txn Field Replacer @@ -680,12 +628,11 @@ debug: Optimizer: Split Parallel Copies debug: Optimizer: Constant Replacer debug: Optimizer: Copy Propagation debug: Optimizer: Intrinsic Simplifier -debug: Don't know how to simplify sumhash512 of 0x debug: Optimizer: Elide Itxn Field Calls debug: Optimizer: Remove Unused Variables +debug: Removing unused variable tmp%6#0 +debug: Removing unused variable tmp%7#0 debug: Removing unused variable tmp%8#0 -debug: Removing unused variable tmp%9#0 -debug: Removing unused variable tmp%10#0 debug: Not removing unused assignment since source is not marked as pure: let (g#0: uint64, h#0: bool) = ((voter_params_get VoterBalance) 0u) debug: Not removing unused assignment since source is not marked as pure: let (i#0: bool, j#0: bool) = ((voter_params_get VoterIncentiveEligible) 0u) debug: Optimizer: Inner Txn Field Replacer @@ -719,7 +666,6 @@ debug: Optimizer: Split Parallel Copies debug: Optimizer: Constant Replacer debug: Optimizer: Copy Propagation debug: Optimizer: Intrinsic Simplifier -debug: Don't know how to simplify sumhash512 of 0x debug: Optimizer: Elide Itxn Field Calls debug: Optimizer: Remove Unused Variables debug: Not removing unused assignment since source is not marked as pure: let (g#0: uint64, h#0: bool) = ((voter_params_get VoterBalance) 0u) @@ -736,9 +682,11 @@ debug: Performing SSA IR destructuring for algopy.arc4.ARC4Contract.approval_pro debug: Converting to CSSA debug: Removing Phi nodes debug: Coalescing local variables in algopy.arc4.ARC4Contract.approval_program using strategy RootOperandGrouping +debug: Coalescing tmp%0#1 with [tmp%0#2] +debug: Coalescing tmp%2#0 with [tmp%2#1] debug: Coalescing test_cases.avm_11.contract.Contract.__puya_arc4_router__%0#0 with [test_cases.avm_11.contract.Contract.__puya_arc4_router__%0#1, test_cases.avm_11.contract.Contract.__puya_arc4_router__%0#2] debug: Coalescing tmp%0#0 with [tmp%0#3] -debug: Coalescing resulted in 8 replacement/s +debug: Coalescing resulted in 12 replacement/s debug: Sequentializing parallel copies in algopy.arc4.ARC4Contract.approval_program debug: Performing post-SSA optimizations at level 2 debug: Output IR to avm_11/out_O2/Contract.ir/Contract.approval.0.destructured.ir @@ -778,58 +726,54 @@ debug: Inserted main_test_new_ops_route@3.ops[5]: 'l-store-copy tmp%4#0 0' debug: Replaced main_test_new_ops_route@3.ops[7]: 'v-load tmp%4#0' with 'l-load tmp%4#0' debug: Inserted main_test_new_ops_route@3.ops[10]: 'l-store-copy tmp%5#0 0' debug: Replaced main_test_new_ops_route@3.ops[12]: 'v-load tmp%5#0' with 'l-load tmp%5#0' -debug: Inserted main_test_new_ops_route@3.ops[21]: 'l-store-copy tmp%1#0 0' -debug: Replaced main_test_new_ops_route@3.ops[23]: 'v-load tmp%1#0' with 'l-load tmp%1#0' -debug: Inserted main_test_new_ops_route@3.ops[25]: 'l-store-copy tmp%2#1 0' -debug: Replaced main_test_new_ops_route@3.ops[27]: 'v-load tmp%2#1' with 'l-load tmp%2#1' -debug: Inserted main_test_new_ops_route@3.ops[31]: 'l-store-copy tmp%3#1 0' -debug: Replaced main_test_new_ops_route@3.ops[33]: 'v-load tmp%3#1' with 'l-load tmp%3#1' -debug: Inserted main_test_new_ops_route@3.ops[35]: 'l-store-copy tmp%4#1 0' -debug: Replaced main_test_new_ops_route@3.ops[37]: 'v-load tmp%4#1' with 'l-load tmp%4#1' -debug: Inserted main_test_new_ops_route@3.ops[40]: 'l-store-copy tmp%6#0 0' -debug: Replaced main_test_new_ops_route@3.ops[42]: 'v-load tmp%6#0' with 'l-load tmp%6#0' -debug: Inserted main_test_new_ops_route@3.ops[52]: 'l-store-copy tmp%13#0 0' -debug: Replaced main_test_new_ops_route@3.ops[54]: 'v-load tmp%13#0' with 'l-load tmp%13#0' -debug: Inserted main_test_new_ops_route@3.ops[58]: 'l-store-copy tmp%14#0 0' -debug: Replaced main_test_new_ops_route@3.ops[60]: 'v-load tmp%14#0' with 'l-load tmp%14#0' -debug: Inserted main_test_new_ops_route@3.ops[64]: 'l-store-copy tmp%16#0 0' -debug: Replaced main_test_new_ops_route@3.ops[66]: 'v-load tmp%16#0' with 'l-load tmp%16#0' -debug: Inserted main_test_new_ops_route@3.ops[70]: 'l-store-copy tmp%18#0 0' -debug: Replaced main_test_new_ops_route@3.ops[72]: 'v-load tmp%18#0' with 'l-load tmp%18#0' -debug: Inserted main_test_new_ops_route@3.ops[74]: 'l-store-copy tmp%19#0 0' +debug: Inserted main_test_new_ops_route@3.ops[15]: 'l-store-copy tmp%0#1 0' +debug: Replaced main_test_new_ops_route@3.ops[17]: 'v-load tmp%0#1' with 'l-load tmp%0#1' +debug: Inserted main_test_new_ops_route@3.ops[21]: 'l-store-copy tmp%2#0 0' +debug: Replaced main_test_new_ops_route@3.ops[23]: 'v-load tmp%2#0' with 'l-load tmp%2#0' +debug: Inserted main_test_new_ops_route@3.ops[25]: 'l-store-copy tmp%3#1 0' +debug: Replaced main_test_new_ops_route@3.ops[27]: 'v-load tmp%3#1' with 'l-load tmp%3#1' +debug: Inserted main_test_new_ops_route@3.ops[29]: 'l-store-copy tmp%4#1 0' +debug: Replaced main_test_new_ops_route@3.ops[31]: 'v-load tmp%4#1' with 'l-load tmp%4#1' +debug: Inserted main_test_new_ops_route@3.ops[41]: 'l-store-copy tmp%11#0 0' +debug: Replaced main_test_new_ops_route@3.ops[43]: 'v-load tmp%11#0' with 'l-load tmp%11#0' +debug: Inserted main_test_new_ops_route@3.ops[47]: 'l-store-copy tmp%12#0 0' +debug: Replaced main_test_new_ops_route@3.ops[49]: 'v-load tmp%12#0' with 'l-load tmp%12#0' +debug: Inserted main_test_new_ops_route@3.ops[53]: 'l-store-copy tmp%14#0 0' +debug: Replaced main_test_new_ops_route@3.ops[55]: 'v-load tmp%14#0' with 'l-load tmp%14#0' +debug: Inserted main_test_new_ops_route@3.ops[59]: 'l-store-copy tmp%16#0 0' +debug: Replaced main_test_new_ops_route@3.ops[61]: 'v-load tmp%16#0' with 'l-load tmp%16#0' +debug: Inserted main_test_new_ops_route@3.ops[63]: 'l-store-copy tmp%17#0 0' +debug: Replaced main_test_new_ops_route@3.ops[65]: 'v-load tmp%17#0' with 'l-load tmp%17#0' +debug: Inserted main_test_new_ops_route@3.ops[75]: 'l-store-copy tmp%21#0 0' +debug: Replaced main_test_new_ops_route@3.ops[77]: 'v-load tmp%21#0' with 'l-load tmp%21#0' +debug: Inserted main_test_new_ops_route@3.ops[81]: 'l-store-copy tmp%22#0 0' +debug: Replaced main_test_new_ops_route@3.ops[83]: 'v-load tmp%22#0' with 'l-load tmp%22#0' +debug: Inserted main_test_new_ops_route@3.ops[85]: 'l-store-copy tmp%23#0 0' +debug: Replaced main_test_new_ops_route@3.ops[87]: 'v-load tmp%23#0' with 'l-load tmp%23#0' +debug: Inserted main_test_new_ops_route@3.ops[91]: 'l-store-copy tmp%25#0 0' +debug: Replaced main_test_new_ops_route@3.ops[93]: 'v-load tmp%25#0' with 'l-load tmp%25#0' +debug: Inserted main_test_new_ops_route@3.ops[97]: 'l-store-copy tmp%27#0 0' +debug: Replaced main_test_new_ops_route@3.ops[99]: 'v-load tmp%27#0' with 'l-load tmp%27#0' +debug: Inserted main_test_new_ops_route@3.ops[102]: 'l-store-copy tmp%29#0 0' +debug: Replaced main_test_new_ops_route@3.ops[104]: 'v-load tmp%29#0' with 'l-load tmp%29#0' +debug: Inserted main_test_new_ops_route@3.ops[107]: 'l-store-copy tmp%30#0 0' +debug: Replaced main_test_new_ops_route@3.ops[109]: 'v-load tmp%30#0' with 'l-load tmp%30#0' +debug: Inserted main_test_new_ops_route@3.ops[112]: 'l-store-copy tmp%32#0 0' +debug: Replaced main_test_new_ops_route@3.ops[114]: 'v-load tmp%32#0' with 'l-load tmp%32#0' +debug: Inserted main_test_new_ops_route@3.ops[117]: 'l-store-copy tmp%34#0 0' +debug: Replaced main_test_new_ops_route@3.ops[119]: 'v-load tmp%34#0' with 'l-load tmp%34#0' +debug: Inserted main_test_new_ops_route@3.ops[122]: 'l-store-copy tmp%36#0 0' +debug: Replaced main_test_new_ops_route@3.ops[124]: 'v-load tmp%36#0' with 'l-load tmp%36#0' +debug: Inserted main_test_new_ops_route@3.ops[135]: 'l-store-copy test_cases.avm_11.contract.Contract.__puya_arc4_router__%0#0 0' +debug: Replaced main_test_new_ops_route@3.ops[137]: 'v-load test_cases.avm_11.contract.Contract.__puya_arc4_router__%0#0' with 'l-load test_cases.avm_11.contract.Contract.__puya_arc4_router__%0#0' +debug: Inserted main_test_new_ops_route@3.ops[37]: 'l-store-copy tmp%10#0 0' +debug: Replaced main_test_new_ops_route@3.ops[40]: 'v-load tmp%10#0' with 'l-load tmp%10#0' +debug: Inserted main_test_new_ops_route@3.ops[72]: 'l-store-copy tmp%20#0 0' +debug: Replaced main_test_new_ops_route@3.ops[75]: 'v-load tmp%20#0' with 'l-load tmp%20#0' +debug: Inserted main_test_new_ops_route@3.ops[35]: 'l-store-copy tmp%9#1 0' +debug: Replaced main_test_new_ops_route@3.ops[40]: 'v-load tmp%9#1' with 'l-load tmp%9#1' +debug: Inserted main_test_new_ops_route@3.ops[71]: 'l-store-copy tmp%19#0 0' debug: Replaced main_test_new_ops_route@3.ops[76]: 'v-load tmp%19#0' with 'l-load tmp%19#0' -debug: Inserted main_test_new_ops_route@3.ops[86]: 'l-store-copy tmp%23#0 0' -debug: Replaced main_test_new_ops_route@3.ops[88]: 'v-load tmp%23#0' with 'l-load tmp%23#0' -debug: Inserted main_test_new_ops_route@3.ops[92]: 'l-store-copy tmp%24#0 0' -debug: Replaced main_test_new_ops_route@3.ops[94]: 'v-load tmp%24#0' with 'l-load tmp%24#0' -debug: Inserted main_test_new_ops_route@3.ops[96]: 'l-store-copy tmp%25#0 0' -debug: Replaced main_test_new_ops_route@3.ops[98]: 'v-load tmp%25#0' with 'l-load tmp%25#0' -debug: Inserted main_test_new_ops_route@3.ops[102]: 'l-store-copy tmp%27#0 0' -debug: Replaced main_test_new_ops_route@3.ops[104]: 'v-load tmp%27#0' with 'l-load tmp%27#0' -debug: Inserted main_test_new_ops_route@3.ops[108]: 'l-store-copy tmp%29#0 0' -debug: Replaced main_test_new_ops_route@3.ops[110]: 'v-load tmp%29#0' with 'l-load tmp%29#0' -debug: Inserted main_test_new_ops_route@3.ops[113]: 'l-store-copy tmp%31#0 0' -debug: Replaced main_test_new_ops_route@3.ops[115]: 'v-load tmp%31#0' with 'l-load tmp%31#0' -debug: Inserted main_test_new_ops_route@3.ops[118]: 'l-store-copy tmp%32#0 0' -debug: Replaced main_test_new_ops_route@3.ops[120]: 'v-load tmp%32#0' with 'l-load tmp%32#0' -debug: Inserted main_test_new_ops_route@3.ops[123]: 'l-store-copy tmp%34#0 0' -debug: Replaced main_test_new_ops_route@3.ops[125]: 'v-load tmp%34#0' with 'l-load tmp%34#0' -debug: Inserted main_test_new_ops_route@3.ops[128]: 'l-store-copy tmp%36#0 0' -debug: Replaced main_test_new_ops_route@3.ops[130]: 'v-load tmp%36#0' with 'l-load tmp%36#0' -debug: Inserted main_test_new_ops_route@3.ops[133]: 'l-store-copy tmp%38#0 0' -debug: Replaced main_test_new_ops_route@3.ops[135]: 'v-load tmp%38#0' with 'l-load tmp%38#0' -debug: Inserted main_test_new_ops_route@3.ops[146]: 'l-store-copy test_cases.avm_11.contract.Contract.__puya_arc4_router__%0#0 0' -debug: Replaced main_test_new_ops_route@3.ops[148]: 'v-load test_cases.avm_11.contract.Contract.__puya_arc4_router__%0#0' with 'l-load test_cases.avm_11.contract.Contract.__puya_arc4_router__%0#0' -debug: Inserted main_test_new_ops_route@3.ops[48]: 'l-store-copy tmp%12#0 0' -debug: Replaced main_test_new_ops_route@3.ops[51]: 'v-load tmp%12#0' with 'l-load tmp%12#0' -debug: Inserted main_test_new_ops_route@3.ops[83]: 'l-store-copy tmp%22#0 0' -debug: Replaced main_test_new_ops_route@3.ops[86]: 'v-load tmp%22#0' with 'l-load tmp%22#0' -debug: Inserted main_test_new_ops_route@3.ops[16]: 'l-store-copy tmp%0#2 0' -debug: Replaced main_test_new_ops_route@3.ops[20]: 'v-load tmp%0#2' with 'l-load tmp%0#2' -debug: Inserted main_test_new_ops_route@3.ops[47]: 'l-store-copy tmp%11#0 0' -debug: Replaced main_test_new_ops_route@3.ops[52]: 'v-load tmp%11#0' with 'l-load tmp%11#0' -debug: Inserted main_test_new_ops_route@3.ops[83]: 'l-store-copy tmp%21#0 0' -debug: Replaced main_test_new_ops_route@3.ops[88]: 'v-load tmp%21#0' with 'l-load tmp%21#0' debug: Inserted main_bare_routing@6.ops[1]: 'l-store-copy tmp%7#0 0' debug: Replaced main_bare_routing@6.ops[3]: 'v-load tmp%7#0' with 'l-load tmp%7#0' debug: Inserted main___algopy_default_create@7.ops[1]: 'l-store-copy tmp%8#0 0' @@ -853,9 +797,6 @@ debug: inlining single reference block main_after_inlined_test_cases.avm_11.cont debug: inlining single reference block main___algopy_default_create@7 into main_bare_routing@6 debug: removing explicit jump to fall-through block main_after_if_else@10 debug: optimizing TEAL subroutine algopy.arc4.ARC4Contract.clear_state_program() -> uint64: -info: Writing avm_11/out_O2/avm_11_sig.teal -info: Writing avm_11/out_O2/avm_11_sig.bin -info: Writing avm_11/out_O2/avm_11_sig.puya.map info: Writing avm_11/out_O2/Contract.approval.teal info: Writing avm_11/out_O2/Contract.clear.teal info: Writing avm_11/out_O2/Contract.approval.bin diff --git a/test_cases/avm_11/puya_unoptimized.log b/test_cases/avm_11/puya_unoptimized.log index b8973a8006..005e3197bc 100644 --- a/test_cases/avm_11/puya_unoptimized.log +++ b/test_cases/avm_11/puya_unoptimized.log @@ -363,23 +363,6 @@ debug: Added array_head_and_tail#0 to Phi node: let array_head_and_tail#1: bytes debug: Added array_head_and_tail#2 to Phi node: let array_head_and_tail#1: bytes = φ(array_head_and_tail#0 <- block@0, array_head_and_tail#2 <- block@3) in block@3 debug: Sealing block@4 debug: Terminated block@4 -debug: Building IR for function test_cases.avm_11.contract.avm_11_sig -debug: Sealing block@0 -debug: Terminated block@0 -debug: removing unused subroutine _puya_lib.util.ensure_budget -debug: removing unused subroutine _puya_lib.bytes_.is_substring -debug: removing unused subroutine _puya_lib.arc4.dynamic_array_pop_bit -debug: removing unused subroutine _puya_lib.arc4.dynamic_array_pop_fixed_size -debug: removing unused subroutine _puya_lib.arc4.dynamic_array_pop_byte_length_head -debug: removing unused subroutine _puya_lib.arc4.dynamic_array_pop_dynamic_element -debug: removing unused subroutine _puya_lib.arc4.dynamic_array_concat_bits -debug: removing unused subroutine _puya_lib.arc4.dynamic_array_concat_byte_length_head -debug: removing unused subroutine _puya_lib.arc4.dynamic_array_concat_dynamic_element -debug: removing unused subroutine _puya_lib.arc4.dynamic_array_replace_byte_length_head -debug: removing unused subroutine _puya_lib.arc4.dynamic_array_replace_dynamic_element -debug: removing unused subroutine _puya_lib.arc4.static_array_replace_dynamic_element -debug: removing unused subroutine _puya_lib.arc4.static_array_replace_byte_length_head -debug: removing unused subroutine _puya_lib.arc4.recalculate_head_for_elements_with_byte_length_head debug: Building IR for function test_cases.avm_11.contract.Contract.__puya_arc4_router__ debug: Sealing block@0 debug: Terminated block@0 @@ -441,29 +424,6 @@ debug: removing unused subroutine _puya_lib.arc4.dynamic_array_replace_dynamic_e debug: removing unused subroutine _puya_lib.arc4.static_array_replace_dynamic_element debug: removing unused subroutine _puya_lib.arc4.static_array_replace_byte_length_head debug: removing unused subroutine _puya_lib.arc4.recalculate_head_for_elements_with_byte_length_head -info: optimizing lsig program of test_cases.avm_11.contract.avm_11_sig at level 0 -debug: Begin optimization pass 1/100 -debug: Optimizing subroutine test_cases.avm_11.contract.avm_11_sig -debug: Optimizer: Perform Subroutine Inlining -debug: Optimizer: Split Parallel Copies -debug: Optimizer: Constant Replacer -debug: Optimizer: Remove Unused Variables -debug: Optimizer: Inner Txn Field Replacer -debug: Optimizer: Replace Compiled References -debug: No optimizations performed in pass 1, ending loop -debug: Performing SSA IR destructuring for test_cases.avm_11.contract.avm_11_sig -debug: Converting to CSSA -debug: Removing Phi nodes -debug: Coalescing local variables in test_cases.avm_11.contract.avm_11_sig using strategy RootOperandGrouping -debug: Coalescing resulted in 0 replacement/s -debug: Sequentializing parallel copies in test_cases.avm_11.contract.avm_11_sig -debug: Performing post-SSA optimizations at level 0 -debug: Output IR to avm_11/out_unoptimized/avm_11_sig.ir/avm_11_sig.0.destructured.ir -debug: Inserted main.ops[2]: 'l-store-copy tmp%0#0 0' -debug: Replaced main.ops[4]: 'v-load tmp%0#0' with 'l-load tmp%0#0' -debug: Inserted main.ops[6]: 'l-store-copy tmp%1#0 0' -debug: Replaced main.ops[8]: 'v-load tmp%1#0' with 'l-load tmp%1#0' -avm_11/contract.py:4 debug: optimizing TEAL subroutine test_cases.avm_11.contract.avm_11_sig() -> uint64: info: optimizing approval program of test_cases.avm_11.contract.Contract at level 0 debug: Begin optimization pass 1/100 debug: Optimizing subroutine algopy.arc4.ARC4Contract.approval_program @@ -552,9 +512,9 @@ debug: Optimizer: Perform Subroutine Inlining debug: Optimizer: Split Parallel Copies debug: Optimizer: Constant Replacer debug: Optimizer: Remove Unused Variables +debug: Removing unused variable tmp%6#0 +debug: Removing unused variable tmp%7#0 debug: Removing unused variable tmp%8#0 -debug: Removing unused variable tmp%9#0 -debug: Removing unused variable tmp%10#0 debug: Not removing unused assignment since source is not marked as pure: let (tuple_assignment%6#0: uint64, tuple_assignment%7#0: bool) = ((voter_params_get VoterBalance) 0u) debug: Not removing unused assignment since source is not marked as pure: let (tuple_assignment%8#0: bool, tuple_assignment%9#0: bool) = ((voter_params_get VoterIncentiveEligible) 0u) debug: Optimizer: Inner Txn Field Replacer @@ -638,20 +598,22 @@ debug: Inserted main_after_inlined_test_cases.avm_11.contract.Contract.__algopy_ debug: Replaced main_after_inlined_test_cases.avm_11.contract.Contract.__algopy_default_create@13.ops[3]: 'v-load test_cases.avm_11.contract.Contract.__puya_arc4_router__%0#0' with 'l-load test_cases.avm_11.contract.Contract.__puya_arc4_router__%0#0' debug: Inserted main_after_if_else@10.ops[1]: 'l-store-copy test_cases.avm_11.contract.Contract.__puya_arc4_router__%0#0 0' debug: Replaced main_after_if_else@10.ops[3]: 'v-load test_cases.avm_11.contract.Contract.__puya_arc4_router__%0#0' with 'l-load test_cases.avm_11.contract.Contract.__puya_arc4_router__%0#0' -debug: Inserted test_new_ops.ops[7]: 'l-store-copy tmp%1#0 0' -debug: Replaced test_new_ops.ops[9]: 'v-load tmp%1#0' with 'l-load tmp%1#0' -debug: Inserted test_new_ops.ops[11]: 'l-store-copy tmp%2#0 0' -debug: Replaced test_new_ops.ops[13]: 'v-load tmp%2#0' with 'l-load tmp%2#0' -debug: Inserted test_new_ops.ops[17]: 'l-store-copy tmp%3#0 0' -debug: Replaced test_new_ops.ops[19]: 'v-load tmp%3#0' with 'l-load tmp%3#0' -debug: Inserted test_new_ops.ops[21]: 'l-store-copy tmp%4#0 0' -debug: Replaced test_new_ops.ops[23]: 'v-load tmp%4#0' with 'l-load tmp%4#0' -debug: Inserted test_new_ops.ops[26]: 'l-store-copy tmp%5#0 0' -debug: Replaced test_new_ops.ops[28]: 'v-load tmp%5#0' with 'l-load tmp%5#0' -debug: Inserted test_new_ops.ops[31]: 'l-store-copy tmp%6#0 0' -debug: Replaced test_new_ops.ops[33]: 'v-load tmp%6#0' with 'l-load tmp%6#0' -debug: Inserted test_new_ops.ops[36]: 'l-store-copy tmp%7#0 0' -debug: Replaced test_new_ops.ops[38]: 'v-load tmp%7#0' with 'l-load tmp%7#0' +debug: Inserted test_new_ops.ops[1]: 'l-store-copy tmp%0#0 0' +debug: Replaced test_new_ops.ops[3]: 'v-load tmp%0#0' with 'l-load tmp%0#0' +debug: Inserted test_new_ops.ops[6]: 'l-store-copy tmp%1#0 0' +debug: Replaced test_new_ops.ops[8]: 'v-load tmp%1#0' with 'l-load tmp%1#0' +debug: Inserted test_new_ops.ops[12]: 'l-store-copy tmp%2#0 0' +debug: Replaced test_new_ops.ops[14]: 'v-load tmp%2#0' with 'l-load tmp%2#0' +debug: Inserted test_new_ops.ops[16]: 'l-store-copy tmp%3#0 0' +debug: Replaced test_new_ops.ops[18]: 'v-load tmp%3#0' with 'l-load tmp%3#0' +debug: Inserted test_new_ops.ops[20]: 'l-store-copy tmp%4#0 0' +debug: Replaced test_new_ops.ops[22]: 'v-load tmp%4#0' with 'l-load tmp%4#0' +debug: Inserted test_new_ops.ops[25]: 'l-store-copy tmp%5#0 0' +debug: Replaced test_new_ops.ops[27]: 'v-load tmp%5#0' with 'l-load tmp%5#0' +debug: Inserted test_new_ops.ops[37]: 'l-store-copy tmp%11#0 0' +debug: Replaced test_new_ops.ops[39]: 'v-load tmp%11#0' with 'l-load tmp%11#0' +debug: Inserted test_new_ops.ops[43]: 'l-store-copy tmp%12#0 0' +debug: Replaced test_new_ops.ops[45]: 'v-load tmp%12#0' with 'l-load tmp%12#0' debug: Inserted test_new_ops.ops[48]: 'l-store-copy tmp%13#0 0' debug: Replaced test_new_ops.ops[50]: 'v-load tmp%13#0' with 'l-load tmp%13#0' debug: Inserted test_new_ops.ops[54]: 'l-store-copy tmp%14#0 0' @@ -660,18 +622,18 @@ debug: Inserted test_new_ops.ops[59]: 'l-store-copy tmp%15#0 0' debug: Replaced test_new_ops.ops[61]: 'v-load tmp%15#0' with 'l-load tmp%15#0' debug: Inserted test_new_ops.ops[65]: 'l-store-copy tmp%16#0 0' debug: Replaced test_new_ops.ops[67]: 'v-load tmp%16#0' with 'l-load tmp%16#0' -debug: Inserted test_new_ops.ops[70]: 'l-store-copy tmp%17#0 0' -debug: Replaced test_new_ops.ops[72]: 'v-load tmp%17#0' with 'l-load tmp%17#0' -debug: Inserted test_new_ops.ops[76]: 'l-store-copy tmp%18#0 0' -debug: Replaced test_new_ops.ops[78]: 'v-load tmp%18#0' with 'l-load tmp%18#0' -debug: Inserted test_new_ops.ops[80]: 'l-store-copy tmp%19#0 0' -debug: Replaced test_new_ops.ops[82]: 'v-load tmp%19#0' with 'l-load tmp%19#0' -debug: Inserted test_new_ops.ops[85]: 'l-store-copy tmp%20#0 0' -debug: Replaced test_new_ops.ops[87]: 'v-load tmp%20#0' with 'l-load tmp%20#0' -debug: Inserted test_new_ops.ops[97]: 'l-store-copy tmp%23#0 0' -debug: Replaced test_new_ops.ops[99]: 'v-load tmp%23#0' with 'l-load tmp%23#0' -debug: Inserted test_new_ops.ops[103]: 'l-store-copy tmp%24#0 0' -debug: Replaced test_new_ops.ops[105]: 'v-load tmp%24#0' with 'l-load tmp%24#0' +debug: Inserted test_new_ops.ops[69]: 'l-store-copy tmp%17#0 0' +debug: Replaced test_new_ops.ops[71]: 'v-load tmp%17#0' with 'l-load tmp%17#0' +debug: Inserted test_new_ops.ops[74]: 'l-store-copy tmp%18#0 0' +debug: Replaced test_new_ops.ops[76]: 'v-load tmp%18#0' with 'l-load tmp%18#0' +debug: Inserted test_new_ops.ops[86]: 'l-store-copy tmp%21#0 0' +debug: Replaced test_new_ops.ops[88]: 'v-load tmp%21#0' with 'l-load tmp%21#0' +debug: Inserted test_new_ops.ops[92]: 'l-store-copy tmp%22#0 0' +debug: Replaced test_new_ops.ops[94]: 'v-load tmp%22#0' with 'l-load tmp%22#0' +debug: Inserted test_new_ops.ops[96]: 'l-store-copy tmp%23#0 0' +debug: Replaced test_new_ops.ops[98]: 'v-load tmp%23#0' with 'l-load tmp%23#0' +debug: Inserted test_new_ops.ops[101]: 'l-store-copy tmp%24#0 0' +debug: Replaced test_new_ops.ops[103]: 'v-load tmp%24#0' with 'l-load tmp%24#0' debug: Inserted test_new_ops.ops[107]: 'l-store-copy tmp%25#0 0' debug: Replaced test_new_ops.ops[109]: 'v-load tmp%25#0' with 'l-load tmp%25#0' debug: Inserted test_new_ops.ops[112]: 'l-store-copy tmp%26#0 0' @@ -680,38 +642,32 @@ debug: Inserted test_new_ops.ops[118]: 'l-store-copy tmp%27#0 0' debug: Replaced test_new_ops.ops[120]: 'v-load tmp%27#0' with 'l-load tmp%27#0' debug: Inserted test_new_ops.ops[123]: 'l-store-copy tmp%28#0 0' debug: Replaced test_new_ops.ops[125]: 'v-load tmp%28#0' with 'l-load tmp%28#0' -debug: Inserted test_new_ops.ops[129]: 'l-store-copy tmp%29#0 0' -debug: Replaced test_new_ops.ops[131]: 'v-load tmp%29#0' with 'l-load tmp%29#0' -debug: Inserted test_new_ops.ops[134]: 'l-store-copy tmp%30#0 0' -debug: Replaced test_new_ops.ops[136]: 'v-load tmp%30#0' with 'l-load tmp%30#0' -debug: Inserted test_new_ops.ops[139]: 'l-store-copy tmp%31#0 0' -debug: Replaced test_new_ops.ops[141]: 'v-load tmp%31#0' with 'l-load tmp%31#0' -debug: Inserted test_new_ops.ops[144]: 'l-store-copy tmp%32#0 0' -debug: Replaced test_new_ops.ops[146]: 'v-load tmp%32#0' with 'l-load tmp%32#0' -debug: Inserted test_new_ops.ops[149]: 'l-store-copy tmp%33#0 0' -debug: Replaced test_new_ops.ops[151]: 'v-load tmp%33#0' with 'l-load tmp%33#0' -debug: Inserted test_new_ops.ops[154]: 'l-store-copy tmp%34#0 0' -debug: Replaced test_new_ops.ops[156]: 'v-load tmp%34#0' with 'l-load tmp%34#0' -debug: Inserted test_new_ops.ops[159]: 'l-store-copy tmp%35#0 0' -debug: Replaced test_new_ops.ops[161]: 'v-load tmp%35#0' with 'l-load tmp%35#0' -debug: Inserted test_new_ops.ops[164]: 'l-store-copy tmp%36#0 0' -debug: Replaced test_new_ops.ops[166]: 'v-load tmp%36#0' with 'l-load tmp%36#0' -debug: Inserted test_new_ops.ops[169]: 'l-store-copy tmp%37#0 0' -debug: Replaced test_new_ops.ops[171]: 'v-load tmp%37#0' with 'l-load tmp%37#0' -debug: Inserted test_new_ops.ops[174]: 'l-store-copy tmp%38#0 0' -debug: Replaced test_new_ops.ops[176]: 'v-load tmp%38#0' with 'l-load tmp%38#0' -debug: Inserted test_new_ops.ops[179]: 'l-store-copy tmp%39#0 0' -debug: Replaced test_new_ops.ops[181]: 'v-load tmp%39#0' with 'l-load tmp%39#0' -debug: Inserted test_new_ops.ops[44]: 'l-store-copy tmp%12#0 0' -debug: Replaced test_new_ops.ops[47]: 'v-load tmp%12#0' with 'l-load tmp%12#0' -debug: Inserted test_new_ops.ops[94]: 'l-store-copy tmp%22#0 0' -debug: Replaced test_new_ops.ops[97]: 'v-load tmp%22#0' with 'l-load tmp%22#0' -debug: Inserted test_new_ops.ops[2]: 'l-store-copy tmp%0#0 0' -debug: Replaced test_new_ops.ops[6]: 'v-load tmp%0#0' with 'l-load tmp%0#0' -debug: Inserted test_new_ops.ops[43]: 'l-store-copy tmp%11#0 0' -debug: Replaced test_new_ops.ops[48]: 'v-load tmp%11#0' with 'l-load tmp%11#0' -debug: Inserted test_new_ops.ops[94]: 'l-store-copy tmp%21#0 0' -debug: Replaced test_new_ops.ops[99]: 'v-load tmp%21#0' with 'l-load tmp%21#0' +debug: Inserted test_new_ops.ops[128]: 'l-store-copy tmp%29#0 0' +debug: Replaced test_new_ops.ops[130]: 'v-load tmp%29#0' with 'l-load tmp%29#0' +debug: Inserted test_new_ops.ops[133]: 'l-store-copy tmp%30#0 0' +debug: Replaced test_new_ops.ops[135]: 'v-load tmp%30#0' with 'l-load tmp%30#0' +debug: Inserted test_new_ops.ops[138]: 'l-store-copy tmp%31#0 0' +debug: Replaced test_new_ops.ops[140]: 'v-load tmp%31#0' with 'l-load tmp%31#0' +debug: Inserted test_new_ops.ops[143]: 'l-store-copy tmp%32#0 0' +debug: Replaced test_new_ops.ops[145]: 'v-load tmp%32#0' with 'l-load tmp%32#0' +debug: Inserted test_new_ops.ops[148]: 'l-store-copy tmp%33#0 0' +debug: Replaced test_new_ops.ops[150]: 'v-load tmp%33#0' with 'l-load tmp%33#0' +debug: Inserted test_new_ops.ops[153]: 'l-store-copy tmp%34#0 0' +debug: Replaced test_new_ops.ops[155]: 'v-load tmp%34#0' with 'l-load tmp%34#0' +debug: Inserted test_new_ops.ops[158]: 'l-store-copy tmp%35#0 0' +debug: Replaced test_new_ops.ops[160]: 'v-load tmp%35#0' with 'l-load tmp%35#0' +debug: Inserted test_new_ops.ops[163]: 'l-store-copy tmp%36#0 0' +debug: Replaced test_new_ops.ops[165]: 'v-load tmp%36#0' with 'l-load tmp%36#0' +debug: Inserted test_new_ops.ops[168]: 'l-store-copy tmp%37#0 0' +debug: Replaced test_new_ops.ops[170]: 'v-load tmp%37#0' with 'l-load tmp%37#0' +debug: Inserted test_new_ops.ops[33]: 'l-store-copy tmp%10#0 0' +debug: Replaced test_new_ops.ops[36]: 'v-load tmp%10#0' with 'l-load tmp%10#0' +debug: Inserted test_new_ops.ops[83]: 'l-store-copy tmp%20#0 0' +debug: Replaced test_new_ops.ops[86]: 'v-load tmp%20#0' with 'l-load tmp%20#0' +debug: Inserted test_new_ops.ops[31]: 'l-store-copy tmp%9#0 0' +debug: Replaced test_new_ops.ops[36]: 'v-load tmp%9#0' with 'l-load tmp%9#0' +debug: Inserted test_new_ops.ops[82]: 'l-store-copy tmp%19#0 0' +debug: Replaced test_new_ops.ops[87]: 'v-load tmp%19#0' with 'l-load tmp%19#0' debug: Found 10 edge set/s for algopy.arc4.ARC4Contract.approval_program debug: Allocated 1 variable/s to x-stack: tmp%0#0 debug: shared x-stack for main_test_new_ops_route@3 -> main_after_inlined_test_cases.avm_11.contract.Contract.__puya_arc4_router__@11: tmp%0#0 @@ -728,11 +684,8 @@ debug: removing explicit jump to fall-through block main_switch_case_default@8 debug: removing explicit jump to fall-through block main_switch_case_next@9 debug: removing explicit jump to fall-through block main_block@12 debug: removing explicit jump to fall-through block main_after_inlined_test_cases.avm_11.contract.Contract.__algopy_default_create@13 -avm_11/contract.py:10 debug: optimizing TEAL subroutine test_cases.avm_11.contract.Contract.test_new_ops() -> void: +avm_11/contract.py:5 debug: optimizing TEAL subroutine test_cases.avm_11.contract.Contract.test_new_ops() -> void: debug: optimizing TEAL subroutine algopy.arc4.ARC4Contract.clear_state_program() -> uint64: -info: Writing avm_11/out_unoptimized/avm_11_sig.teal -info: Writing avm_11/out_unoptimized/avm_11_sig.bin -info: Writing avm_11/out_unoptimized/avm_11_sig.puya.map info: Writing avm_11/out_unoptimized/Contract.approval.teal info: Writing avm_11/out_unoptimized/Contract.clear.teal info: Writing avm_11/out_unoptimized/Contract.approval.bin diff --git a/test_cases/avm_12/Contract.approval.puya.map b/test_cases/avm_12/Contract.approval.puya.map new file mode 100644 index 0000000000..c5595581a1 --- /dev/null +++ b/test_cases/avm_12/Contract.approval.puya.map @@ -0,0 +1,612 @@ +{ + "version": 3, + "sources": [ + "contract.py" + ], + "mappings": ";;;;;;;;;AAGA;;;AAAA;;AAAA;;;AAAA;;;;;;AAAA;;;AAAA;;;;AAAA;AAAA;AAEK;;AAAA;AAAA;AAAA;;AAAA;AAAA;;;AAAA;AAAA;AAFL;;AAAA;;;;;;;;;AAAA;AAAA;AAEA;;;AAGoC;;AAAK;;AAAtB;AAAJ;AAAP;AACqB;;AAAd;AAAA;AAAP;AACO;AAAP;AAQ6B;AAAtB;;AAAA;;AAAA;AAAP;AACmC;AAA5B;;AAAP;AAC0B;AAAnB;;AAAP;AAC2B;AAApB;;AAAA;AAAP;AAC6B;AAAtB;;AAAA;;AAAA;AAAP;AAC6B;AAAtB;;AAAA;AAAP;AACgC;AAAzB;;AAAP;AACoC;AAA7B;;AAAP;AAGO;;AAAP;AACO;;AAAP;AACO;;AAAP;AACO;;AAAP;AACO;;AAAP;AAGuC;AAAhC;;AAAA;;AAC2C;AAA3C;;AAAA;;", + "op_pc_offset": 0, + "pc_events": { + "1": { + "subroutine": "test_cases.avm_11.contract.Contract.approval_program", + "params": {}, + "block": "test_cases.avm_11.contract.Contract.approval_program", + "stack_in": [], + "op": "intcblock 0 1" + }, + "5": { + "callsub": "test_cases.avm_11.contract.Contract.__puya_arc4_router__", + "op": "callsub __puya_arc4_router__", + "defined_out": [ + "tmp%0#0" + ], + "stack_out": [ + "tmp%0#0" + ] + }, + "8": { + "op": "return", + "stack_out": [] + }, + "9": { + "subroutine": "test_cases.avm_11.contract.Contract.__puya_arc4_router__", + "params": {}, + "block": "__puya_arc4_router__", + "stack_in": [], + "op": "proto 0 1" + }, + "12": { + "op": "txn NumAppArgs", + "defined_out": [ + "tmp%0#0" + ], + "stack_out": [ + "tmp%0#0" + ] + }, + "14": { + "op": "bz __puya_arc4_router___bare_routing@5", + "stack_out": [] + }, + "17": { + "op": "pushbytes 0xc2b8dd8a // method \"test_new_ops()void\"" + }, + "23": { + "op": "txna ApplicationArgs 0", + "defined_out": [ + "Method(test_new_ops()void)", + "tmp%2#0" + ], + "stack_out": [ + "Method(test_new_ops()void)", + "tmp%2#0" + ] + }, + "26": { + "op": "match __puya_arc4_router___test_new_ops_route@2", + "stack_out": [] + }, + "30": { + "op": "intc_0 // 0", + "defined_out": [ + "0" + ], + "stack_out": [ + "0" + ] + }, + "31": { + "retsub": true, + "op": "retsub" + }, + "32": { + "block": "__puya_arc4_router___test_new_ops_route@2", + "stack_in": [], + "op": "txn OnCompletion", + "defined_out": [ + "tmp%3#0" + ], + "stack_out": [ + "tmp%3#0" + ] + }, + "34": { + "op": "!", + "defined_out": [ + "tmp%4#0" + ], + "stack_out": [ + "tmp%4#0" + ] + }, + "35": { + "op": "assert // OnCompletion is NoOp", + "stack_out": [] + }, + "36": { + "op": "txn ApplicationID", + "defined_out": [ + "tmp%5#0" + ], + "stack_out": [ + "tmp%5#0" + ] + }, + "38": { + "op": "assert // is not creating", + "stack_out": [] + }, + "39": { + "callsub": "test_cases.avm_11.contract.Contract.test_new_ops", + "op": "callsub test_new_ops" + }, + "42": { + "op": "intc_1 // 1", + "defined_out": [ + "1" + ], + "stack_out": [ + "1" + ] + }, + "43": { + "retsub": true, + "op": "retsub" + }, + "44": { + "block": "__puya_arc4_router___bare_routing@5", + "stack_in": [], + "op": "txn OnCompletion", + "defined_out": [ + "tmp%7#0" + ], + "stack_out": [ + "tmp%7#0" + ] + }, + "46": { + "op": "bnz __puya_arc4_router___after_if_else@9", + "stack_out": [] + }, + "49": { + "op": "txn ApplicationID", + "defined_out": [ + "tmp%8#0" + ], + "stack_out": [ + "tmp%8#0" + ] + }, + "51": { + "op": "!", + "defined_out": [ + "tmp%9#0" + ], + "stack_out": [ + "tmp%9#0" + ] + }, + "52": { + "op": "assert // is creating", + "stack_out": [] + }, + "53": { + "op": "intc_1 // 1", + "defined_out": [ + "1" + ], + "stack_out": [ + "1" + ] + }, + "54": { + "retsub": true, + "op": "retsub" + }, + "55": { + "block": "__puya_arc4_router___after_if_else@9", + "stack_in": [], + "op": "intc_0 // 0", + "defined_out": [ + "0" + ], + "stack_out": [ + "0" + ] + }, + "56": { + "retsub": true, + "op": "retsub" + }, + "57": { + "subroutine": "test_cases.avm_11.contract.Contract.test_new_ops", + "params": {}, + "block": "test_new_ops", + "stack_in": [], + "op": "proto 0 0" + }, + "60": { + "op": "pushbytes 0x", + "defined_out": [ + "0x" + ], + "stack_out": [ + "0x" + ] + }, + "62": { + "op": "dupn 2", + "stack_out": [ + "0x", + "0x", + "0x" + ] + }, + "64": { + "op": "falcon_verify", + "defined_out": [ + "tmp%0#0" + ], + "stack_out": [ + "tmp%0#0" + ] + }, + "65": { + "op": "!", + "defined_out": [ + "tmp%1#0" + ], + "stack_out": [ + "tmp%1#0" + ] + }, + "66": { + "op": "assert", + "stack_out": [] + }, + "67": { + "op": "pushbytes 0x", + "stack_out": [ + "0x" + ] + }, + "69": { + "op": "sumhash512", + "defined_out": [ + "tmp%2#0" + ], + "stack_out": [ + "tmp%2#0" + ] + }, + "70": { + "op": "len", + "defined_out": [ + "tmp%3#0" + ], + "stack_out": [ + "tmp%3#0" + ] + }, + "71": { + "op": "assert", + "stack_out": [] + }, + "72": { + "op": "online_stake", + "defined_out": [ + "tmp%5#0" + ], + "stack_out": [ + "tmp%5#0" + ] + }, + "73": { + "op": "assert", + "stack_out": [] + }, + "74": { + "op": "intc_0 // 0", + "defined_out": [ + "0" + ], + "stack_out": [ + "0" + ] + }, + "75": { + "op": "block BlkProposer", + "defined_out": [ + "tmp%10#0" + ], + "stack_out": [ + "tmp%10#0" + ] + }, + "77": { + "op": "global ZeroAddress", + "defined_out": [ + "tmp%10#0", + "tmp%11#0" + ], + "stack_out": [ + "tmp%10#0", + "tmp%11#0" + ] + }, + "79": { + "op": "!=", + "defined_out": [ + "tmp%12#0" + ], + "stack_out": [ + "tmp%12#0" + ] + }, + "80": { + "op": "assert // proposer", + "stack_out": [] + }, + "81": { + "op": "intc_0 // 0", + "stack_out": [ + "0" + ] + }, + "82": { + "op": "block BlkFeesCollected", + "defined_out": [ + "tmp%13#0" + ], + "stack_out": [ + "tmp%13#0" + ] + }, + "84": { + "op": "assert // fees collected", + "stack_out": [] + }, + "85": { + "op": "intc_0 // 0", + "stack_out": [ + "0" + ] + }, + "86": { + "op": "block BlkBonus", + "defined_out": [ + "tmp%15#0" + ], + "stack_out": [ + "tmp%15#0" + ] + }, + "88": { + "op": "assert // bonus", + "stack_out": [] + }, + "89": { + "op": "intc_0 // 0", + "stack_out": [ + "0" + ] + }, + "90": { + "op": "block BlkBranch", + "defined_out": [ + "tmp%17#0" + ], + "stack_out": [ + "tmp%17#0" + ] + }, + "92": { + "op": "len", + "defined_out": [ + "tmp%18#0" + ], + "stack_out": [ + "tmp%18#0" + ] + }, + "93": { + "op": "assert // branch", + "stack_out": [] + }, + "94": { + "op": "intc_0 // 0", + "stack_out": [ + "0" + ] + }, + "95": { + "op": "block BlkFeeSink", + "defined_out": [ + "tmp%20#0" + ], + "stack_out": [ + "tmp%20#0" + ] + }, + "97": { + "op": "global ZeroAddress", + "defined_out": [ + "tmp%20#0", + "tmp%21#0" + ], + "stack_out": [ + "tmp%20#0", + "tmp%21#0" + ] + }, + "99": { + "op": "!=", + "defined_out": [ + "tmp%22#0" + ], + "stack_out": [ + "tmp%22#0" + ] + }, + "100": { + "op": "assert // fee sink", + "stack_out": [] + }, + "101": { + "op": "intc_0 // 0", + "stack_out": [ + "0" + ] + }, + "102": { + "op": "block BlkProtocol", + "defined_out": [ + "tmp%23#0" + ], + "stack_out": [ + "tmp%23#0" + ] + }, + "104": { + "op": "len", + "defined_out": [ + "tmp%24#0" + ], + "stack_out": [ + "tmp%24#0" + ] + }, + "105": { + "op": "assert // protocol", + "stack_out": [] + }, + "106": { + "op": "intc_0 // 0", + "stack_out": [ + "0" + ] + }, + "107": { + "op": "block BlkTxnCounter", + "defined_out": [ + "tmp%26#0" + ], + "stack_out": [ + "tmp%26#0" + ] + }, + "109": { + "op": "assert // txn counter", + "stack_out": [] + }, + "110": { + "op": "intc_0 // 0", + "stack_out": [ + "0" + ] + }, + "111": { + "op": "block BlkProposerPayout", + "defined_out": [ + "tmp%28#0" + ], + "stack_out": [ + "tmp%28#0" + ] + }, + "113": { + "op": "assert // proposer payout", + "stack_out": [] + }, + "114": { + "op": "global PayoutsEnabled", + "defined_out": [ + "tmp%30#0" + ], + "stack_out": [ + "tmp%30#0" + ] + }, + "116": { + "op": "assert // payouts_enabled", + "stack_out": [] + }, + "117": { + "op": "global PayoutsGoOnlineFee", + "defined_out": [ + "tmp%31#0" + ], + "stack_out": [ + "tmp%31#0" + ] + }, + "119": { + "op": "assert // payouts_go_online_fee", + "stack_out": [] + }, + "120": { + "op": "global PayoutsPercent", + "defined_out": [ + "tmp%33#0" + ], + "stack_out": [ + "tmp%33#0" + ] + }, + "122": { + "op": "assert // payouts_percent", + "stack_out": [] + }, + "123": { + "op": "global PayoutsMinBalance", + "defined_out": [ + "tmp%35#0" + ], + "stack_out": [ + "tmp%35#0" + ] + }, + "125": { + "op": "assert // payouts_min_balance", + "stack_out": [] + }, + "126": { + "op": "global PayoutsMaxBalance", + "defined_out": [ + "tmp%37#0" + ], + "stack_out": [ + "tmp%37#0" + ] + }, + "128": { + "op": "assert // payouts_max_balance", + "stack_out": [] + }, + "129": { + "op": "intc_0 // 0", + "stack_out": [ + "0" + ] + }, + "130": { + "op": "voter_params_get VoterBalance", + "defined_out": [ + "g#0", + "h#0" + ], + "stack_out": [ + "g#0", + "h#0" + ] + }, + "132": { + "op": "popn 2", + "stack_out": [] + }, + "134": { + "op": "intc_0 // 0", + "stack_out": [ + "0" + ] + }, + "135": { + "op": "voter_params_get VoterIncentiveEligible", + "defined_out": [ + "i#0", + "j#0" + ], + "stack_out": [ + "i#0", + "j#0" + ] + }, + "137": { + "op": "popn 2", + "stack_out": [] + }, + "139": { + "retsub": true, + "op": "retsub" + } + } +} \ No newline at end of file diff --git a/test_cases/avm_12/Contract.clear.puya.map b/test_cases/avm_12/Contract.clear.puya.map new file mode 100644 index 0000000000..6291aa9024 --- /dev/null +++ b/test_cases/avm_12/Contract.clear.puya.map @@ -0,0 +1,25 @@ +{ + "version": 3, + "sources": [], + "mappings": ";;;", + "op_pc_offset": 0, + "pc_events": { + "1": { + "subroutine": "test_cases.avm_11.contract.Contract.clear_state_program", + "params": {}, + "block": "test_cases.avm_11.contract.Contract.clear_state_program", + "stack_in": [], + "op": "pushint 1 // 1", + "defined_out": [ + "1" + ], + "stack_out": [ + "1" + ] + }, + "3": { + "op": "return", + "stack_out": [] + } + } +} \ No newline at end of file diff --git a/test_cases/avm_12/contract.py b/test_cases/avm_12/contract.py new file mode 100644 index 0000000000..57f375e59d --- /dev/null +++ b/test_cases/avm_12/contract.py @@ -0,0 +1,14 @@ +from algopy import ARC4Contract, UInt64, arc4, logicsig, op + + +@logicsig(avm_version=12) +def avm_12_sig() -> UInt64: + return op.sumhash512(b"").length + + +class Contract(ARC4Contract, avm_version=12): + @arc4.abimethod + def test_new_ops(self) -> None: + # op functions + assert not op.falcon_verify(b"", b"", op.bzero(1793)) + assert op.sumhash512(b"") diff --git a/test_cases/avm_12/out/Contract.approval.puya.map b/test_cases/avm_12/out/Contract.approval.puya.map new file mode 100644 index 0000000000..cec3c73e6e --- /dev/null +++ b/test_cases/avm_12/out/Contract.approval.puya.map @@ -0,0 +1,242 @@ +{ + "version": 3, + "sources": [ + "../contract.py" + ], + "mappings": ";AAQA;;AAAA;;;AAAA;;;;;;AAAA;;;AAAA;;;;AAAA;;;AACK;;AAAA;AAAA;AAAA;;AAAA;AAAA;;;AAAA;;;AADL;;AAAA;;;;;;;;;;AACA;;;AAGuD;;;AAAT;AAAV;;AAAK;AAAtB;;AAAA;AAAJ;AAAP;AACqB;;AAAd;AAAA;AAAP;", + "op_pc_offset": 0, + "pc_events": { + "1": { + "subroutine": "algopy.arc4.ARC4Contract.approval_program", + "params": {}, + "block": "main", + "stack_in": [], + "op": "txn NumAppArgs", + "defined_out": [ + "tmp%0#1" + ], + "stack_out": [ + "tmp%0#1" + ] + }, + "3": { + "op": "bz main_bare_routing@6", + "stack_out": [] + }, + "6": { + "op": "pushbytes 0xc2b8dd8a // method \"test_new_ops()void\"" + }, + "12": { + "op": "txna ApplicationArgs 0" + }, + "15": { + "op": "match main_test_new_ops_route@3" + }, + "19": { + "block": "main_after_if_else@10", + "stack_in": [], + "op": "pushint 0 // 0", + "defined_out": [ + "tmp%0#0" + ], + "stack_out": [ + "tmp%0#0" + ] + }, + "21": { + "op": "return" + }, + "22": { + "block": "main_test_new_ops_route@3", + "stack_in": [], + "op": "txn OnCompletion", + "defined_out": [ + "tmp%3#0" + ], + "stack_out": [ + "tmp%3#0" + ] + }, + "24": { + "op": "!", + "defined_out": [ + "tmp%4#0" + ], + "stack_out": [ + "tmp%4#0" + ] + }, + "25": { + "error": "OnCompletion is not NoOp", + "op": "assert // OnCompletion is not NoOp", + "stack_out": [] + }, + "26": { + "op": "txn ApplicationID", + "defined_out": [ + "tmp%5#0" + ], + "stack_out": [ + "tmp%5#0" + ] + }, + "28": { + "error": "can only call when not creating", + "op": "assert // can only call when not creating", + "stack_out": [] + }, + "29": { + "callsub": "test_cases.avm_12.contract.Contract.test_new_ops", + "op": "callsub test_new_ops" + }, + "32": { + "op": "pushint 1 // 1", + "defined_out": [ + "tmp%0#0" + ], + "stack_out": [ + "tmp%0#0" + ] + }, + "34": { + "op": "return" + }, + "35": { + "block": "main_bare_routing@6", + "stack_in": [], + "op": "txn OnCompletion", + "defined_out": [ + "tmp%7#0" + ], + "stack_out": [ + "tmp%7#0" + ] + }, + "37": { + "op": "bnz main_after_if_else@10", + "stack_out": [] + }, + "40": { + "op": "txn ApplicationID" + }, + "42": { + "op": "!" + }, + "43": { + "error": "can only call when creating", + "op": "assert // can only call when creating" + }, + "44": { + "op": "pushint 1 // 1" + }, + "46": { + "op": "return" + }, + "47": { + "subroutine": "test_cases.avm_12.contract.Contract.test_new_ops", + "params": {}, + "block": "test_new_ops", + "stack_in": [], + "op": "proto 0 0" + }, + "50": { + "op": "pushint 1793 // 1793", + "defined_out": [ + "1793" + ], + "stack_out": [ + "1793" + ] + }, + "53": { + "op": "bzero", + "defined_out": [ + "tmp%0#0" + ], + "stack_out": [ + "tmp%0#0" + ] + }, + "54": { + "op": "pushbytes 0x", + "defined_out": [ + "0x", + "tmp%0#0" + ], + "stack_out": [ + "tmp%0#0", + "0x" + ] + }, + "56": { + "op": "dup", + "stack_out": [ + "tmp%0#0", + "0x", + "0x" + ] + }, + "57": { + "op": "uncover 2", + "stack_out": [ + "0x", + "0x", + "tmp%0#0" + ] + }, + "59": { + "op": "falcon_verify", + "defined_out": [ + "tmp%1#0" + ], + "stack_out": [ + "tmp%1#0" + ] + }, + "60": { + "op": "!", + "defined_out": [ + "tmp%2#0" + ], + "stack_out": [ + "tmp%2#0" + ] + }, + "61": { + "op": "assert", + "stack_out": [] + }, + "62": { + "op": "pushbytes 0x", + "stack_out": [ + "0x" + ] + }, + "64": { + "op": "sumhash512", + "defined_out": [ + "tmp%3#0" + ], + "stack_out": [ + "tmp%3#0" + ] + }, + "65": { + "op": "len", + "defined_out": [ + "tmp%4#0" + ], + "stack_out": [ + "tmp%4#0" + ] + }, + "66": { + "op": "assert", + "stack_out": [] + }, + "67": { + "retsub": true, + "op": "retsub" + } + } +} \ No newline at end of file diff --git a/test_cases/avm_12/out/Contract.approval.teal b/test_cases/avm_12/out/Contract.approval.teal new file mode 100644 index 0000000000..0569ddf278 --- /dev/null +++ b/test_cases/avm_12/out/Contract.approval.teal @@ -0,0 +1,67 @@ +#pragma version 12 +#pragma typetrack false + +// algopy.arc4.ARC4Contract.approval_program() -> uint64: +main: + // avm_12/contract.py:9 + // class Contract(ARC4Contract, avm_version=12): + txn NumAppArgs + bz main_bare_routing@6 + pushbytes 0xc2b8dd8a // method "test_new_ops()void" + txna ApplicationArgs 0 + match main_test_new_ops_route@3 + +main_after_if_else@10: + // avm_12/contract.py:9 + // class Contract(ARC4Contract, avm_version=12): + pushint 0 // 0 + return + +main_test_new_ops_route@3: + // avm_12/contract.py:10 + // @arc4.abimethod + txn OnCompletion + ! + assert // OnCompletion is not NoOp + txn ApplicationID + assert // can only call when not creating + callsub test_new_ops + pushint 1 // 1 + return + +main_bare_routing@6: + // avm_12/contract.py:9 + // class Contract(ARC4Contract, avm_version=12): + txn OnCompletion + bnz main_after_if_else@10 + txn ApplicationID + ! + assert // can only call when creating + pushint 1 // 1 + return + + +// test_cases.avm_12.contract.Contract.test_new_ops() -> void: +test_new_ops: + // avm_12/contract.py:10-11 + // @arc4.abimethod + // def test_new_ops(self) -> None: + proto 0 0 + // avm_12/contract.py:12-13 + // # op functions + // assert not op.falcon_verify(b"", b"", op.bzero(1793)) + pushint 1793 // 1793 + bzero + pushbytes 0x + dup + uncover 2 + falcon_verify + ! + assert + // avm_12/contract.py:14 + // assert op.sumhash512(b"") + pushbytes 0x + sumhash512 + len + assert + retsub diff --git a/test_cases/avm_12/out/Contract.arc32.json b/test_cases/avm_12/out/Contract.arc32.json new file mode 100644 index 0000000000..9e557b4257 --- /dev/null +++ b/test_cases/avm_12/out/Contract.arc32.json @@ -0,0 +1,50 @@ +{ + "hints": { + "test_new_ops()void": { + "call_config": { + "no_op": "CALL" + } + } + }, + "source": { + "approval": "I3ByYWdtYSB2ZXJzaW9uIDEyCiNwcmFnbWEgdHlwZXRyYWNrIGZhbHNlCgovLyBhbGdvcHkuYXJjNC5BUkM0Q29udHJhY3QuYXBwcm92YWxfcHJvZ3JhbSgpIC0+IHVpbnQ2NDoKbWFpbjoKICAgIC8vIGF2bV8xMi9jb250cmFjdC5weTo5CiAgICAvLyBjbGFzcyBDb250cmFjdChBUkM0Q29udHJhY3QsIGF2bV92ZXJzaW9uPTEyKToKICAgIHR4biBOdW1BcHBBcmdzCiAgICBieiBtYWluX2JhcmVfcm91dGluZ0A2CiAgICBwdXNoYnl0ZXMgMHhjMmI4ZGQ4YSAvLyBtZXRob2QgInRlc3RfbmV3X29wcygpdm9pZCIKICAgIHR4bmEgQXBwbGljYXRpb25BcmdzIDAKICAgIG1hdGNoIG1haW5fdGVzdF9uZXdfb3BzX3JvdXRlQDMKCm1haW5fYWZ0ZXJfaWZfZWxzZUAxMDoKICAgIC8vIGF2bV8xMi9jb250cmFjdC5weTo5CiAgICAvLyBjbGFzcyBDb250cmFjdChBUkM0Q29udHJhY3QsIGF2bV92ZXJzaW9uPTEyKToKICAgIHB1c2hpbnQgMCAvLyAwCiAgICByZXR1cm4KCm1haW5fdGVzdF9uZXdfb3BzX3JvdXRlQDM6CiAgICAvLyBhdm1fMTIvY29udHJhY3QucHk6MTAKICAgIC8vIEBhcmM0LmFiaW1ldGhvZAogICAgdHhuIE9uQ29tcGxldGlvbgogICAgIQogICAgYXNzZXJ0IC8vIE9uQ29tcGxldGlvbiBpcyBub3QgTm9PcAogICAgdHhuIEFwcGxpY2F0aW9uSUQKICAgIGFzc2VydCAvLyBjYW4gb25seSBjYWxsIHdoZW4gbm90IGNyZWF0aW5nCiAgICBjYWxsc3ViIHRlc3RfbmV3X29wcwogICAgcHVzaGludCAxIC8vIDEKICAgIHJldHVybgoKbWFpbl9iYXJlX3JvdXRpbmdANjoKICAgIC8vIGF2bV8xMi9jb250cmFjdC5weTo5CiAgICAvLyBjbGFzcyBDb250cmFjdChBUkM0Q29udHJhY3QsIGF2bV92ZXJzaW9uPTEyKToKICAgIHR4biBPbkNvbXBsZXRpb24KICAgIGJueiBtYWluX2FmdGVyX2lmX2Vsc2VAMTAKICAgIHR4biBBcHBsaWNhdGlvbklECiAgICAhCiAgICBhc3NlcnQgLy8gY2FuIG9ubHkgY2FsbCB3aGVuIGNyZWF0aW5nCiAgICBwdXNoaW50IDEgLy8gMQogICAgcmV0dXJuCgoKLy8gdGVzdF9jYXNlcy5hdm1fMTIuY29udHJhY3QuQ29udHJhY3QudGVzdF9uZXdfb3BzKCkgLT4gdm9pZDoKdGVzdF9uZXdfb3BzOgogICAgLy8gYXZtXzEyL2NvbnRyYWN0LnB5OjEwLTExCiAgICAvLyBAYXJjNC5hYmltZXRob2QKICAgIC8vIGRlZiB0ZXN0X25ld19vcHMoc2VsZikgLT4gTm9uZToKICAgIHByb3RvIDAgMAogICAgLy8gYXZtXzEyL2NvbnRyYWN0LnB5OjEyLTEzCiAgICAvLyAjIG9wIGZ1bmN0aW9ucwogICAgLy8gYXNzZXJ0IG5vdCBvcC5mYWxjb25fdmVyaWZ5KGIiIiwgYiIiLCBvcC5iemVybygxNzkzKSkKICAgIHB1c2hpbnQgMTc5MyAvLyAxNzkzCiAgICBiemVybwogICAgcHVzaGJ5dGVzIDB4CiAgICBkdXAKICAgIHVuY292ZXIgMgogICAgZmFsY29uX3ZlcmlmeQogICAgIQogICAgYXNzZXJ0CiAgICAvLyBhdm1fMTIvY29udHJhY3QucHk6MTQKICAgIC8vIGFzc2VydCBvcC5zdW1oYXNoNTEyKGIiIikKICAgIHB1c2hieXRlcyAweAogICAgc3VtaGFzaDUxMgogICAgbGVuCiAgICBhc3NlcnQKICAgIHJldHN1Ygo=", + "clear": "I3ByYWdtYSB2ZXJzaW9uIDEyCiNwcmFnbWEgdHlwZXRyYWNrIGZhbHNlCgovLyBhbGdvcHkuYXJjNC5BUkM0Q29udHJhY3QuY2xlYXJfc3RhdGVfcHJvZ3JhbSgpIC0+IHVpbnQ2NDoKbWFpbjoKICAgIHB1c2hpbnQgMSAvLyAxCiAgICByZXR1cm4K" + }, + "state": { + "global": { + "num_byte_slices": 0, + "num_uints": 0 + }, + "local": { + "num_byte_slices": 0, + "num_uints": 0 + } + }, + "schema": { + "global": { + "declared": {}, + "reserved": {} + }, + "local": { + "declared": {}, + "reserved": {} + } + }, + "contract": { + "name": "Contract", + "methods": [ + { + "name": "test_new_ops", + "args": [], + "readonly": false, + "returns": { + "type": "void" + } + } + ], + "networks": {} + }, + "bare_call_config": { + "no_op": "CREATE" + } +} \ No newline at end of file diff --git a/test_cases/avm_12/out/Contract.arc56.json b/test_cases/avm_12/out/Contract.arc56.json new file mode 100644 index 0000000000..0223a10697 --- /dev/null +++ b/test_cases/avm_12/out/Contract.arc56.json @@ -0,0 +1,102 @@ +{ + "name": "Contract", + "structs": {}, + "methods": [ + { + "name": "test_new_ops", + "args": [], + "returns": { + "type": "void" + }, + "actions": { + "create": [], + "call": [ + "NoOp" + ] + }, + "readonly": false, + "events": [], + "recommendations": {} + } + ], + "arcs": [ + 22, + 28 + ], + "networks": {}, + "state": { + "schema": { + "global": { + "ints": 0, + "bytes": 0 + }, + "local": { + "ints": 0, + "bytes": 0 + } + }, + "keys": { + "global": {}, + "local": {}, + "box": {} + }, + "maps": { + "global": {}, + "local": {}, + "box": {} + } + }, + "bareActions": { + "create": [ + "NoOp" + ], + "call": [] + }, + "sourceInfo": { + "approval": { + "sourceInfo": [ + { + "pc": [ + 25 + ], + "errorMessage": "OnCompletion is not NoOp" + }, + { + "pc": [ + 43 + ], + "errorMessage": "can only call when creating" + }, + { + "pc": [ + 28 + ], + "errorMessage": "can only call when not creating" + } + ], + "pcOffsetMethod": "none" + }, + "clear": { + "sourceInfo": [], + "pcOffsetMethod": "none" + } + }, + "source": { + "approval": "I3ByYWdtYSB2ZXJzaW9uIDEyCiNwcmFnbWEgdHlwZXRyYWNrIGZhbHNlCgovLyBhbGdvcHkuYXJjNC5BUkM0Q29udHJhY3QuYXBwcm92YWxfcHJvZ3JhbSgpIC0+IHVpbnQ2NDoKbWFpbjoKICAgIC8vIGF2bV8xMi9jb250cmFjdC5weTo5CiAgICAvLyBjbGFzcyBDb250cmFjdChBUkM0Q29udHJhY3QsIGF2bV92ZXJzaW9uPTEyKToKICAgIHR4biBOdW1BcHBBcmdzCiAgICBieiBtYWluX2JhcmVfcm91dGluZ0A2CiAgICBwdXNoYnl0ZXMgMHhjMmI4ZGQ4YSAvLyBtZXRob2QgInRlc3RfbmV3X29wcygpdm9pZCIKICAgIHR4bmEgQXBwbGljYXRpb25BcmdzIDAKICAgIG1hdGNoIG1haW5fdGVzdF9uZXdfb3BzX3JvdXRlQDMKCm1haW5fYWZ0ZXJfaWZfZWxzZUAxMDoKICAgIC8vIGF2bV8xMi9jb250cmFjdC5weTo5CiAgICAvLyBjbGFzcyBDb250cmFjdChBUkM0Q29udHJhY3QsIGF2bV92ZXJzaW9uPTEyKToKICAgIHB1c2hpbnQgMCAvLyAwCiAgICByZXR1cm4KCm1haW5fdGVzdF9uZXdfb3BzX3JvdXRlQDM6CiAgICAvLyBhdm1fMTIvY29udHJhY3QucHk6MTAKICAgIC8vIEBhcmM0LmFiaW1ldGhvZAogICAgdHhuIE9uQ29tcGxldGlvbgogICAgIQogICAgYXNzZXJ0IC8vIE9uQ29tcGxldGlvbiBpcyBub3QgTm9PcAogICAgdHhuIEFwcGxpY2F0aW9uSUQKICAgIGFzc2VydCAvLyBjYW4gb25seSBjYWxsIHdoZW4gbm90IGNyZWF0aW5nCiAgICBjYWxsc3ViIHRlc3RfbmV3X29wcwogICAgcHVzaGludCAxIC8vIDEKICAgIHJldHVybgoKbWFpbl9iYXJlX3JvdXRpbmdANjoKICAgIC8vIGF2bV8xMi9jb250cmFjdC5weTo5CiAgICAvLyBjbGFzcyBDb250cmFjdChBUkM0Q29udHJhY3QsIGF2bV92ZXJzaW9uPTEyKToKICAgIHR4biBPbkNvbXBsZXRpb24KICAgIGJueiBtYWluX2FmdGVyX2lmX2Vsc2VAMTAKICAgIHR4biBBcHBsaWNhdGlvbklECiAgICAhCiAgICBhc3NlcnQgLy8gY2FuIG9ubHkgY2FsbCB3aGVuIGNyZWF0aW5nCiAgICBwdXNoaW50IDEgLy8gMQogICAgcmV0dXJuCgoKLy8gdGVzdF9jYXNlcy5hdm1fMTIuY29udHJhY3QuQ29udHJhY3QudGVzdF9uZXdfb3BzKCkgLT4gdm9pZDoKdGVzdF9uZXdfb3BzOgogICAgLy8gYXZtXzEyL2NvbnRyYWN0LnB5OjEwLTExCiAgICAvLyBAYXJjNC5hYmltZXRob2QKICAgIC8vIGRlZiB0ZXN0X25ld19vcHMoc2VsZikgLT4gTm9uZToKICAgIHByb3RvIDAgMAogICAgLy8gYXZtXzEyL2NvbnRyYWN0LnB5OjEyLTEzCiAgICAvLyAjIG9wIGZ1bmN0aW9ucwogICAgLy8gYXNzZXJ0IG5vdCBvcC5mYWxjb25fdmVyaWZ5KGIiIiwgYiIiLCBvcC5iemVybygxNzkzKSkKICAgIHB1c2hpbnQgMTc5MyAvLyAxNzkzCiAgICBiemVybwogICAgcHVzaGJ5dGVzIDB4CiAgICBkdXAKICAgIHVuY292ZXIgMgogICAgZmFsY29uX3ZlcmlmeQogICAgIQogICAgYXNzZXJ0CiAgICAvLyBhdm1fMTIvY29udHJhY3QucHk6MTQKICAgIC8vIGFzc2VydCBvcC5zdW1oYXNoNTEyKGIiIikKICAgIHB1c2hieXRlcyAweAogICAgc3VtaGFzaDUxMgogICAgbGVuCiAgICBhc3NlcnQKICAgIHJldHN1Ygo=", + "clear": "I3ByYWdtYSB2ZXJzaW9uIDEyCiNwcmFnbWEgdHlwZXRyYWNrIGZhbHNlCgovLyBhbGdvcHkuYXJjNC5BUkM0Q29udHJhY3QuY2xlYXJfc3RhdGVfcHJvZ3JhbSgpIC0+IHVpbnQ2NDoKbWFpbjoKICAgIHB1c2hpbnQgMSAvLyAxCiAgICByZXR1cm4K" + }, + "byteCode": { + "approval": "DDEbQQAdgATCuN2KNhoAjgEAA4EAQzEZFEQxGESIAA+BAUMxGUD/6zEYFESBAUOKAACBgQ6vgABJTwKFFESAAIYVRIk=", + "clear": "DIEBQw==" + }, + "compilerInfo": { + "compiler": "puya", + "compilerVersion": { + "major": 99, + "minor": 99, + "patch": 99 + } + }, + "events": [], + "templateVariables": {} +} \ No newline at end of file diff --git a/test_cases/avm_12/out/Contract.clear.puya.map b/test_cases/avm_12/out/Contract.clear.puya.map new file mode 100644 index 0000000000..7e7f2c0d56 --- /dev/null +++ b/test_cases/avm_12/out/Contract.clear.puya.map @@ -0,0 +1,25 @@ +{ + "version": 3, + "sources": [], + "mappings": ";;;", + "op_pc_offset": 0, + "pc_events": { + "1": { + "subroutine": "algopy.arc4.ARC4Contract.clear_state_program", + "params": {}, + "block": "main", + "stack_in": [], + "op": "pushint 1 // 1", + "defined_out": [ + "1" + ], + "stack_out": [ + "1" + ] + }, + "3": { + "op": "return", + "stack_out": [] + } + } +} \ No newline at end of file diff --git a/test_cases/avm_12/out/Contract.clear.teal b/test_cases/avm_12/out/Contract.clear.teal new file mode 100644 index 0000000000..e5edc31e82 --- /dev/null +++ b/test_cases/avm_12/out/Contract.clear.teal @@ -0,0 +1,7 @@ +#pragma version 12 +#pragma typetrack false + +// algopy.arc4.ARC4Contract.clear_state_program() -> uint64: +main: + pushint 1 // 1 + return diff --git a/test_cases/avm_12/out/Contract.ir/Contract.approval.0.ssa.ir b/test_cases/avm_12/out/Contract.ir/Contract.approval.0.ssa.ir new file mode 100644 index 0000000000..bf3233f3e1 --- /dev/null +++ b/test_cases/avm_12/out/Contract.ir/Contract.approval.0.ssa.ir @@ -0,0 +1,57 @@ +main algopy.arc4.ARC4Contract.approval_program: + block@0: // L1 + let tmp%0#0: bool = test_cases.avm_12.contract.Contract.__puya_arc4_router__() + return tmp%0#0 + +subroutine test_cases.avm_12.contract.Contract.__puya_arc4_router__() -> bool: + block@0: // L9 + let tmp%0#0: uint64 = (txn NumAppArgs) + let tmp%1#0: bool = (!= tmp%0#0 0u) + goto tmp%1#0 ? block@1 : block@5 + block@1: // abi_routing_L9 + let tmp%2#0: bytes = (txna ApplicationArgs 0) + switch tmp%2#0 {method "test_new_ops()void" => block@2, * => block@3} + block@2: // test_new_ops_route_L10 + let tmp%3#0: uint64 = (txn OnCompletion) + let tmp%4#0: bool = (== tmp%3#0 NoOp) + (assert tmp%4#0) // OnCompletion is not NoOp + let tmp%5#0: uint64 = (txn ApplicationID) + let tmp%6#0: bool = (!= tmp%5#0 0u) + (assert tmp%6#0) // can only call when not creating + test_cases.avm_12.contract.Contract.test_new_ops() + return 1u + block@3: // switch_case_default_L9 + goto block@4 + block@4: // switch_case_next_L9 + goto block@9 + block@5: // bare_routing_L9 + let tmp%7#0: uint64 = (txn OnCompletion) + switch tmp%7#0 {0u => block@6, * => block@7} + block@6: // __algopy_default_create_L1 + let tmp%8#0: uint64 = (txn ApplicationID) + let tmp%9#0: bool = (== tmp%8#0 0u) + (assert tmp%9#0) // can only call when creating + test_cases.avm_12.contract.Contract.__algopy_default_create() + return 1u + block@7: // switch_case_default_L9 + goto block@8 + block@8: // switch_case_next_L9 + goto block@9 + block@9: // after_if_else_L9 + return 0u + +subroutine test_cases.avm_12.contract.Contract.test_new_ops() -> void: + block@0: // L10 + let tmp%0#0: bytes = (bzero 1793u) + let tmp%1#0: bool = (falcon_verify 0x 0x tmp%0#0) + let tmp%2#0: bool = (! tmp%1#0) + (assert tmp%2#0) + let tmp%3#0: bytes = (sumhash512 0x) + let tmp%4#0: uint64 = (len tmp%3#0) + let tmp%5#0: bool = (!= tmp%4#0 0u) + (assert tmp%5#0) + return + +subroutine test_cases.avm_12.contract.Contract.__algopy_default_create() -> void: + block@0: // L1 + return \ No newline at end of file diff --git a/test_cases/avm_12/out/Contract.ir/Contract.approval.1.ssa.opt.ir b/test_cases/avm_12/out/Contract.ir/Contract.approval.1.ssa.opt.ir new file mode 100644 index 0000000000..bfd63a60f0 --- /dev/null +++ b/test_cases/avm_12/out/Contract.ir/Contract.approval.1.ssa.opt.ir @@ -0,0 +1,47 @@ +main algopy.arc4.ARC4Contract.approval_program: + block@0: // L1 + let tmp%0#1: uint64 = (txn NumAppArgs) + goto tmp%0#1 ? block@2 : block@6 + block@2: // abi_routing_L9 + let tmp%2#0: bytes = (txna ApplicationArgs 0) + switch tmp%2#0 {method "test_new_ops()void" => block@3, * => block@10} + block@3: // test_new_ops_route_L10 + let tmp%3#0: uint64 = (txn OnCompletion) + let tmp%4#0: bool = (! tmp%3#0) + (assert tmp%4#0) // OnCompletion is not NoOp + let tmp%5#0: uint64 = (txn ApplicationID) + (assert tmp%5#0) // can only call when not creating + test_cases.avm_12.contract.Contract.test_new_ops() + let test_cases.avm_12.contract.Contract.__puya_arc4_router__%0#0: bool = 1u + goto block@11 + block@6: // bare_routing_L9 + let tmp%7#0: uint64 = (txn OnCompletion) + goto tmp%7#0 ? block@10 : block@7 + block@7: // __algopy_default_create_L1 + let tmp%8#0: uint64 = (txn ApplicationID) + let tmp%9#0: bool = (! tmp%8#0) + (assert tmp%9#0) // can only call when creating + test_cases.avm_12.contract.Contract.__algopy_default_create() + let test_cases.avm_12.contract.Contract.__puya_arc4_router__%0#1: bool = 1u + goto block@11 + block@10: // after_if_else_L9 + let test_cases.avm_12.contract.Contract.__puya_arc4_router__%0#2: bool = 0u + goto block@11 + block@11: // after_inlined_test_cases.avm_12.contract.Contract.__puya_arc4_router___L1 + let tmp%0#0: bool = φ(test_cases.avm_12.contract.Contract.__puya_arc4_router__%0#0 <- block@3, test_cases.avm_12.contract.Contract.__puya_arc4_router__%0#1 <- block@7, test_cases.avm_12.contract.Contract.__puya_arc4_router__%0#2 <- block@10) + return tmp%0#0 + +subroutine test_cases.avm_12.contract.Contract.test_new_ops() -> void: + block@0: // L10 + let tmp%0#0: bytes = (bzero 1793u) + let tmp%1#0: bool = (falcon_verify 0x 0x tmp%0#0) + let tmp%2#0: bool = (! tmp%1#0) + (assert tmp%2#0) + let tmp%3#0: bytes = (sumhash512 0x) + let tmp%4#0: uint64 = (len tmp%3#0) + (assert tmp%4#0) + return + +subroutine test_cases.avm_12.contract.Contract.__algopy_default_create() -> void: + block@0: // L1 + return \ No newline at end of file diff --git a/test_cases/avm_12/out/Contract.ir/Contract.approval.10.mir b/test_cases/avm_12/out/Contract.ir/Contract.approval.10.mir new file mode 100644 index 0000000000..bb5d97c670 --- /dev/null +++ b/test_cases/avm_12/out/Contract.ir/Contract.approval.10.mir @@ -0,0 +1,76 @@ +// Op Stack (out) +// algopy.arc4.ARC4Contract.approval_program() -> uint64: +main: + // avm_12/contract.py:9 + // class Contract(ARC4Contract, avm_version=12): + txn NumAppArgs tmp%0#1 + bz main_bare_routing@6 ; b main_abi_routing@2 + +main_abi_routing@2: + // avm_12/contract.py:9 + // class Contract(ARC4Contract, avm_version=12): + txna ApplicationArgs 0 tmp%2#0 + method test_new_ops()void tmp%2#0,Method(test_new_ops()void) + l-load tmp%2#0 1 Method(test_new_ops()void),tmp%2#0 + match main_test_new_ops_route@3 ; b main_after_if_else@10 + +main_test_new_ops_route@3: + // avm_12/contract.py:10 + // @arc4.abimethod + txn OnCompletion tmp%3#0 + ! tmp%4#0 + assert // OnCompletion is not NoOp + txn ApplicationID tmp%5#0 + assert // can only call when not creating + callsub test_new_ops + int 1 tmp%0#0 + x-store tmp%0#0 (𝕏) tmp%0#0 | + b main_after_inlined_test_cases.avm_12.contract.Contract.__puya_arc4_router__@11 (𝕏) tmp%0#0 | + +main_bare_routing@6: + // avm_12/contract.py:9 + // class Contract(ARC4Contract, avm_version=12): + txn OnCompletion tmp%7#0 + bz main___algopy_default_create@7 ; b main_after_if_else@10 + +main___algopy_default_create@7: + txn ApplicationID tmp%8#0 + ! tmp%9#0 + assert // can only call when creating + int 1 tmp%0#0 + x-store tmp%0#0 (𝕏) tmp%0#0 | + b main_after_inlined_test_cases.avm_12.contract.Contract.__puya_arc4_router__@11 (𝕏) tmp%0#0 | + +main_after_if_else@10: + // avm_12/contract.py:9 + // class Contract(ARC4Contract, avm_version=12): + int 0 tmp%0#0 + x-store tmp%0#0 (𝕏) tmp%0#0 | + b main_after_inlined_test_cases.avm_12.contract.Contract.__puya_arc4_router__@11 (𝕏) tmp%0#0 | + +main_after_inlined_test_cases.avm_12.contract.Contract.__puya_arc4_router__@11: (𝕏) tmp%0#0 | + x-load tmp%0#0 tmp%0#0 + return + + +// test_cases.avm_12.contract.Contract.test_new_ops() -> void: +test_new_ops: + // avm_12/contract.py:13 + // assert not op.falcon_verify(b"", b"", op.bzero(1793)) + int 1793 1793 + bzero tmp%0#0 + byte 0x tmp%0#0,0x + byte 0x tmp%0#0,0x,0x + l-load tmp%0#0 2 0x,0x,tmp%0#0 + falcon_verify tmp%1#0 + ! tmp%2#0 + assert + // avm_12/contract.py:14 + // assert op.sumhash512(b"") + byte 0x 0x + sumhash512 tmp%3#0 + len tmp%4#0 + assert + retsub + + diff --git a/test_cases/avm_12/out/Contract.ir/Contract.approval.2.ssa.opt.ir b/test_cases/avm_12/out/Contract.ir/Contract.approval.2.ssa.opt.ir new file mode 100644 index 0000000000..487515dacd --- /dev/null +++ b/test_cases/avm_12/out/Contract.ir/Contract.approval.2.ssa.opt.ir @@ -0,0 +1,42 @@ +main algopy.arc4.ARC4Contract.approval_program: + block@0: // L1 + let tmp%0#1: uint64 = (txn NumAppArgs) + goto tmp%0#1 ? block@2 : block@6 + block@2: // abi_routing_L9 + let tmp%2#0: bytes = (txna ApplicationArgs 0) + switch tmp%2#0 {method "test_new_ops()void" => block@3, * => block@10} + block@3: // test_new_ops_route_L10 + let tmp%3#0: uint64 = (txn OnCompletion) + let tmp%4#0: bool = (! tmp%3#0) + (assert tmp%4#0) // OnCompletion is not NoOp + let tmp%5#0: uint64 = (txn ApplicationID) + (assert tmp%5#0) // can only call when not creating + test_cases.avm_12.contract.Contract.test_new_ops() + let test_cases.avm_12.contract.Contract.__puya_arc4_router__%0#0: bool = 1u + goto block@11 + block@6: // bare_routing_L9 + let tmp%7#0: uint64 = (txn OnCompletion) + goto tmp%7#0 ? block@10 : block@7 + block@7: // __algopy_default_create_L1 + let tmp%8#0: uint64 = (txn ApplicationID) + let tmp%9#0: bool = (! tmp%8#0) + (assert tmp%9#0) // can only call when creating + let test_cases.avm_12.contract.Contract.__puya_arc4_router__%0#1: bool = 1u + goto block@11 + block@10: // after_if_else_L9 + let test_cases.avm_12.contract.Contract.__puya_arc4_router__%0#2: bool = 0u + goto block@11 + block@11: // after_inlined_test_cases.avm_12.contract.Contract.__puya_arc4_router___L1 + let tmp%0#0: bool = φ(test_cases.avm_12.contract.Contract.__puya_arc4_router__%0#0 <- block@3, test_cases.avm_12.contract.Contract.__puya_arc4_router__%0#1 <- block@7, test_cases.avm_12.contract.Contract.__puya_arc4_router__%0#2 <- block@10) + return tmp%0#0 + +subroutine test_cases.avm_12.contract.Contract.test_new_ops() -> void: + block@0: // L10 + let tmp%0#0: bytes = (bzero 1793u) + let tmp%1#0: bool = (falcon_verify 0x 0x tmp%0#0) + let tmp%2#0: bool = (! tmp%1#0) + (assert tmp%2#0) + let tmp%3#0: bytes = (sumhash512 0x) + let tmp%4#0: uint64 = (len tmp%3#0) + (assert tmp%4#0) + return \ No newline at end of file diff --git a/test_cases/avm_12/out/Contract.ir/Contract.approval.3.destructured.ir b/test_cases/avm_12/out/Contract.ir/Contract.approval.3.destructured.ir new file mode 100644 index 0000000000..df947f271d --- /dev/null +++ b/test_cases/avm_12/out/Contract.ir/Contract.approval.3.destructured.ir @@ -0,0 +1,44 @@ +main algopy.arc4.ARC4Contract.approval_program: + block@0: // L1 + let tmp%0#1: uint64 = (txn NumAppArgs) + goto tmp%0#1 ? block@2 : block@6 + block@2: // abi_routing_L9 + let tmp%2#0: bytes = (txna ApplicationArgs 0) + switch tmp%2#0 {method "test_new_ops()void" => block@3, * => block@10} + block@3: // test_new_ops_route_L10 + let tmp%3#0: uint64 = (txn OnCompletion) + let tmp%4#0: bool = (! tmp%3#0) + (assert tmp%4#0) // OnCompletion is not NoOp + let tmp%5#0: uint64 = (txn ApplicationID) + (assert tmp%5#0) // can only call when not creating + test_cases.avm_12.contract.Contract.test_new_ops() + let test_cases.avm_12.contract.Contract.__puya_arc4_router__%0#0: bool = 1u + let tmp%0#0: bool = test_cases.avm_12.contract.Contract.__puya_arc4_router__%0#0 + goto block@11 + block@6: // bare_routing_L9 + let tmp%7#0: uint64 = (txn OnCompletion) + goto tmp%7#0 ? block@10 : block@7 + block@7: // __algopy_default_create_L1 + let tmp%8#0: uint64 = (txn ApplicationID) + let tmp%9#0: bool = (! tmp%8#0) + (assert tmp%9#0) // can only call when creating + let test_cases.avm_12.contract.Contract.__puya_arc4_router__%0#0: bool = 1u + let tmp%0#0: bool = test_cases.avm_12.contract.Contract.__puya_arc4_router__%0#0 + goto block@11 + block@10: // after_if_else_L9 + let test_cases.avm_12.contract.Contract.__puya_arc4_router__%0#0: bool = 0u + let tmp%0#0: bool = test_cases.avm_12.contract.Contract.__puya_arc4_router__%0#0 + goto block@11 + block@11: // after_inlined_test_cases.avm_12.contract.Contract.__puya_arc4_router___L1 + return tmp%0#0 + +subroutine test_cases.avm_12.contract.Contract.test_new_ops() -> void: + block@0: // L10 + let tmp%0#0: bytes = (bzero 1793u) + let tmp%1#0: bool = (falcon_verify 0x 0x tmp%0#0) + let tmp%2#0: bool = (! tmp%1#0) + (assert tmp%2#0) + let tmp%3#0: bytes = (sumhash512 0x) + let tmp%4#0: uint64 = (len tmp%3#0) + (assert tmp%4#0) + return \ No newline at end of file diff --git a/test_cases/avm_12/out/Contract.ir/Contract.approval.4.lstack.mir b/test_cases/avm_12/out/Contract.ir/Contract.approval.4.lstack.mir new file mode 100644 index 0000000000..f96c284da1 --- /dev/null +++ b/test_cases/avm_12/out/Contract.ir/Contract.approval.4.lstack.mir @@ -0,0 +1,93 @@ +// Op Stack (out) +// algopy.arc4.ARC4Contract.approval_program() -> uint64: +main: + // avm_12/contract.py:9 + // class Contract(ARC4Contract, avm_version=12): + txn NumAppArgs tmp%0#1 + l-load tmp%0#1 0 tmp%0#1 + bz main_bare_routing@6 ; b main_abi_routing@2 + +main_abi_routing@2: + // avm_12/contract.py:9 + // class Contract(ARC4Contract, avm_version=12): + txna ApplicationArgs 0 tmp%2#0 + method test_new_ops()void tmp%2#0,Method(test_new_ops()void) + l-load tmp%2#0 1 Method(test_new_ops()void),tmp%2#0 + match main_test_new_ops_route@3 ; b main_after_if_else@10 + +main_test_new_ops_route@3: + // avm_12/contract.py:10 + // @arc4.abimethod + txn OnCompletion tmp%3#0 + l-load tmp%3#0 0 tmp%3#0 + ! tmp%4#0 + l-load tmp%4#0 0 tmp%4#0 + assert // OnCompletion is not NoOp + txn ApplicationID tmp%5#0 + l-load tmp%5#0 0 tmp%5#0 + assert // can only call when not creating + callsub test_new_ops + int 1 1 + l-store test_cases.avm_12.contract.Contract.__puya_arc4_router__%0#0 0 test_cases.avm_12.contract.Contract.__puya_arc4_router__%0#0 + l-load test_cases.avm_12.contract.Contract.__puya_arc4_router__%0#0 0 test_cases.avm_12.contract.Contract.__puya_arc4_router__%0#0 + v-store tmp%0#0 + b main_after_inlined_test_cases.avm_12.contract.Contract.__puya_arc4_router__@11 + +main_bare_routing@6: + // avm_12/contract.py:9 + // class Contract(ARC4Contract, avm_version=12): + txn OnCompletion tmp%7#0 + l-load tmp%7#0 0 tmp%7#0 + bz main___algopy_default_create@7 ; b main_after_if_else@10 + +main___algopy_default_create@7: + txn ApplicationID tmp%8#0 + l-load tmp%8#0 0 tmp%8#0 + ! tmp%9#0 + l-load tmp%9#0 0 tmp%9#0 + assert // can only call when creating + int 1 1 + l-store test_cases.avm_12.contract.Contract.__puya_arc4_router__%0#0 0 test_cases.avm_12.contract.Contract.__puya_arc4_router__%0#0 + l-load test_cases.avm_12.contract.Contract.__puya_arc4_router__%0#0 0 test_cases.avm_12.contract.Contract.__puya_arc4_router__%0#0 + v-store tmp%0#0 + b main_after_inlined_test_cases.avm_12.contract.Contract.__puya_arc4_router__@11 + +main_after_if_else@10: + // avm_12/contract.py:9 + // class Contract(ARC4Contract, avm_version=12): + int 0 0 + l-store test_cases.avm_12.contract.Contract.__puya_arc4_router__%0#0 0 test_cases.avm_12.contract.Contract.__puya_arc4_router__%0#0 + l-load test_cases.avm_12.contract.Contract.__puya_arc4_router__%0#0 0 test_cases.avm_12.contract.Contract.__puya_arc4_router__%0#0 + v-store tmp%0#0 + b main_after_inlined_test_cases.avm_12.contract.Contract.__puya_arc4_router__@11 + +main_after_inlined_test_cases.avm_12.contract.Contract.__puya_arc4_router__@11: + v-load tmp%0#0 tmp%0#0 + return + + +// test_cases.avm_12.contract.Contract.test_new_ops() -> void: +test_new_ops: + // avm_12/contract.py:13 + // assert not op.falcon_verify(b"", b"", op.bzero(1793)) + int 1793 1793 + bzero tmp%0#0 + byte 0x tmp%0#0,0x + byte 0x tmp%0#0,0x,0x + l-load tmp%0#0 2 0x,0x,tmp%0#0 + falcon_verify tmp%1#0 + l-load tmp%1#0 0 tmp%1#0 + ! tmp%2#0 + l-load tmp%2#0 0 tmp%2#0 + assert + // avm_12/contract.py:14 + // assert op.sumhash512(b"") + byte 0x 0x + sumhash512 tmp%3#0 + l-load tmp%3#0 0 tmp%3#0 + len tmp%4#0 + l-load tmp%4#0 0 tmp%4#0 + assert + retsub + + diff --git a/test_cases/avm_12/out/Contract.ir/Contract.approval.5.lstack.opt.mir b/test_cases/avm_12/out/Contract.ir/Contract.approval.5.lstack.opt.mir new file mode 100644 index 0000000000..43434bcec2 --- /dev/null +++ b/test_cases/avm_12/out/Contract.ir/Contract.approval.5.lstack.opt.mir @@ -0,0 +1,76 @@ +// Op Stack (out) +// algopy.arc4.ARC4Contract.approval_program() -> uint64: +main: + // avm_12/contract.py:9 + // class Contract(ARC4Contract, avm_version=12): + txn NumAppArgs tmp%0#1 + bz main_bare_routing@6 ; b main_abi_routing@2 + +main_abi_routing@2: + // avm_12/contract.py:9 + // class Contract(ARC4Contract, avm_version=12): + txna ApplicationArgs 0 tmp%2#0 + method test_new_ops()void tmp%2#0,Method(test_new_ops()void) + l-load tmp%2#0 1 Method(test_new_ops()void),tmp%2#0 + match main_test_new_ops_route@3 ; b main_after_if_else@10 + +main_test_new_ops_route@3: + // avm_12/contract.py:10 + // @arc4.abimethod + txn OnCompletion tmp%3#0 + ! tmp%4#0 + assert // OnCompletion is not NoOp + txn ApplicationID tmp%5#0 + assert // can only call when not creating + callsub test_new_ops + int 1 test_cases.avm_12.contract.Contract.__puya_arc4_router__%0#0 + v-store tmp%0#0 + b main_after_inlined_test_cases.avm_12.contract.Contract.__puya_arc4_router__@11 + +main_bare_routing@6: + // avm_12/contract.py:9 + // class Contract(ARC4Contract, avm_version=12): + txn OnCompletion tmp%7#0 + bz main___algopy_default_create@7 ; b main_after_if_else@10 + +main___algopy_default_create@7: + txn ApplicationID tmp%8#0 + ! tmp%9#0 + assert // can only call when creating + int 1 test_cases.avm_12.contract.Contract.__puya_arc4_router__%0#0 + v-store tmp%0#0 + b main_after_inlined_test_cases.avm_12.contract.Contract.__puya_arc4_router__@11 + +main_after_if_else@10: + // avm_12/contract.py:9 + // class Contract(ARC4Contract, avm_version=12): + int 0 test_cases.avm_12.contract.Contract.__puya_arc4_router__%0#0 + v-store tmp%0#0 + b main_after_inlined_test_cases.avm_12.contract.Contract.__puya_arc4_router__@11 + +main_after_inlined_test_cases.avm_12.contract.Contract.__puya_arc4_router__@11: + v-load tmp%0#0 tmp%0#0 + return + + +// test_cases.avm_12.contract.Contract.test_new_ops() -> void: +test_new_ops: + // avm_12/contract.py:13 + // assert not op.falcon_verify(b"", b"", op.bzero(1793)) + int 1793 1793 + bzero tmp%0#0 + byte 0x tmp%0#0,0x + byte 0x tmp%0#0,0x,0x + l-load tmp%0#0 2 0x,0x,tmp%0#0 + falcon_verify tmp%1#0 + ! tmp%2#0 + assert + // avm_12/contract.py:14 + // assert op.sumhash512(b"") + byte 0x 0x + sumhash512 tmp%3#0 + len tmp%4#0 + assert + retsub + + diff --git a/test_cases/avm_12/out/Contract.ir/Contract.approval.6.xstack.mir b/test_cases/avm_12/out/Contract.ir/Contract.approval.6.xstack.mir new file mode 100644 index 0000000000..1d10f1abf6 --- /dev/null +++ b/test_cases/avm_12/out/Contract.ir/Contract.approval.6.xstack.mir @@ -0,0 +1,76 @@ +// Op Stack (out) +// algopy.arc4.ARC4Contract.approval_program() -> uint64: +main: + // avm_12/contract.py:9 + // class Contract(ARC4Contract, avm_version=12): + txn NumAppArgs tmp%0#1 + bz main_bare_routing@6 ; b main_abi_routing@2 + +main_abi_routing@2: + // avm_12/contract.py:9 + // class Contract(ARC4Contract, avm_version=12): + txna ApplicationArgs 0 tmp%2#0 + method test_new_ops()void tmp%2#0,Method(test_new_ops()void) + l-load tmp%2#0 1 Method(test_new_ops()void),tmp%2#0 + match main_test_new_ops_route@3 ; b main_after_if_else@10 + +main_test_new_ops_route@3: + // avm_12/contract.py:10 + // @arc4.abimethod + txn OnCompletion tmp%3#0 + ! tmp%4#0 + assert // OnCompletion is not NoOp + txn ApplicationID tmp%5#0 + assert // can only call when not creating + callsub test_new_ops + int 1 test_cases.avm_12.contract.Contract.__puya_arc4_router__%0#0 + x-store tmp%0#0 (𝕏) tmp%0#0 | + b main_after_inlined_test_cases.avm_12.contract.Contract.__puya_arc4_router__@11 (𝕏) tmp%0#0 | + +main_bare_routing@6: + // avm_12/contract.py:9 + // class Contract(ARC4Contract, avm_version=12): + txn OnCompletion tmp%7#0 + bz main___algopy_default_create@7 ; b main_after_if_else@10 + +main___algopy_default_create@7: + txn ApplicationID tmp%8#0 + ! tmp%9#0 + assert // can only call when creating + int 1 test_cases.avm_12.contract.Contract.__puya_arc4_router__%0#0 + x-store tmp%0#0 (𝕏) tmp%0#0 | + b main_after_inlined_test_cases.avm_12.contract.Contract.__puya_arc4_router__@11 (𝕏) tmp%0#0 | + +main_after_if_else@10: + // avm_12/contract.py:9 + // class Contract(ARC4Contract, avm_version=12): + int 0 test_cases.avm_12.contract.Contract.__puya_arc4_router__%0#0 + x-store tmp%0#0 (𝕏) tmp%0#0 | + b main_after_inlined_test_cases.avm_12.contract.Contract.__puya_arc4_router__@11 (𝕏) tmp%0#0 | + +main_after_inlined_test_cases.avm_12.contract.Contract.__puya_arc4_router__@11: (𝕏) tmp%0#0 | + x-load tmp%0#0 tmp%0#0 + return + + +// test_cases.avm_12.contract.Contract.test_new_ops() -> void: +test_new_ops: + // avm_12/contract.py:13 + // assert not op.falcon_verify(b"", b"", op.bzero(1793)) + int 1793 1793 + bzero tmp%0#0 + byte 0x tmp%0#0,0x + byte 0x tmp%0#0,0x,0x + l-load tmp%0#0 2 0x,0x,tmp%0#0 + falcon_verify tmp%1#0 + ! tmp%2#0 + assert + // avm_12/contract.py:14 + // assert op.sumhash512(b"") + byte 0x 0x + sumhash512 tmp%3#0 + len tmp%4#0 + assert + retsub + + diff --git a/test_cases/avm_12/out/Contract.ir/Contract.approval.7.xstack.opt.mir b/test_cases/avm_12/out/Contract.ir/Contract.approval.7.xstack.opt.mir new file mode 100644 index 0000000000..bb5d97c670 --- /dev/null +++ b/test_cases/avm_12/out/Contract.ir/Contract.approval.7.xstack.opt.mir @@ -0,0 +1,76 @@ +// Op Stack (out) +// algopy.arc4.ARC4Contract.approval_program() -> uint64: +main: + // avm_12/contract.py:9 + // class Contract(ARC4Contract, avm_version=12): + txn NumAppArgs tmp%0#1 + bz main_bare_routing@6 ; b main_abi_routing@2 + +main_abi_routing@2: + // avm_12/contract.py:9 + // class Contract(ARC4Contract, avm_version=12): + txna ApplicationArgs 0 tmp%2#0 + method test_new_ops()void tmp%2#0,Method(test_new_ops()void) + l-load tmp%2#0 1 Method(test_new_ops()void),tmp%2#0 + match main_test_new_ops_route@3 ; b main_after_if_else@10 + +main_test_new_ops_route@3: + // avm_12/contract.py:10 + // @arc4.abimethod + txn OnCompletion tmp%3#0 + ! tmp%4#0 + assert // OnCompletion is not NoOp + txn ApplicationID tmp%5#0 + assert // can only call when not creating + callsub test_new_ops + int 1 tmp%0#0 + x-store tmp%0#0 (𝕏) tmp%0#0 | + b main_after_inlined_test_cases.avm_12.contract.Contract.__puya_arc4_router__@11 (𝕏) tmp%0#0 | + +main_bare_routing@6: + // avm_12/contract.py:9 + // class Contract(ARC4Contract, avm_version=12): + txn OnCompletion tmp%7#0 + bz main___algopy_default_create@7 ; b main_after_if_else@10 + +main___algopy_default_create@7: + txn ApplicationID tmp%8#0 + ! tmp%9#0 + assert // can only call when creating + int 1 tmp%0#0 + x-store tmp%0#0 (𝕏) tmp%0#0 | + b main_after_inlined_test_cases.avm_12.contract.Contract.__puya_arc4_router__@11 (𝕏) tmp%0#0 | + +main_after_if_else@10: + // avm_12/contract.py:9 + // class Contract(ARC4Contract, avm_version=12): + int 0 tmp%0#0 + x-store tmp%0#0 (𝕏) tmp%0#0 | + b main_after_inlined_test_cases.avm_12.contract.Contract.__puya_arc4_router__@11 (𝕏) tmp%0#0 | + +main_after_inlined_test_cases.avm_12.contract.Contract.__puya_arc4_router__@11: (𝕏) tmp%0#0 | + x-load tmp%0#0 tmp%0#0 + return + + +// test_cases.avm_12.contract.Contract.test_new_ops() -> void: +test_new_ops: + // avm_12/contract.py:13 + // assert not op.falcon_verify(b"", b"", op.bzero(1793)) + int 1793 1793 + bzero tmp%0#0 + byte 0x tmp%0#0,0x + byte 0x tmp%0#0,0x,0x + l-load tmp%0#0 2 0x,0x,tmp%0#0 + falcon_verify tmp%1#0 + ! tmp%2#0 + assert + // avm_12/contract.py:14 + // assert op.sumhash512(b"") + byte 0x 0x + sumhash512 tmp%3#0 + len tmp%4#0 + assert + retsub + + diff --git a/test_cases/avm_12/out/Contract.ir/Contract.approval.8.fstack.mir b/test_cases/avm_12/out/Contract.ir/Contract.approval.8.fstack.mir new file mode 100644 index 0000000000..bb5d97c670 --- /dev/null +++ b/test_cases/avm_12/out/Contract.ir/Contract.approval.8.fstack.mir @@ -0,0 +1,76 @@ +// Op Stack (out) +// algopy.arc4.ARC4Contract.approval_program() -> uint64: +main: + // avm_12/contract.py:9 + // class Contract(ARC4Contract, avm_version=12): + txn NumAppArgs tmp%0#1 + bz main_bare_routing@6 ; b main_abi_routing@2 + +main_abi_routing@2: + // avm_12/contract.py:9 + // class Contract(ARC4Contract, avm_version=12): + txna ApplicationArgs 0 tmp%2#0 + method test_new_ops()void tmp%2#0,Method(test_new_ops()void) + l-load tmp%2#0 1 Method(test_new_ops()void),tmp%2#0 + match main_test_new_ops_route@3 ; b main_after_if_else@10 + +main_test_new_ops_route@3: + // avm_12/contract.py:10 + // @arc4.abimethod + txn OnCompletion tmp%3#0 + ! tmp%4#0 + assert // OnCompletion is not NoOp + txn ApplicationID tmp%5#0 + assert // can only call when not creating + callsub test_new_ops + int 1 tmp%0#0 + x-store tmp%0#0 (𝕏) tmp%0#0 | + b main_after_inlined_test_cases.avm_12.contract.Contract.__puya_arc4_router__@11 (𝕏) tmp%0#0 | + +main_bare_routing@6: + // avm_12/contract.py:9 + // class Contract(ARC4Contract, avm_version=12): + txn OnCompletion tmp%7#0 + bz main___algopy_default_create@7 ; b main_after_if_else@10 + +main___algopy_default_create@7: + txn ApplicationID tmp%8#0 + ! tmp%9#0 + assert // can only call when creating + int 1 tmp%0#0 + x-store tmp%0#0 (𝕏) tmp%0#0 | + b main_after_inlined_test_cases.avm_12.contract.Contract.__puya_arc4_router__@11 (𝕏) tmp%0#0 | + +main_after_if_else@10: + // avm_12/contract.py:9 + // class Contract(ARC4Contract, avm_version=12): + int 0 tmp%0#0 + x-store tmp%0#0 (𝕏) tmp%0#0 | + b main_after_inlined_test_cases.avm_12.contract.Contract.__puya_arc4_router__@11 (𝕏) tmp%0#0 | + +main_after_inlined_test_cases.avm_12.contract.Contract.__puya_arc4_router__@11: (𝕏) tmp%0#0 | + x-load tmp%0#0 tmp%0#0 + return + + +// test_cases.avm_12.contract.Contract.test_new_ops() -> void: +test_new_ops: + // avm_12/contract.py:13 + // assert not op.falcon_verify(b"", b"", op.bzero(1793)) + int 1793 1793 + bzero tmp%0#0 + byte 0x tmp%0#0,0x + byte 0x tmp%0#0,0x,0x + l-load tmp%0#0 2 0x,0x,tmp%0#0 + falcon_verify tmp%1#0 + ! tmp%2#0 + assert + // avm_12/contract.py:14 + // assert op.sumhash512(b"") + byte 0x 0x + sumhash512 tmp%3#0 + len tmp%4#0 + assert + retsub + + diff --git a/test_cases/avm_12/out/Contract.ir/Contract.approval.9.fstack.opt.mir b/test_cases/avm_12/out/Contract.ir/Contract.approval.9.fstack.opt.mir new file mode 100644 index 0000000000..bb5d97c670 --- /dev/null +++ b/test_cases/avm_12/out/Contract.ir/Contract.approval.9.fstack.opt.mir @@ -0,0 +1,76 @@ +// Op Stack (out) +// algopy.arc4.ARC4Contract.approval_program() -> uint64: +main: + // avm_12/contract.py:9 + // class Contract(ARC4Contract, avm_version=12): + txn NumAppArgs tmp%0#1 + bz main_bare_routing@6 ; b main_abi_routing@2 + +main_abi_routing@2: + // avm_12/contract.py:9 + // class Contract(ARC4Contract, avm_version=12): + txna ApplicationArgs 0 tmp%2#0 + method test_new_ops()void tmp%2#0,Method(test_new_ops()void) + l-load tmp%2#0 1 Method(test_new_ops()void),tmp%2#0 + match main_test_new_ops_route@3 ; b main_after_if_else@10 + +main_test_new_ops_route@3: + // avm_12/contract.py:10 + // @arc4.abimethod + txn OnCompletion tmp%3#0 + ! tmp%4#0 + assert // OnCompletion is not NoOp + txn ApplicationID tmp%5#0 + assert // can only call when not creating + callsub test_new_ops + int 1 tmp%0#0 + x-store tmp%0#0 (𝕏) tmp%0#0 | + b main_after_inlined_test_cases.avm_12.contract.Contract.__puya_arc4_router__@11 (𝕏) tmp%0#0 | + +main_bare_routing@6: + // avm_12/contract.py:9 + // class Contract(ARC4Contract, avm_version=12): + txn OnCompletion tmp%7#0 + bz main___algopy_default_create@7 ; b main_after_if_else@10 + +main___algopy_default_create@7: + txn ApplicationID tmp%8#0 + ! tmp%9#0 + assert // can only call when creating + int 1 tmp%0#0 + x-store tmp%0#0 (𝕏) tmp%0#0 | + b main_after_inlined_test_cases.avm_12.contract.Contract.__puya_arc4_router__@11 (𝕏) tmp%0#0 | + +main_after_if_else@10: + // avm_12/contract.py:9 + // class Contract(ARC4Contract, avm_version=12): + int 0 tmp%0#0 + x-store tmp%0#0 (𝕏) tmp%0#0 | + b main_after_inlined_test_cases.avm_12.contract.Contract.__puya_arc4_router__@11 (𝕏) tmp%0#0 | + +main_after_inlined_test_cases.avm_12.contract.Contract.__puya_arc4_router__@11: (𝕏) tmp%0#0 | + x-load tmp%0#0 tmp%0#0 + return + + +// test_cases.avm_12.contract.Contract.test_new_ops() -> void: +test_new_ops: + // avm_12/contract.py:13 + // assert not op.falcon_verify(b"", b"", op.bzero(1793)) + int 1793 1793 + bzero tmp%0#0 + byte 0x tmp%0#0,0x + byte 0x tmp%0#0,0x,0x + l-load tmp%0#0 2 0x,0x,tmp%0#0 + falcon_verify tmp%1#0 + ! tmp%2#0 + assert + // avm_12/contract.py:14 + // assert op.sumhash512(b"") + byte 0x 0x + sumhash512 tmp%3#0 + len tmp%4#0 + assert + retsub + + diff --git a/test_cases/avm_12/out/Contract.ir/Contract.clear.0.ssa.ir b/test_cases/avm_12/out/Contract.ir/Contract.clear.0.ssa.ir new file mode 100644 index 0000000000..b19ab730e7 --- /dev/null +++ b/test_cases/avm_12/out/Contract.ir/Contract.clear.0.ssa.ir @@ -0,0 +1,3 @@ +main algopy.arc4.ARC4Contract.clear_state_program: + block@0: // L1 + return 1u \ No newline at end of file diff --git a/test_cases/avm_12/out/Contract.ir/Contract.clear.1.destructured.ir b/test_cases/avm_12/out/Contract.ir/Contract.clear.1.destructured.ir new file mode 100644 index 0000000000..b19ab730e7 --- /dev/null +++ b/test_cases/avm_12/out/Contract.ir/Contract.clear.1.destructured.ir @@ -0,0 +1,3 @@ +main algopy.arc4.ARC4Contract.clear_state_program: + block@0: // L1 + return 1u \ No newline at end of file diff --git a/test_cases/avm_12/out/Contract.ir/Contract.clear.2.lstack.mir b/test_cases/avm_12/out/Contract.ir/Contract.clear.2.lstack.mir new file mode 100644 index 0000000000..0be78fcf1b --- /dev/null +++ b/test_cases/avm_12/out/Contract.ir/Contract.clear.2.lstack.mir @@ -0,0 +1,7 @@ +// Op Stack (out) +// algopy.arc4.ARC4Contract.clear_state_program() -> uint64: +main: + int 1 1 + return + + diff --git a/test_cases/avm_12/out/Contract.ir/Contract.clear.3.lstack.opt.mir b/test_cases/avm_12/out/Contract.ir/Contract.clear.3.lstack.opt.mir new file mode 100644 index 0000000000..0be78fcf1b --- /dev/null +++ b/test_cases/avm_12/out/Contract.ir/Contract.clear.3.lstack.opt.mir @@ -0,0 +1,7 @@ +// Op Stack (out) +// algopy.arc4.ARC4Contract.clear_state_program() -> uint64: +main: + int 1 1 + return + + diff --git a/test_cases/avm_12/out/Contract.ir/Contract.clear.4.xstack.mir b/test_cases/avm_12/out/Contract.ir/Contract.clear.4.xstack.mir new file mode 100644 index 0000000000..0be78fcf1b --- /dev/null +++ b/test_cases/avm_12/out/Contract.ir/Contract.clear.4.xstack.mir @@ -0,0 +1,7 @@ +// Op Stack (out) +// algopy.arc4.ARC4Contract.clear_state_program() -> uint64: +main: + int 1 1 + return + + diff --git a/test_cases/avm_12/out/Contract.ir/Contract.clear.5.xstack.opt.mir b/test_cases/avm_12/out/Contract.ir/Contract.clear.5.xstack.opt.mir new file mode 100644 index 0000000000..0be78fcf1b --- /dev/null +++ b/test_cases/avm_12/out/Contract.ir/Contract.clear.5.xstack.opt.mir @@ -0,0 +1,7 @@ +// Op Stack (out) +// algopy.arc4.ARC4Contract.clear_state_program() -> uint64: +main: + int 1 1 + return + + diff --git a/test_cases/avm_12/out/Contract.ir/Contract.clear.6.fstack.mir b/test_cases/avm_12/out/Contract.ir/Contract.clear.6.fstack.mir new file mode 100644 index 0000000000..0be78fcf1b --- /dev/null +++ b/test_cases/avm_12/out/Contract.ir/Contract.clear.6.fstack.mir @@ -0,0 +1,7 @@ +// Op Stack (out) +// algopy.arc4.ARC4Contract.clear_state_program() -> uint64: +main: + int 1 1 + return + + diff --git a/test_cases/avm_12/out/Contract.ir/Contract.clear.7.fstack.opt.mir b/test_cases/avm_12/out/Contract.ir/Contract.clear.7.fstack.opt.mir new file mode 100644 index 0000000000..0be78fcf1b --- /dev/null +++ b/test_cases/avm_12/out/Contract.ir/Contract.clear.7.fstack.opt.mir @@ -0,0 +1,7 @@ +// Op Stack (out) +// algopy.arc4.ARC4Contract.clear_state_program() -> uint64: +main: + int 1 1 + return + + diff --git a/test_cases/avm_12/out/Contract.ir/Contract.clear.8.mir b/test_cases/avm_12/out/Contract.ir/Contract.clear.8.mir new file mode 100644 index 0000000000..0be78fcf1b --- /dev/null +++ b/test_cases/avm_12/out/Contract.ir/Contract.clear.8.mir @@ -0,0 +1,7 @@ +// Op Stack (out) +// algopy.arc4.ARC4Contract.clear_state_program() -> uint64: +main: + int 1 1 + return + + diff --git a/test_cases/avm_11/out/avm_11_sig.ir/avm_11_sig.0.ssa.ir b/test_cases/avm_12/out/avm_12_sig.ir/avm_12_sig.0.ssa.ir similarity index 74% rename from test_cases/avm_11/out/avm_11_sig.ir/avm_11_sig.0.ssa.ir rename to test_cases/avm_12/out/avm_12_sig.ir/avm_12_sig.0.ssa.ir index f901c190dd..6290078e94 100644 --- a/test_cases/avm_11/out/avm_11_sig.ir/avm_11_sig.0.ssa.ir +++ b/test_cases/avm_12/out/avm_12_sig.ir/avm_12_sig.0.ssa.ir @@ -1,4 +1,4 @@ -main test_cases.avm_11.contract.avm_11_sig: +main test_cases.avm_12.contract.avm_12_sig: block@0: // L4 let tmp%0#0: bytes = (sumhash512 0x) let tmp%1#0: uint64 = (len tmp%0#0) diff --git a/test_cases/avm_11/out/avm_11_sig.ir/avm_11_sig.1.destructured.ir b/test_cases/avm_12/out/avm_12_sig.ir/avm_12_sig.1.destructured.ir similarity index 74% rename from test_cases/avm_11/out/avm_11_sig.ir/avm_11_sig.1.destructured.ir rename to test_cases/avm_12/out/avm_12_sig.ir/avm_12_sig.1.destructured.ir index f901c190dd..6290078e94 100644 --- a/test_cases/avm_11/out/avm_11_sig.ir/avm_11_sig.1.destructured.ir +++ b/test_cases/avm_12/out/avm_12_sig.ir/avm_12_sig.1.destructured.ir @@ -1,4 +1,4 @@ -main test_cases.avm_11.contract.avm_11_sig: +main test_cases.avm_12.contract.avm_12_sig: block@0: // L4 let tmp%0#0: bytes = (sumhash512 0x) let tmp%1#0: uint64 = (len tmp%0#0) diff --git a/test_cases/avm_11/out/avm_11_sig.ir/avm_11_sig.2.lstack.mir b/test_cases/avm_12/out/avm_12_sig.ir/avm_12_sig.2.lstack.mir similarity index 80% rename from test_cases/avm_11/out/avm_11_sig.ir/avm_11_sig.2.lstack.mir rename to test_cases/avm_12/out/avm_12_sig.ir/avm_12_sig.2.lstack.mir index 4a2c655353..be0f10cebe 100644 --- a/test_cases/avm_11/out/avm_11_sig.ir/avm_11_sig.2.lstack.mir +++ b/test_cases/avm_12/out/avm_12_sig.ir/avm_12_sig.2.lstack.mir @@ -1,7 +1,7 @@ // Op Stack (out) -// test_cases.avm_11.contract.avm_11_sig() -> uint64: +// test_cases.avm_12.contract.avm_12_sig() -> uint64: main: - // avm_11/contract.py:6 + // avm_12/contract.py:6 // return op.sumhash512(b"").length byte 0x 0x sumhash512 tmp%0#0 diff --git a/test_cases/avm_11/out/avm_11_sig.ir/avm_11_sig.4.xstack.mir b/test_cases/avm_12/out/avm_12_sig.ir/avm_12_sig.3.lstack.opt.mir similarity index 75% rename from test_cases/avm_11/out/avm_11_sig.ir/avm_11_sig.4.xstack.mir rename to test_cases/avm_12/out/avm_12_sig.ir/avm_12_sig.3.lstack.opt.mir index 1ef7148193..e79a531432 100644 --- a/test_cases/avm_11/out/avm_11_sig.ir/avm_11_sig.4.xstack.mir +++ b/test_cases/avm_12/out/avm_12_sig.ir/avm_12_sig.3.lstack.opt.mir @@ -1,7 +1,7 @@ // Op Stack (out) -// test_cases.avm_11.contract.avm_11_sig() -> uint64: +// test_cases.avm_12.contract.avm_12_sig() -> uint64: main: - // avm_11/contract.py:6 + // avm_12/contract.py:6 // return op.sumhash512(b"").length byte 0x 0x sumhash512 tmp%0#0 diff --git a/test_cases/avm_11/out/avm_11_sig.ir/avm_11_sig.5.xstack.opt.mir b/test_cases/avm_12/out/avm_12_sig.ir/avm_12_sig.4.xstack.mir similarity index 75% rename from test_cases/avm_11/out/avm_11_sig.ir/avm_11_sig.5.xstack.opt.mir rename to test_cases/avm_12/out/avm_12_sig.ir/avm_12_sig.4.xstack.mir index 1ef7148193..e79a531432 100644 --- a/test_cases/avm_11/out/avm_11_sig.ir/avm_11_sig.5.xstack.opt.mir +++ b/test_cases/avm_12/out/avm_12_sig.ir/avm_12_sig.4.xstack.mir @@ -1,7 +1,7 @@ // Op Stack (out) -// test_cases.avm_11.contract.avm_11_sig() -> uint64: +// test_cases.avm_12.contract.avm_12_sig() -> uint64: main: - // avm_11/contract.py:6 + // avm_12/contract.py:6 // return op.sumhash512(b"").length byte 0x 0x sumhash512 tmp%0#0 diff --git a/test_cases/avm_11/out/avm_11_sig.ir/avm_11_sig.6.fstack.mir b/test_cases/avm_12/out/avm_12_sig.ir/avm_12_sig.5.xstack.opt.mir similarity index 75% rename from test_cases/avm_11/out/avm_11_sig.ir/avm_11_sig.6.fstack.mir rename to test_cases/avm_12/out/avm_12_sig.ir/avm_12_sig.5.xstack.opt.mir index 1ef7148193..e79a531432 100644 --- a/test_cases/avm_11/out/avm_11_sig.ir/avm_11_sig.6.fstack.mir +++ b/test_cases/avm_12/out/avm_12_sig.ir/avm_12_sig.5.xstack.opt.mir @@ -1,7 +1,7 @@ // Op Stack (out) -// test_cases.avm_11.contract.avm_11_sig() -> uint64: +// test_cases.avm_12.contract.avm_12_sig() -> uint64: main: - // avm_11/contract.py:6 + // avm_12/contract.py:6 // return op.sumhash512(b"").length byte 0x 0x sumhash512 tmp%0#0 diff --git a/test_cases/avm_11/out/avm_11_sig.ir/avm_11_sig.3.lstack.opt.mir b/test_cases/avm_12/out/avm_12_sig.ir/avm_12_sig.6.fstack.mir similarity index 75% rename from test_cases/avm_11/out/avm_11_sig.ir/avm_11_sig.3.lstack.opt.mir rename to test_cases/avm_12/out/avm_12_sig.ir/avm_12_sig.6.fstack.mir index 1ef7148193..e79a531432 100644 --- a/test_cases/avm_11/out/avm_11_sig.ir/avm_11_sig.3.lstack.opt.mir +++ b/test_cases/avm_12/out/avm_12_sig.ir/avm_12_sig.6.fstack.mir @@ -1,7 +1,7 @@ // Op Stack (out) -// test_cases.avm_11.contract.avm_11_sig() -> uint64: +// test_cases.avm_12.contract.avm_12_sig() -> uint64: main: - // avm_11/contract.py:6 + // avm_12/contract.py:6 // return op.sumhash512(b"").length byte 0x 0x sumhash512 tmp%0#0 diff --git a/test_cases/avm_12/out/avm_12_sig.ir/avm_12_sig.7.fstack.opt.mir b/test_cases/avm_12/out/avm_12_sig.ir/avm_12_sig.7.fstack.opt.mir new file mode 100644 index 0000000000..e79a531432 --- /dev/null +++ b/test_cases/avm_12/out/avm_12_sig.ir/avm_12_sig.7.fstack.opt.mir @@ -0,0 +1,11 @@ +// Op Stack (out) +// test_cases.avm_12.contract.avm_12_sig() -> uint64: +main: + // avm_12/contract.py:6 + // return op.sumhash512(b"").length + byte 0x 0x + sumhash512 tmp%0#0 + len tmp%1#0 + return + + diff --git a/test_cases/avm_12/out/avm_12_sig.ir/avm_12_sig.8.mir b/test_cases/avm_12/out/avm_12_sig.ir/avm_12_sig.8.mir new file mode 100644 index 0000000000..e79a531432 --- /dev/null +++ b/test_cases/avm_12/out/avm_12_sig.ir/avm_12_sig.8.mir @@ -0,0 +1,11 @@ +// Op Stack (out) +// test_cases.avm_12.contract.avm_12_sig() -> uint64: +main: + // avm_12/contract.py:6 + // return op.sumhash512(b"").length + byte 0x 0x + sumhash512 tmp%0#0 + len tmp%1#0 + return + + diff --git a/test_cases/avm_11/out/avm_11_sig.puya.map b/test_cases/avm_12/out/avm_12_sig.puya.map similarity index 91% rename from test_cases/avm_11/out/avm_11_sig.puya.map rename to test_cases/avm_12/out/avm_12_sig.puya.map index 8a6da138b8..9486ffe460 100644 --- a/test_cases/avm_11/out/avm_11_sig.puya.map +++ b/test_cases/avm_12/out/avm_12_sig.puya.map @@ -7,7 +7,7 @@ "op_pc_offset": 0, "pc_events": { "1": { - "subroutine": "test_cases.avm_11.contract.avm_11_sig", + "subroutine": "test_cases.avm_12.contract.avm_12_sig", "params": {}, "block": "main", "stack_in": [], diff --git a/test_cases/avm_11/out/avm_11_sig.teal b/test_cases/avm_12/out/avm_12_sig.teal similarity index 54% rename from test_cases/avm_11/out/avm_11_sig.teal rename to test_cases/avm_12/out/avm_12_sig.teal index 6c9916b804..6b218aae88 100644 --- a/test_cases/avm_11/out/avm_11_sig.teal +++ b/test_cases/avm_12/out/avm_12_sig.teal @@ -1,9 +1,9 @@ -#pragma version 11 +#pragma version 12 #pragma typetrack false -// test_cases.avm_11.contract.avm_11_sig() -> uint64: +// test_cases.avm_12.contract.avm_12_sig() -> uint64: main: - // avm_11/contract.py:6 + // avm_12/contract.py:6 // return op.sumhash512(b"").length pushbytes 0x sumhash512 diff --git a/test_cases/avm_12/out/client_Contract.py b/test_cases/avm_12/out/client_Contract.py new file mode 100644 index 0000000000..17a5280f81 --- /dev/null +++ b/test_cases/avm_12/out/client_Contract.py @@ -0,0 +1,13 @@ +# This file is auto-generated, do not modify +# flake8: noqa +# fmt: off +import typing + +import algopy + + +class Contract(algopy.arc4.ARC4Client, typing.Protocol): + @algopy.arc4.abimethod + def test_new_ops( + self, + ) -> None: ... diff --git a/test_cases/avm_12/out/module.awst b/test_cases/avm_12/out/module.awst new file mode 100644 index 0000000000..16b3837dd6 --- /dev/null +++ b/test_cases/avm_12/out/module.awst @@ -0,0 +1,31 @@ +logicsig test_cases.avm_12.contract.avm_12_sig +{ + return len(sumhash512(hex<"">)) +} + +contract Contract +{ + method_resolution_order: ( + algopy.arc4.ARC4Contract, + ) + + subroutine algopy.arc4.ARC4Contract.approval_program(): bool + { + return arc4_router() + } + + subroutine algopy.arc4.ARC4Contract.clear_state_program(): bool + { + return true + } + + abimethod test_cases.avm_12.contract.Contract.test_new_ops(): void + { + assert(!(falcon_verify(hex<"">, hex<"">, bzero(1793u)))) + assert(len(sumhash512(hex<"">)) != 0u) + } + + baremethod test_cases.avm_12.contract.Contract.__algopy_default_create(): void + { + } +} \ No newline at end of file diff --git a/test_cases/avm_12/out_O2/Contract.approval.puya.map b/test_cases/avm_12/out_O2/Contract.approval.puya.map new file mode 100644 index 0000000000..f7b423c783 --- /dev/null +++ b/test_cases/avm_12/out_O2/Contract.approval.puya.map @@ -0,0 +1,227 @@ +{ + "version": 3, + "sources": [ + "../contract.py" + ], + "mappings": ";AAQA;;AAAA;;;AAAA;;;;;;AAAA;;;AAAA;;;;AAAA;;;AACK;;AAAA;AAAA;AAAA;;AAAA;AAGkD;;;AAAT;AAAV;;AAAK;AAAtB;;AAAA;AAAJ;AAAP;AACqB;;AAAd;AAAA;AAAP;AAJH;;;AADL;;AAAA;;;;;;;;;", + "op_pc_offset": 0, + "pc_events": { + "1": { + "subroutine": "algopy.arc4.ARC4Contract.approval_program", + "params": {}, + "block": "main", + "stack_in": [], + "op": "txn NumAppArgs", + "defined_out": [ + "tmp%0#1" + ], + "stack_out": [ + "tmp%0#1" + ] + }, + "3": { + "op": "bz main_bare_routing@6", + "stack_out": [] + }, + "6": { + "op": "pushbytes 0xc2b8dd8a // method \"test_new_ops()void\"" + }, + "12": { + "op": "txna ApplicationArgs 0" + }, + "15": { + "op": "match main_test_new_ops_route@3" + }, + "19": { + "block": "main_after_if_else@10", + "stack_in": [], + "op": "pushint 0 // 0", + "defined_out": [ + "tmp%0#0" + ], + "stack_out": [ + "tmp%0#0" + ] + }, + "21": { + "op": "return" + }, + "22": { + "block": "main_test_new_ops_route@3", + "stack_in": [], + "op": "txn OnCompletion", + "defined_out": [ + "tmp%3#0" + ], + "stack_out": [ + "tmp%3#0" + ] + }, + "24": { + "op": "!", + "defined_out": [ + "tmp%4#0" + ], + "stack_out": [ + "tmp%4#0" + ] + }, + "25": { + "error": "OnCompletion is not NoOp", + "op": "assert // OnCompletion is not NoOp", + "stack_out": [] + }, + "26": { + "op": "txn ApplicationID", + "defined_out": [ + "tmp%5#0" + ], + "stack_out": [ + "tmp%5#0" + ] + }, + "28": { + "error": "can only call when not creating", + "op": "assert // can only call when not creating", + "stack_out": [] + }, + "29": { + "op": "pushint 1793 // 1793", + "defined_out": [ + "1793" + ], + "stack_out": [ + "1793" + ] + }, + "32": { + "op": "bzero", + "defined_out": [ + "tmp%0#2" + ], + "stack_out": [ + "tmp%0#2" + ] + }, + "33": { + "op": "pushbytes 0x", + "defined_out": [ + "0x", + "tmp%0#2" + ], + "stack_out": [ + "tmp%0#2", + "0x" + ] + }, + "35": { + "op": "dup", + "stack_out": [ + "tmp%0#2", + "0x", + "0x" + ] + }, + "36": { + "op": "uncover 2", + "stack_out": [ + "0x", + "0x", + "tmp%0#2" + ] + }, + "38": { + "op": "falcon_verify", + "defined_out": [ + "tmp%1#0" + ], + "stack_out": [ + "tmp%1#0" + ] + }, + "39": { + "op": "!", + "defined_out": [ + "tmp%2#1" + ], + "stack_out": [ + "tmp%2#1" + ] + }, + "40": { + "op": "assert", + "stack_out": [] + }, + "41": { + "op": "pushbytes 0x", + "stack_out": [ + "0x" + ] + }, + "43": { + "op": "sumhash512", + "defined_out": [ + "tmp%3#1" + ], + "stack_out": [ + "tmp%3#1" + ] + }, + "44": { + "op": "len", + "defined_out": [ + "tmp%4#1" + ], + "stack_out": [ + "tmp%4#1" + ] + }, + "45": { + "op": "assert", + "stack_out": [] + }, + "46": { + "op": "pushint 1 // 1", + "defined_out": [ + "tmp%0#0" + ], + "stack_out": [ + "tmp%0#0" + ] + }, + "48": { + "op": "return" + }, + "49": { + "block": "main_bare_routing@6", + "stack_in": [], + "op": "txn OnCompletion", + "defined_out": [ + "tmp%7#0" + ], + "stack_out": [ + "tmp%7#0" + ] + }, + "51": { + "op": "bnz main_after_if_else@10", + "stack_out": [] + }, + "54": { + "op": "txn ApplicationID" + }, + "56": { + "op": "!" + }, + "57": { + "error": "can only call when creating", + "op": "assert // can only call when creating" + }, + "58": { + "op": "pushint 1 // 1" + }, + "60": { + "op": "return" + } + } +} \ No newline at end of file diff --git a/test_cases/avm_12/out_O2/Contract.approval.teal b/test_cases/avm_12/out_O2/Contract.approval.teal new file mode 100644 index 0000000000..d515e1b44d --- /dev/null +++ b/test_cases/avm_12/out_O2/Contract.approval.teal @@ -0,0 +1,44 @@ +#pragma version 12 +#pragma typetrack false + +// algopy.arc4.ARC4Contract.approval_program() -> uint64: +main: + txn NumAppArgs + bz main_bare_routing@6 + pushbytes 0xc2b8dd8a // method "test_new_ops()void" + txna ApplicationArgs 0 + match main_test_new_ops_route@3 + +main_after_if_else@10: + pushint 0 // 0 + return + +main_test_new_ops_route@3: + txn OnCompletion + ! + assert // OnCompletion is not NoOp + txn ApplicationID + assert // can only call when not creating + pushint 1793 // 1793 + bzero + pushbytes 0x + dup + uncover 2 + falcon_verify + ! + assert + pushbytes 0x + sumhash512 + len + assert + pushint 1 // 1 + return + +main_bare_routing@6: + txn OnCompletion + bnz main_after_if_else@10 + txn ApplicationID + ! + assert // can only call when creating + pushint 1 // 1 + return diff --git a/test_cases/avm_12/out_O2/Contract.clear.puya.map b/test_cases/avm_12/out_O2/Contract.clear.puya.map new file mode 100644 index 0000000000..7e7f2c0d56 --- /dev/null +++ b/test_cases/avm_12/out_O2/Contract.clear.puya.map @@ -0,0 +1,25 @@ +{ + "version": 3, + "sources": [], + "mappings": ";;;", + "op_pc_offset": 0, + "pc_events": { + "1": { + "subroutine": "algopy.arc4.ARC4Contract.clear_state_program", + "params": {}, + "block": "main", + "stack_in": [], + "op": "pushint 1 // 1", + "defined_out": [ + "1" + ], + "stack_out": [ + "1" + ] + }, + "3": { + "op": "return", + "stack_out": [] + } + } +} \ No newline at end of file diff --git a/test_cases/avm_12/out_O2/Contract.clear.teal b/test_cases/avm_12/out_O2/Contract.clear.teal new file mode 100644 index 0000000000..e5edc31e82 --- /dev/null +++ b/test_cases/avm_12/out_O2/Contract.clear.teal @@ -0,0 +1,7 @@ +#pragma version 12 +#pragma typetrack false + +// algopy.arc4.ARC4Contract.clear_state_program() -> uint64: +main: + pushint 1 // 1 + return diff --git a/test_cases/avm_12/out_O2/Contract.ir/Contract.approval.0.destructured.ir b/test_cases/avm_12/out_O2/Contract.ir/Contract.approval.0.destructured.ir new file mode 100644 index 0000000000..f878dbd693 --- /dev/null +++ b/test_cases/avm_12/out_O2/Contract.ir/Contract.approval.0.destructured.ir @@ -0,0 +1,39 @@ +main algopy.arc4.ARC4Contract.approval_program: + block@0: // L1 + let tmp%0#1: uint64 = (txn NumAppArgs) + goto tmp%0#1 ? block@2 : block@6 + block@2: // abi_routing_L9 + let tmp%2#0: bytes = (txna ApplicationArgs 0) + switch tmp%2#0 {method "test_new_ops()void" => block@3, * => block@10} + block@3: // test_new_ops_route_L10 + let tmp%3#0: uint64 = (txn OnCompletion) + let tmp%4#0: bool = (! tmp%3#0) + (assert tmp%4#0) // OnCompletion is not NoOp + let tmp%5#0: uint64 = (txn ApplicationID) + (assert tmp%5#0) // can only call when not creating + let tmp%0#2: bytes = (bzero 1793u) + let tmp%1#0: bool = (falcon_verify 0x 0x tmp%0#2) + let tmp%2#1: bool = (! tmp%1#0) + (assert tmp%2#1) + let tmp%3#1: bytes = (sumhash512 0x) + let tmp%4#1: uint64 = (len tmp%3#1) + (assert tmp%4#1) + let test_cases.avm_12.contract.Contract.__puya_arc4_router__%0#0: bool = 1u + let tmp%0#0: bool = test_cases.avm_12.contract.Contract.__puya_arc4_router__%0#0 + goto block@11 + block@6: // bare_routing_L9 + let tmp%7#0: uint64 = (txn OnCompletion) + goto tmp%7#0 ? block@10 : block@7 + block@7: // __algopy_default_create_L1 + let tmp%8#0: uint64 = (txn ApplicationID) + let tmp%9#0: bool = (! tmp%8#0) + (assert tmp%9#0) // can only call when creating + let test_cases.avm_12.contract.Contract.__puya_arc4_router__%0#0: bool = 1u + let tmp%0#0: bool = test_cases.avm_12.contract.Contract.__puya_arc4_router__%0#0 + goto block@11 + block@10: // after_if_else_L9 + let test_cases.avm_12.contract.Contract.__puya_arc4_router__%0#0: bool = 0u + let tmp%0#0: bool = test_cases.avm_12.contract.Contract.__puya_arc4_router__%0#0 + goto block@11 + block@11: // after_inlined_test_cases.avm_12.contract.Contract.__puya_arc4_router___L1 + return tmp%0#0 \ No newline at end of file diff --git a/test_cases/avm_12/out_O2/Contract.ir/Contract.clear.0.destructured.ir b/test_cases/avm_12/out_O2/Contract.ir/Contract.clear.0.destructured.ir new file mode 100644 index 0000000000..b19ab730e7 --- /dev/null +++ b/test_cases/avm_12/out_O2/Contract.ir/Contract.clear.0.destructured.ir @@ -0,0 +1,3 @@ +main algopy.arc4.ARC4Contract.clear_state_program: + block@0: // L1 + return 1u \ No newline at end of file diff --git a/test_cases/avm_11/out_O2/avm_11_sig.ir/avm_11_sig.0.destructured.ir b/test_cases/avm_12/out_O2/avm_12_sig.ir/avm_12_sig.0.destructured.ir similarity index 74% rename from test_cases/avm_11/out_O2/avm_11_sig.ir/avm_11_sig.0.destructured.ir rename to test_cases/avm_12/out_O2/avm_12_sig.ir/avm_12_sig.0.destructured.ir index f901c190dd..6290078e94 100644 --- a/test_cases/avm_11/out_O2/avm_11_sig.ir/avm_11_sig.0.destructured.ir +++ b/test_cases/avm_12/out_O2/avm_12_sig.ir/avm_12_sig.0.destructured.ir @@ -1,4 +1,4 @@ -main test_cases.avm_11.contract.avm_11_sig: +main test_cases.avm_12.contract.avm_12_sig: block@0: // L4 let tmp%0#0: bytes = (sumhash512 0x) let tmp%1#0: uint64 = (len tmp%0#0) diff --git a/test_cases/avm_11/out_O2/avm_11_sig.puya.map b/test_cases/avm_12/out_O2/avm_12_sig.puya.map similarity index 91% rename from test_cases/avm_11/out_O2/avm_11_sig.puya.map rename to test_cases/avm_12/out_O2/avm_12_sig.puya.map index 8a6da138b8..9486ffe460 100644 --- a/test_cases/avm_11/out_O2/avm_11_sig.puya.map +++ b/test_cases/avm_12/out_O2/avm_12_sig.puya.map @@ -7,7 +7,7 @@ "op_pc_offset": 0, "pc_events": { "1": { - "subroutine": "test_cases.avm_11.contract.avm_11_sig", + "subroutine": "test_cases.avm_12.contract.avm_12_sig", "params": {}, "block": "main", "stack_in": [], diff --git a/test_cases/avm_11/out_O2/avm_11_sig.teal b/test_cases/avm_12/out_O2/avm_12_sig.teal similarity index 52% rename from test_cases/avm_11/out_O2/avm_11_sig.teal rename to test_cases/avm_12/out_O2/avm_12_sig.teal index da00cf7de5..8edb41967b 100644 --- a/test_cases/avm_11/out_O2/avm_11_sig.teal +++ b/test_cases/avm_12/out_O2/avm_12_sig.teal @@ -1,7 +1,7 @@ -#pragma version 11 +#pragma version 12 #pragma typetrack false -// test_cases.avm_11.contract.avm_11_sig() -> uint64: +// test_cases.avm_12.contract.avm_12_sig() -> uint64: main: pushbytes 0x sumhash512 diff --git a/test_cases/avm_12/out_unoptimized/Contract.approval.puya.map b/test_cases/avm_12/out_unoptimized/Contract.approval.puya.map new file mode 100644 index 0000000000..16814f05bc --- /dev/null +++ b/test_cases/avm_12/out_unoptimized/Contract.approval.puya.map @@ -0,0 +1,405 @@ +{ + "version": 3, + "sources": [ + "../contract.py" + ], + "mappings": ";;;;;AAQA;;AAAA;AAAA;AAAA;;;AAAA;;;AAAA;;;;;;AAAA;AAAA;;;;AAAA;;AACK;;AAAA;AAAA;AAAA;AAAA;;AAAA;AAAA;AAAA;AAAA;;;AAAA;;;;AADL;;AAAA;AAAA;AAAA;;;;;;;;;;;;;;;;AACA;;;AAGuD;;;AAAT;AAAV;;AAAK;AAAtB;;AAAA;AAAJ;AAAP;AACqB;;AAAd;AAAA;AAAA;AAAA;AAAP;", + "op_pc_offset": 0, + "pc_events": { + "1": { + "subroutine": "algopy.arc4.ARC4Contract.approval_program", + "params": {}, + "block": "main", + "stack_in": [], + "op": "intcblock 0 1" + }, + "5": { + "block": "main_block@1", + "stack_in": [], + "op": "txn NumAppArgs", + "defined_out": [ + "tmp%0#1" + ], + "stack_out": [ + "tmp%0#1" + ] + }, + "7": { + "op": "intc_0 // 0", + "defined_out": [ + "0", + "tmp%0#1" + ], + "stack_out": [ + "tmp%0#1", + "0" + ] + }, + "8": { + "op": "!=", + "defined_out": [ + "tmp%1#0" + ], + "stack_out": [ + "tmp%1#0" + ] + }, + "9": { + "op": "bz main_bare_routing@6", + "stack_out": [] + }, + "12": { + "block": "main_abi_routing@2", + "stack_in": [], + "op": "txna ApplicationArgs 0", + "defined_out": [ + "tmp%2#0" + ], + "stack_out": [ + "tmp%2#0" + ] + }, + "15": { + "op": "pushbytes 0xc2b8dd8a // method \"test_new_ops()void\"", + "defined_out": [ + "Method(test_new_ops()void)", + "tmp%2#0" + ], + "stack_out": [ + "tmp%2#0", + "Method(test_new_ops()void)" + ] + }, + "21": { + "op": "swap", + "stack_out": [ + "Method(test_new_ops()void)", + "tmp%2#0" + ] + }, + "22": { + "op": "match main_test_new_ops_route@3", + "stack_out": [] + }, + "26": { + "block": "main_after_if_else@10", + "stack_in": [], + "op": "intc_0 // 0", + "defined_out": [ + "tmp%0#0" + ], + "stack_out": [ + "tmp%0#0" + ] + }, + "27": { + "block": "main_after_inlined_test_cases.avm_12.contract.Contract.__puya_arc4_router__@11", + "stack_in": [ + "tmp%0#0" + ], + "op": "return", + "defined_out": [], + "stack_out": [] + }, + "28": { + "block": "main_test_new_ops_route@3", + "stack_in": [], + "op": "txn OnCompletion", + "defined_out": [ + "tmp%3#0" + ], + "stack_out": [ + "tmp%3#0" + ] + }, + "30": { + "op": "intc_0 // NoOp", + "defined_out": [ + "NoOp", + "tmp%3#0" + ], + "stack_out": [ + "tmp%3#0", + "NoOp" + ] + }, + "31": { + "op": "==", + "defined_out": [ + "tmp%4#0" + ], + "stack_out": [ + "tmp%4#0" + ] + }, + "32": { + "error": "OnCompletion is not NoOp", + "op": "assert // OnCompletion is not NoOp", + "stack_out": [] + }, + "33": { + "op": "txn ApplicationID", + "defined_out": [ + "tmp%5#0" + ], + "stack_out": [ + "tmp%5#0" + ] + }, + "35": { + "op": "intc_0 // 0", + "defined_out": [ + "0", + "tmp%5#0" + ], + "stack_out": [ + "tmp%5#0", + "0" + ] + }, + "36": { + "op": "!=", + "defined_out": [ + "tmp%6#0" + ], + "stack_out": [ + "tmp%6#0" + ] + }, + "37": { + "error": "can only call when not creating", + "op": "assert // can only call when not creating", + "stack_out": [] + }, + "38": { + "callsub": "test_cases.avm_12.contract.Contract.test_new_ops", + "op": "callsub test_new_ops" + }, + "41": { + "op": "intc_1 // 1", + "defined_out": [ + "tmp%0#0" + ], + "stack_out": [ + "tmp%0#0" + ] + }, + "42": { + "op": "b main_after_inlined_test_cases.avm_12.contract.Contract.__puya_arc4_router__@11" + }, + "45": { + "block": "main_bare_routing@6", + "stack_in": [], + "op": "txn OnCompletion", + "defined_out": [ + "tmp%7#0" + ], + "stack_out": [ + "tmp%7#0" + ] + }, + "47": { + "op": "intc_0 // 0", + "defined_out": [ + "0", + "tmp%7#0" + ], + "stack_out": [ + "tmp%7#0", + "0" + ] + }, + "48": { + "op": "swap", + "stack_out": [ + "0", + "tmp%7#0" + ] + }, + "49": { + "op": "match main___algopy_default_create@7", + "stack_out": [] + }, + "53": { + "block": "main_switch_case_next@9", + "stack_in": [], + "op": "b main_after_if_else@10" + }, + "56": { + "block": "main___algopy_default_create@7", + "stack_in": [], + "op": "txn ApplicationID", + "defined_out": [ + "tmp%8#0" + ], + "stack_out": [ + "tmp%8#0" + ] + }, + "58": { + "op": "intc_0 // 0", + "defined_out": [ + "0", + "tmp%8#0" + ], + "stack_out": [ + "tmp%8#0", + "0" + ] + }, + "59": { + "op": "==", + "defined_out": [ + "tmp%9#0" + ], + "stack_out": [ + "tmp%9#0" + ] + }, + "60": { + "error": "can only call when creating", + "op": "assert // can only call when creating", + "stack_out": [] + }, + "61": { + "block": "main_after_inlined_test_cases.avm_12.contract.Contract.__algopy_default_create@13", + "stack_in": [], + "op": "intc_1 // 1", + "defined_out": [ + "tmp%0#0" + ], + "stack_out": [ + "tmp%0#0" + ] + }, + "62": { + "op": "b main_after_inlined_test_cases.avm_12.contract.Contract.__puya_arc4_router__@11" + }, + "65": { + "subroutine": "test_cases.avm_12.contract.Contract.test_new_ops", + "params": {}, + "block": "test_new_ops", + "stack_in": [], + "op": "proto 0 0" + }, + "68": { + "op": "pushint 1793 // 1793", + "defined_out": [ + "1793" + ], + "stack_out": [ + "1793" + ] + }, + "71": { + "op": "bzero", + "defined_out": [ + "tmp%0#0" + ], + "stack_out": [ + "tmp%0#0" + ] + }, + "72": { + "op": "pushbytes 0x", + "defined_out": [ + "0x", + "tmp%0#0" + ], + "stack_out": [ + "tmp%0#0", + "0x" + ] + }, + "74": { + "op": "dup", + "stack_out": [ + "tmp%0#0", + "0x", + "0x" + ] + }, + "75": { + "op": "uncover 2", + "stack_out": [ + "0x", + "0x", + "tmp%0#0" + ] + }, + "77": { + "op": "falcon_verify", + "defined_out": [ + "tmp%1#0" + ], + "stack_out": [ + "tmp%1#0" + ] + }, + "78": { + "op": "!", + "defined_out": [ + "tmp%2#0" + ], + "stack_out": [ + "tmp%2#0" + ] + }, + "79": { + "op": "assert", + "stack_out": [] + }, + "80": { + "op": "pushbytes 0x", + "stack_out": [ + "0x" + ] + }, + "82": { + "op": "sumhash512", + "defined_out": [ + "tmp%3#0" + ], + "stack_out": [ + "tmp%3#0" + ] + }, + "83": { + "op": "len", + "defined_out": [ + "tmp%4#0" + ], + "stack_out": [ + "tmp%4#0" + ] + }, + "84": { + "op": "intc_0 // 0", + "defined_out": [ + "0", + "tmp%4#0" + ], + "stack_out": [ + "tmp%4#0", + "0" + ] + }, + "85": { + "op": "!=", + "defined_out": [ + "tmp%5#0" + ], + "stack_out": [ + "tmp%5#0" + ] + }, + "86": { + "op": "assert", + "stack_out": [] + }, + "87": { + "retsub": true, + "op": "retsub" + } + } +} \ No newline at end of file diff --git a/test_cases/avm_12/out_unoptimized/Contract.approval.teal b/test_cases/avm_12/out_unoptimized/Contract.approval.teal new file mode 100644 index 0000000000..eb0d324957 --- /dev/null +++ b/test_cases/avm_12/out_unoptimized/Contract.approval.teal @@ -0,0 +1,102 @@ +#pragma version 12 +#pragma typetrack false + +// algopy.arc4.ARC4Contract.approval_program() -> uint64: +main: + intcblock 0 1 + +main_block@1: + // avm_12/contract.py:9 + // class Contract(ARC4Contract, avm_version=12): + txn NumAppArgs + intc_0 // 0 + != + bz main_bare_routing@6 + +main_abi_routing@2: + // avm_12/contract.py:9 + // class Contract(ARC4Contract, avm_version=12): + txna ApplicationArgs 0 + pushbytes 0xc2b8dd8a // method "test_new_ops()void" + swap + match main_test_new_ops_route@3 + +main_switch_case_default@4: + +main_switch_case_next@5: + +main_after_if_else@10: + // avm_12/contract.py:9 + // class Contract(ARC4Contract, avm_version=12): + intc_0 // 0 + +main_after_inlined_test_cases.avm_12.contract.Contract.__puya_arc4_router__@11: + return + +main_test_new_ops_route@3: + // avm_12/contract.py:10 + // @arc4.abimethod + txn OnCompletion + intc_0 // NoOp + == + assert // OnCompletion is not NoOp + txn ApplicationID + intc_0 // 0 + != + assert // can only call when not creating + callsub test_new_ops + intc_1 // 1 + b main_after_inlined_test_cases.avm_12.contract.Contract.__puya_arc4_router__@11 + +main_bare_routing@6: + // avm_12/contract.py:9 + // class Contract(ARC4Contract, avm_version=12): + txn OnCompletion + intc_0 // 0 + swap + match main___algopy_default_create@7 + +main_switch_case_default@8: + +main_switch_case_next@9: + b main_after_if_else@10 + +main___algopy_default_create@7: + txn ApplicationID + intc_0 // 0 + == + assert // can only call when creating + +main_block@12: + +main_after_inlined_test_cases.avm_12.contract.Contract.__algopy_default_create@13: + intc_1 // 1 + b main_after_inlined_test_cases.avm_12.contract.Contract.__puya_arc4_router__@11 + + +// test_cases.avm_12.contract.Contract.test_new_ops() -> void: +test_new_ops: + // avm_12/contract.py:10-11 + // @arc4.abimethod + // def test_new_ops(self) -> None: + proto 0 0 + // avm_12/contract.py:12-13 + // # op functions + // assert not op.falcon_verify(b"", b"", op.bzero(1793)) + pushint 1793 // 1793 + bzero + pushbytes 0x + dup + uncover 2 + falcon_verify + ! + assert + // avm_12/contract.py:14 + // assert op.sumhash512(b"") + pushbytes 0x + sumhash512 + len + intc_0 // 0 + != + assert + retsub diff --git a/test_cases/avm_12/out_unoptimized/Contract.clear.puya.map b/test_cases/avm_12/out_unoptimized/Contract.clear.puya.map new file mode 100644 index 0000000000..7e7f2c0d56 --- /dev/null +++ b/test_cases/avm_12/out_unoptimized/Contract.clear.puya.map @@ -0,0 +1,25 @@ +{ + "version": 3, + "sources": [], + "mappings": ";;;", + "op_pc_offset": 0, + "pc_events": { + "1": { + "subroutine": "algopy.arc4.ARC4Contract.clear_state_program", + "params": {}, + "block": "main", + "stack_in": [], + "op": "pushint 1 // 1", + "defined_out": [ + "1" + ], + "stack_out": [ + "1" + ] + }, + "3": { + "op": "return", + "stack_out": [] + } + } +} \ No newline at end of file diff --git a/test_cases/avm_12/out_unoptimized/Contract.clear.teal b/test_cases/avm_12/out_unoptimized/Contract.clear.teal new file mode 100644 index 0000000000..e5edc31e82 --- /dev/null +++ b/test_cases/avm_12/out_unoptimized/Contract.clear.teal @@ -0,0 +1,7 @@ +#pragma version 12 +#pragma typetrack false + +// algopy.arc4.ARC4Contract.clear_state_program() -> uint64: +main: + pushint 1 // 1 + return diff --git a/test_cases/avm_12/out_unoptimized/Contract.ir/Contract.approval.0.destructured.ir b/test_cases/avm_12/out_unoptimized/Contract.ir/Contract.approval.0.destructured.ir new file mode 100644 index 0000000000..2340ab83de --- /dev/null +++ b/test_cases/avm_12/out_unoptimized/Contract.ir/Contract.approval.0.destructured.ir @@ -0,0 +1,61 @@ +main algopy.arc4.ARC4Contract.approval_program: + block@0: // L1 + goto block@1 + block@1: // L9 + let tmp%0#1: uint64 = (txn NumAppArgs) + let tmp%1#0: bool = (!= tmp%0#1 0u) + goto tmp%1#0 ? block@2 : block@6 + block@2: // abi_routing_L9 + let tmp%2#0: bytes = (txna ApplicationArgs 0) + switch tmp%2#0 {method "test_new_ops()void" => block@3, * => block@4} + block@3: // test_new_ops_route_L10 + let tmp%3#0: uint64 = (txn OnCompletion) + let tmp%4#0: bool = (== tmp%3#0 NoOp) + (assert tmp%4#0) // OnCompletion is not NoOp + let tmp%5#0: uint64 = (txn ApplicationID) + let tmp%6#0: bool = (!= tmp%5#0 0u) + (assert tmp%6#0) // can only call when not creating + test_cases.avm_12.contract.Contract.test_new_ops() + let test_cases.avm_12.contract.Contract.__puya_arc4_router__%0#0: bool = 1u + let tmp%0#0: bool = test_cases.avm_12.contract.Contract.__puya_arc4_router__%0#0 + goto block@11 + block@4: // switch_case_default_L9 + goto block@5 + block@5: // switch_case_next_L9 + goto block@10 + block@6: // bare_routing_L9 + let tmp%7#0: uint64 = (txn OnCompletion) + switch tmp%7#0 {0u => block@7, * => block@8} + block@7: // __algopy_default_create_L1 + let tmp%8#0: uint64 = (txn ApplicationID) + let tmp%9#0: bool = (== tmp%8#0 0u) + (assert tmp%9#0) // can only call when creating + goto block@12 + block@12: // L1 + goto block@13 + block@13: // after_inlined_test_cases.avm_12.contract.Contract.__algopy_default_create_L1 + let test_cases.avm_12.contract.Contract.__puya_arc4_router__%0#0: bool = 1u + let tmp%0#0: bool = test_cases.avm_12.contract.Contract.__puya_arc4_router__%0#0 + goto block@11 + block@8: // switch_case_default_L9 + goto block@9 + block@9: // switch_case_next_L9 + goto block@10 + block@10: // after_if_else_L9 + let test_cases.avm_12.contract.Contract.__puya_arc4_router__%0#0: bool = 0u + let tmp%0#0: bool = test_cases.avm_12.contract.Contract.__puya_arc4_router__%0#0 + goto block@11 + block@11: // after_inlined_test_cases.avm_12.contract.Contract.__puya_arc4_router___L1 + return tmp%0#0 + +subroutine test_cases.avm_12.contract.Contract.test_new_ops() -> void: + block@0: // L10 + let tmp%0#0: bytes = (bzero 1793u) + let tmp%1#0: bool = (falcon_verify 0x 0x tmp%0#0) + let tmp%2#0: bool = (! tmp%1#0) + (assert tmp%2#0) + let tmp%3#0: bytes = (sumhash512 0x) + let tmp%4#0: uint64 = (len tmp%3#0) + let tmp%5#0: bool = (!= tmp%4#0 0u) + (assert tmp%5#0) + return \ No newline at end of file diff --git a/test_cases/avm_12/out_unoptimized/Contract.ir/Contract.clear.0.destructured.ir b/test_cases/avm_12/out_unoptimized/Contract.ir/Contract.clear.0.destructured.ir new file mode 100644 index 0000000000..b19ab730e7 --- /dev/null +++ b/test_cases/avm_12/out_unoptimized/Contract.ir/Contract.clear.0.destructured.ir @@ -0,0 +1,3 @@ +main algopy.arc4.ARC4Contract.clear_state_program: + block@0: // L1 + return 1u \ No newline at end of file diff --git a/test_cases/avm_11/out_unoptimized/avm_11_sig.ir/avm_11_sig.0.destructured.ir b/test_cases/avm_12/out_unoptimized/avm_12_sig.ir/avm_12_sig.0.destructured.ir similarity index 74% rename from test_cases/avm_11/out_unoptimized/avm_11_sig.ir/avm_11_sig.0.destructured.ir rename to test_cases/avm_12/out_unoptimized/avm_12_sig.ir/avm_12_sig.0.destructured.ir index f901c190dd..6290078e94 100644 --- a/test_cases/avm_11/out_unoptimized/avm_11_sig.ir/avm_11_sig.0.destructured.ir +++ b/test_cases/avm_12/out_unoptimized/avm_12_sig.ir/avm_12_sig.0.destructured.ir @@ -1,4 +1,4 @@ -main test_cases.avm_11.contract.avm_11_sig: +main test_cases.avm_12.contract.avm_12_sig: block@0: // L4 let tmp%0#0: bytes = (sumhash512 0x) let tmp%1#0: uint64 = (len tmp%0#0) diff --git a/test_cases/avm_11/out_unoptimized/avm_11_sig.puya.map b/test_cases/avm_12/out_unoptimized/avm_12_sig.puya.map similarity index 91% rename from test_cases/avm_11/out_unoptimized/avm_11_sig.puya.map rename to test_cases/avm_12/out_unoptimized/avm_12_sig.puya.map index 8a6da138b8..9486ffe460 100644 --- a/test_cases/avm_11/out_unoptimized/avm_11_sig.puya.map +++ b/test_cases/avm_12/out_unoptimized/avm_12_sig.puya.map @@ -7,7 +7,7 @@ "op_pc_offset": 0, "pc_events": { "1": { - "subroutine": "test_cases.avm_11.contract.avm_11_sig", + "subroutine": "test_cases.avm_12.contract.avm_12_sig", "params": {}, "block": "main", "stack_in": [], diff --git a/test_cases/avm_11/out_unoptimized/avm_11_sig.teal b/test_cases/avm_12/out_unoptimized/avm_12_sig.teal similarity index 54% rename from test_cases/avm_11/out_unoptimized/avm_11_sig.teal rename to test_cases/avm_12/out_unoptimized/avm_12_sig.teal index 6c9916b804..6b218aae88 100644 --- a/test_cases/avm_11/out_unoptimized/avm_11_sig.teal +++ b/test_cases/avm_12/out_unoptimized/avm_12_sig.teal @@ -1,9 +1,9 @@ -#pragma version 11 +#pragma version 12 #pragma typetrack false -// test_cases.avm_11.contract.avm_11_sig() -> uint64: +// test_cases.avm_12.contract.avm_12_sig() -> uint64: main: - // avm_11/contract.py:6 + // avm_12/contract.py:6 // return op.sumhash512(b"").length pushbytes 0x sumhash512 diff --git a/test_cases/avm_12/puya.log b/test_cases/avm_12/puya.log new file mode 100644 index 0000000000..91ff1c2657 --- /dev/null +++ b/test_cases/avm_12/puya.log @@ -0,0 +1,769 @@ +debug: PuyaPyOptions(output_teal=True, output_source_map=True, output_arc32=True, output_arc56=True, output_ssa_ir=True, output_optimization_ir=True, output_destructured_ir=True, output_memory_ir=True, output_bytecode=True, debug_level=1, optimization_level=1, target_avm_version=10, cli_template_definitions={}, template_vars_prefix='TMPL_', locals_coalescing_strategy=, paths=['avm_12'], output_awst=True, output_awst_json=False, output_client=True, log_level=) +info: Found python prefix: /.venv +info: writing avm_12/out/module.awst +debug: Building IR for function _puya_lib.util.ensure_budget +debug: Sealing block@0 +debug: Terminated block@0 +debug: Looking for 'required_budget_with_buffer' in an unsealed block creating an incomplete Phi: block@1 +debug: Created Phi assignment: let required_budget_with_buffer#1: uint64 = undefined while trying to resolve 'required_budget_with_buffer' in block@1 +debug: Terminated block@1 +debug: Sealing block@2 +debug: Looking for 'fee_source' in an unsealed block creating an incomplete Phi: block@1 +debug: Created Phi assignment: let fee_source#1: uint64 = undefined while trying to resolve 'fee_source' in block@1 +debug: Terminated block@2 +debug: Sealing block@3 +debug: Terminated block@3 +debug: Sealing block@4 +debug: Terminated block@4 +debug: Sealing block@5 +debug: Terminated block@5 +debug: Sealing block@6 +debug: Terminated block@6 +debug: Sealing block@1 +debug: Added required_budget_with_buffer#0 to Phi node: let required_budget_with_buffer#1: uint64 = φ(required_budget_with_buffer#0 <- block@0) in block@0 +debug: Created Phi assignment: let required_budget_with_buffer#2: uint64 = undefined while trying to resolve 'required_budget_with_buffer' in block@6 +debug: Added required_budget_with_buffer#1 to Phi node: let required_budget_with_buffer#2: uint64 = φ(required_budget_with_buffer#1 <- block@3) in block@3 +debug: Added required_budget_with_buffer#1 to Phi node: let required_budget_with_buffer#2: uint64 = φ(required_budget_with_buffer#1 <- block@3, required_budget_with_buffer#1 <- block@4) in block@4 +debug: Added required_budget_with_buffer#1 to Phi node: let required_budget_with_buffer#2: uint64 = φ(required_budget_with_buffer#1 <- block@3, required_budget_with_buffer#1 <- block@4, required_budget_with_buffer#1 <- block@5) in block@5 +debug: Replacing trivial Phi node: let required_budget_with_buffer#2: uint64 = φ(required_budget_with_buffer#1 <- block@3, required_budget_with_buffer#1 <- block@4, required_budget_with_buffer#1 <- block@5) (required_budget_with_buffer#2) with required_budget_with_buffer#1 +debug: Deleting Phi assignment: let required_budget_with_buffer#2: uint64 = φ(required_budget_with_buffer#1 <- block@3, required_budget_with_buffer#1 <- block@4, required_budget_with_buffer#1 <- block@5) +debug: Replaced trivial Phi node: let required_budget_with_buffer#2: uint64 = φ(required_budget_with_buffer#1 <- block@3, required_budget_with_buffer#1 <- block@4, required_budget_with_buffer#1 <- block@5) (required_budget_with_buffer#2) with required_budget_with_buffer#1 in current definition for 1 blocks +debug: Added required_budget_with_buffer#1 to Phi node: let required_budget_with_buffer#1: uint64 = φ(required_budget_with_buffer#0 <- block@0, required_budget_with_buffer#1 <- block@6) in block@6 +debug: Replacing trivial Phi node: let required_budget_with_buffer#1: uint64 = φ(required_budget_with_buffer#0 <- block@0, required_budget_with_buffer#1 <- block@6) (required_budget_with_buffer#1) with required_budget_with_buffer#0 +debug: Deleting Phi assignment: let required_budget_with_buffer#1: uint64 = φ(required_budget_with_buffer#0 <- block@0, required_budget_with_buffer#1 <- block@6) +debug: Replaced trivial Phi node: let required_budget_with_buffer#1: uint64 = φ(required_budget_with_buffer#0 <- block@0, required_budget_with_buffer#1 <- block@6) (required_budget_with_buffer#1) with required_budget_with_buffer#0 in current definition for 6 blocks +debug: Added fee_source#0 to Phi node: let fee_source#1: uint64 = φ(fee_source#0 <- block@0) in block@0 +debug: Created Phi assignment: let fee_source#2: uint64 = undefined while trying to resolve 'fee_source' in block@6 +debug: Added fee_source#1 to Phi node: let fee_source#2: uint64 = φ(fee_source#1 <- block@3) in block@3 +debug: Added fee_source#1 to Phi node: let fee_source#2: uint64 = φ(fee_source#1 <- block@3, fee_source#1 <- block@4) in block@4 +debug: Added fee_source#1 to Phi node: let fee_source#2: uint64 = φ(fee_source#1 <- block@3, fee_source#1 <- block@4, fee_source#1 <- block@5) in block@5 +debug: Replacing trivial Phi node: let fee_source#2: uint64 = φ(fee_source#1 <- block@3, fee_source#1 <- block@4, fee_source#1 <- block@5) (fee_source#2) with fee_source#1 +debug: Deleting Phi assignment: let fee_source#2: uint64 = φ(fee_source#1 <- block@3, fee_source#1 <- block@4, fee_source#1 <- block@5) +debug: Replaced trivial Phi node: let fee_source#2: uint64 = φ(fee_source#1 <- block@3, fee_source#1 <- block@4, fee_source#1 <- block@5) (fee_source#2) with fee_source#1 in current definition for 1 blocks +debug: Added fee_source#1 to Phi node: let fee_source#1: uint64 = φ(fee_source#0 <- block@0, fee_source#1 <- block@6) in block@6 +debug: Replacing trivial Phi node: let fee_source#1: uint64 = φ(fee_source#0 <- block@0, fee_source#1 <- block@6) (fee_source#1) with fee_source#0 +debug: Deleting Phi assignment: let fee_source#1: uint64 = φ(fee_source#0 <- block@0, fee_source#1 <- block@6) +debug: Replaced trivial Phi node: let fee_source#1: uint64 = φ(fee_source#0 <- block@0, fee_source#1 <- block@6) (fee_source#1) with fee_source#0 in current definition for 6 blocks +debug: Sealing block@7 +debug: Terminated block@7 +debug: Building IR for function _puya_lib.bytes_.is_substring +debug: Sealing block@0 +debug: Terminated block@0 +debug: Looking for 'start' in an unsealed block creating an incomplete Phi: block@1 +debug: Created Phi assignment: let start#1: uint64 = undefined while trying to resolve 'start' in block@1 +debug: Looking for 'item' in an unsealed block creating an incomplete Phi: block@1 +debug: Created Phi assignment: let item#1: bytes = undefined while trying to resolve 'item' in block@1 +debug: Looking for 'sequence' in an unsealed block creating an incomplete Phi: block@1 +debug: Created Phi assignment: let sequence#1: bytes = undefined while trying to resolve 'sequence' in block@1 +debug: Terminated block@1 +debug: Sealing block@2 +debug: Terminated block@2 +debug: Sealing block@3 +debug: Terminated block@3 +debug: Sealing block@4 +debug: Terminated block@4 +debug: Sealing block@1 +debug: Added start#0 to Phi node: let start#1: uint64 = φ(start#0 <- block@0) in block@0 +debug: Added start#2 to Phi node: let start#1: uint64 = φ(start#0 <- block@0, start#2 <- block@4) in block@4 +debug: Added item#0 to Phi node: let item#1: bytes = φ(item#0 <- block@0) in block@0 +debug: Added item#1 to Phi node: let item#1: bytes = φ(item#0 <- block@0, item#1 <- block@4) in block@4 +debug: Replacing trivial Phi node: let item#1: bytes = φ(item#0 <- block@0, item#1 <- block@4) (item#1) with item#0 +debug: Deleting Phi assignment: let item#1: bytes = φ(item#0 <- block@0, item#1 <- block@4) +debug: Replaced trivial Phi node: let item#1: bytes = φ(item#0 <- block@0, item#1 <- block@4) (item#1) with item#0 in current definition for 3 blocks +debug: Added sequence#0 to Phi node: let sequence#1: bytes = φ(sequence#0 <- block@0) in block@0 +debug: Added sequence#1 to Phi node: let sequence#1: bytes = φ(sequence#0 <- block@0, sequence#1 <- block@4) in block@4 +debug: Replacing trivial Phi node: let sequence#1: bytes = φ(sequence#0 <- block@0, sequence#1 <- block@4) (sequence#1) with sequence#0 +debug: Deleting Phi assignment: let sequence#1: bytes = φ(sequence#0 <- block@0, sequence#1 <- block@4) +debug: Replaced trivial Phi node: let sequence#1: bytes = φ(sequence#0 <- block@0, sequence#1 <- block@4) (sequence#1) with sequence#0 in current definition for 3 blocks +debug: Sealing block@5 +debug: Terminated block@5 +debug: Building IR for function _puya_lib.arc4.dynamic_array_pop_bit +debug: Sealing block@0 +debug: Terminated block@0 +debug: Building IR for function _puya_lib.arc4.dynamic_array_pop_fixed_size +debug: Sealing block@0 +debug: Terminated block@0 +debug: Building IR for function _puya_lib.arc4.dynamic_array_pop_byte_length_head +debug: Sealing block@0 +debug: Terminated block@0 +debug: Building IR for function _puya_lib.arc4.dynamic_array_pop_dynamic_element +debug: Sealing block@0 +debug: Terminated block@0 +debug: Looking for 'head_offset' in an unsealed block creating an incomplete Phi: block@1 +debug: Created Phi assignment: let head_offset#1: uint64 = undefined while trying to resolve 'head_offset' in block@1 +debug: Terminated block@1 +debug: Sealing block@2 +debug: Looking for 'head_and_tail' in an unsealed block creating an incomplete Phi: block@1 +debug: Created Phi assignment: let head_and_tail#1: bytes = undefined while trying to resolve 'head_and_tail' in block@1 +debug: Looking for 'new_head' in an unsealed block creating an incomplete Phi: block@1 +debug: Created Phi assignment: let new_head#1: bytes = undefined while trying to resolve 'new_head' in block@1 +debug: Terminated block@2 +debug: Sealing block@3 +debug: Terminated block@3 +debug: Sealing block@1 +debug: Added head_offset#0 to Phi node: let head_offset#1: uint64 = φ(head_offset#0 <- block@0) in block@0 +debug: Added head_offset#2 to Phi node: let head_offset#1: uint64 = φ(head_offset#0 <- block@0, head_offset#2 <- block@3) in block@3 +debug: Added head_and_tail#0 to Phi node: let head_and_tail#1: bytes = φ(head_and_tail#0 <- block@0) in block@0 +debug: Added head_and_tail#1 to Phi node: let head_and_tail#1: bytes = φ(head_and_tail#0 <- block@0, head_and_tail#1 <- block@3) in block@3 +debug: Replacing trivial Phi node: let head_and_tail#1: bytes = φ(head_and_tail#0 <- block@0, head_and_tail#1 <- block@3) (head_and_tail#1) with head_and_tail#0 +debug: Deleting Phi assignment: let head_and_tail#1: bytes = φ(head_and_tail#0 <- block@0, head_and_tail#1 <- block@3) +debug: Replaced trivial Phi node: let head_and_tail#1: bytes = φ(head_and_tail#0 <- block@0, head_and_tail#1 <- block@3) (head_and_tail#1) with head_and_tail#0 in current definition for 3 blocks +debug: Added new_head#0 to Phi node: let new_head#1: bytes = φ(new_head#0 <- block@0) in block@0 +debug: Added new_head#2 to Phi node: let new_head#1: bytes = φ(new_head#0 <- block@0, new_head#2 <- block@3) in block@3 +debug: Sealing block@4 +debug: Created Phi assignment: let length_minus_1#1: uint64 = undefined while trying to resolve 'length_minus_1' in block@1 +debug: Added length_minus_1#0 to Phi node: let length_minus_1#1: uint64 = φ(length_minus_1#0 <- block@0) in block@0 +debug: Added length_minus_1#1 to Phi node: let length_minus_1#1: uint64 = φ(length_minus_1#0 <- block@0, length_minus_1#1 <- block@3) in block@3 +debug: Replacing trivial Phi node: let length_minus_1#1: uint64 = φ(length_minus_1#0 <- block@0, length_minus_1#1 <- block@3) (length_minus_1#1) with length_minus_1#0 +debug: Deleting Phi assignment: let length_minus_1#1: uint64 = φ(length_minus_1#0 <- block@0, length_minus_1#1 <- block@3) +debug: Replaced trivial Phi node: let length_minus_1#1: uint64 = φ(length_minus_1#0 <- block@0, length_minus_1#1 <- block@3) (length_minus_1#1) with length_minus_1#0 in current definition for 3 blocks +debug: Created Phi assignment: let popped_header_offset#1: uint64 = undefined while trying to resolve 'popped_header_offset' in block@1 +debug: Added popped_header_offset#0 to Phi node: let popped_header_offset#1: uint64 = φ(popped_header_offset#0 <- block@0) in block@0 +debug: Added popped_header_offset#1 to Phi node: let popped_header_offset#1: uint64 = φ(popped_header_offset#0 <- block@0, popped_header_offset#1 <- block@3) in block@3 +debug: Replacing trivial Phi node: let popped_header_offset#1: uint64 = φ(popped_header_offset#0 <- block@0, popped_header_offset#1 <- block@3) (popped_header_offset#1) with popped_header_offset#0 +debug: Deleting Phi assignment: let popped_header_offset#1: uint64 = φ(popped_header_offset#0 <- block@0, popped_header_offset#1 <- block@3) +debug: Replaced trivial Phi node: let popped_header_offset#1: uint64 = φ(popped_header_offset#0 <- block@0, popped_header_offset#1 <- block@3) (popped_header_offset#1) with popped_header_offset#0 in current definition for 3 blocks +debug: Created Phi assignment: let popped_offset#1: uint64 = undefined while trying to resolve 'popped_offset' in block@1 +debug: Added popped_offset#0 to Phi node: let popped_offset#1: uint64 = φ(popped_offset#0 <- block@0) in block@0 +debug: Added popped_offset#1 to Phi node: let popped_offset#1: uint64 = φ(popped_offset#0 <- block@0, popped_offset#1 <- block@3) in block@3 +debug: Replacing trivial Phi node: let popped_offset#1: uint64 = φ(popped_offset#0 <- block@0, popped_offset#1 <- block@3) (popped_offset#1) with popped_offset#0 +debug: Deleting Phi assignment: let popped_offset#1: uint64 = φ(popped_offset#0 <- block@0, popped_offset#1 <- block@3) +debug: Replaced trivial Phi node: let popped_offset#1: uint64 = φ(popped_offset#0 <- block@0, popped_offset#1 <- block@3) (popped_offset#1) with popped_offset#0 in current definition for 3 blocks +debug: Created Phi assignment: let popped#1: bytes = undefined while trying to resolve 'popped' in block@1 +debug: Added popped#0 to Phi node: let popped#1: bytes = φ(popped#0 <- block@0) in block@0 +debug: Added popped#1 to Phi node: let popped#1: bytes = φ(popped#0 <- block@0, popped#1 <- block@3) in block@3 +debug: Replacing trivial Phi node: let popped#1: bytes = φ(popped#0 <- block@0, popped#1 <- block@3) (popped#1) with popped#0 +debug: Deleting Phi assignment: let popped#1: bytes = φ(popped#0 <- block@0, popped#1 <- block@3) +debug: Replaced trivial Phi node: let popped#1: bytes = φ(popped#0 <- block@0, popped#1 <- block@3) (popped#1) with popped#0 in current definition for 3 blocks +debug: Terminated block@4 +debug: Building IR for function _puya_lib.arc4.dynamic_array_concat_bits +debug: Sealing block@0 +debug: Terminated block@0 +debug: Sealing block@1 +debug: Terminated block@1 +debug: Sealing block@2 +debug: Created Phi assignment: let array_length#1: uint64 = undefined while trying to resolve 'array_length' in block@2 +debug: Added array_length#0 to Phi node: let array_length#1: uint64 = φ(array_length#0 <- block@0) in block@0 +debug: Added array_length#0 to Phi node: let array_length#1: uint64 = φ(array_length#0 <- block@0, array_length#0 <- block@1) in block@1 +debug: Replacing trivial Phi node: let array_length#1: uint64 = φ(array_length#0 <- block@0, array_length#0 <- block@1) (array_length#1) with array_length#0 +debug: Deleting Phi assignment: let array_length#1: uint64 = φ(array_length#0 <- block@0, array_length#0 <- block@1) +debug: Replaced trivial Phi node: let array_length#1: uint64 = φ(array_length#0 <- block@0, array_length#0 <- block@1) (array_length#1) with array_length#0 in current definition for 1 blocks +debug: Created Phi assignment: let is_packed#1: bool = undefined while trying to resolve 'is_packed' in block@2 +debug: Added is_packed#0 to Phi node: let is_packed#1: bool = φ(is_packed#0 <- block@0) in block@0 +debug: Added is_packed#0 to Phi node: let is_packed#1: bool = φ(is_packed#0 <- block@0, is_packed#0 <- block@1) in block@1 +debug: Replacing trivial Phi node: let is_packed#1: bool = φ(is_packed#0 <- block@0, is_packed#0 <- block@1) (is_packed#1) with is_packed#0 +debug: Deleting Phi assignment: let is_packed#1: bool = φ(is_packed#0 <- block@0, is_packed#0 <- block@1) +debug: Replaced trivial Phi node: let is_packed#1: bool = φ(is_packed#0 <- block@0, is_packed#0 <- block@1) (is_packed#1) with is_packed#0 in current definition for 1 blocks +debug: Created Phi assignment: let new_items_count#1: uint64 = undefined while trying to resolve 'new_items_count' in block@2 +debug: Added new_items_count#0 to Phi node: let new_items_count#1: uint64 = φ(new_items_count#0 <- block@0) in block@0 +debug: Added new_items_count#0 to Phi node: let new_items_count#1: uint64 = φ(new_items_count#0 <- block@0, new_items_count#0 <- block@1) in block@1 +debug: Replacing trivial Phi node: let new_items_count#1: uint64 = φ(new_items_count#0 <- block@0, new_items_count#0 <- block@1) (new_items_count#1) with new_items_count#0 +debug: Deleting Phi assignment: let new_items_count#1: uint64 = φ(new_items_count#0 <- block@0, new_items_count#0 <- block@1) +debug: Replaced trivial Phi node: let new_items_count#1: uint64 = φ(new_items_count#0 <- block@0, new_items_count#0 <- block@1) (new_items_count#1) with new_items_count#0 in current definition for 1 blocks +debug: Terminated block@2 +debug: Looking for 'i' in an unsealed block creating an incomplete Phi: block@3 +debug: Created Phi assignment: let i#1: uint64 = undefined while trying to resolve 'i' in block@3 +debug: Terminated block@3 +debug: Sealing block@4 +debug: Looking for 'result' in an unsealed block creating an incomplete Phi: block@3 +debug: Created Phi assignment: let result#2: bytes = undefined while trying to resolve 'result' in block@3 +debug: Looking for 'write_offset' in an unsealed block creating an incomplete Phi: block@3 +debug: Created Phi assignment: let write_offset#1: uint64 = undefined while trying to resolve 'write_offset' in block@3 +debug: Looking for 'new_items_bytes' in an unsealed block creating an incomplete Phi: block@3 +debug: Created Phi assignment: let new_items_bytes#1: bytes = undefined while trying to resolve 'new_items_bytes' in block@3 +debug: Terminated block@4 +debug: Sealing block@5 +debug: Terminated block@5 +debug: Sealing block@3 +debug: Added i#0 to Phi node: let i#1: uint64 = φ(i#0 <- block@2) in block@2 +debug: Added i#2 to Phi node: let i#1: uint64 = φ(i#0 <- block@2, i#2 <- block@5) in block@5 +debug: Created Phi assignment: let result#4: bytes = undefined while trying to resolve 'result' in block@2 +debug: Added result#0 to Phi node: let result#4: bytes = φ(result#0 <- block@0) in block@0 +debug: Added result#1 to Phi node: let result#4: bytes = φ(result#0 <- block@0, result#1 <- block@1) in block@1 +debug: Added result#4 to Phi node: let result#2: bytes = φ(result#4 <- block@2) in block@2 +debug: Added result#3 to Phi node: let result#2: bytes = φ(result#4 <- block@2, result#3 <- block@5) in block@5 +debug: Added write_offset#0 to Phi node: let write_offset#1: uint64 = φ(write_offset#0 <- block@2) in block@2 +debug: Added write_offset#2 to Phi node: let write_offset#1: uint64 = φ(write_offset#0 <- block@2, write_offset#2 <- block@5) in block@5 +debug: Created Phi assignment: let new_items_bytes#2: bytes = undefined while trying to resolve 'new_items_bytes' in block@2 +debug: Added new_items_bytes#0 to Phi node: let new_items_bytes#2: bytes = φ(new_items_bytes#0 <- block@0) in block@0 +debug: Added new_items_bytes#0 to Phi node: let new_items_bytes#2: bytes = φ(new_items_bytes#0 <- block@0, new_items_bytes#0 <- block@1) in block@1 +debug: Replacing trivial Phi node: let new_items_bytes#2: bytes = φ(new_items_bytes#0 <- block@0, new_items_bytes#0 <- block@1) (new_items_bytes#2) with new_items_bytes#0 +debug: Deleting Phi assignment: let new_items_bytes#2: bytes = φ(new_items_bytes#0 <- block@0, new_items_bytes#0 <- block@1) +debug: Replaced trivial Phi node: let new_items_bytes#2: bytes = φ(new_items_bytes#0 <- block@0, new_items_bytes#0 <- block@1) (new_items_bytes#2) with new_items_bytes#0 in current definition for 1 blocks +debug: Added new_items_bytes#0 to Phi node: let new_items_bytes#1: bytes = φ(new_items_bytes#0 <- block@2) in block@2 +debug: Added new_items_bytes#1 to Phi node: let new_items_bytes#1: bytes = φ(new_items_bytes#0 <- block@2, new_items_bytes#1 <- block@5) in block@5 +debug: Replacing trivial Phi node: let new_items_bytes#1: bytes = φ(new_items_bytes#0 <- block@2, new_items_bytes#1 <- block@5) (new_items_bytes#1) with new_items_bytes#0 +debug: Deleting Phi assignment: let new_items_bytes#1: bytes = φ(new_items_bytes#0 <- block@2, new_items_bytes#1 <- block@5) +debug: Replaced trivial Phi node: let new_items_bytes#1: bytes = φ(new_items_bytes#0 <- block@2, new_items_bytes#1 <- block@5) (new_items_bytes#1) with new_items_bytes#0 in current definition for 3 blocks +debug: Sealing block@6 +debug: Terminated block@6 +debug: Building IR for function _puya_lib.arc4.dynamic_array_concat_byte_length_head +debug: Sealing block@0 +debug: Terminated block@0 +debug: Building IR for function _puya_lib.arc4.dynamic_array_concat_dynamic_element +debug: Sealing block@0 +debug: Terminated block@0 +debug: Looking for 'head_offset' in an unsealed block creating an incomplete Phi: block@1 +debug: Created Phi assignment: let head_offset#1: uint64 = undefined while trying to resolve 'head_offset' in block@1 +debug: Terminated block@1 +debug: Sealing block@2 +debug: Looking for 'array_head_and_tail' in an unsealed block creating an incomplete Phi: block@1 +debug: Created Phi assignment: let array_head_and_tail#1: bytes = undefined while trying to resolve 'array_head_and_tail' in block@1 +debug: Looking for 'new_head' in an unsealed block creating an incomplete Phi: block@1 +debug: Created Phi assignment: let new_head#1: bytes = undefined while trying to resolve 'new_head' in block@1 +debug: Looking for 'item_offset_adjustment' in an unsealed block creating an incomplete Phi: block@1 +debug: Created Phi assignment: let item_offset_adjustment#1: uint64 = undefined while trying to resolve 'item_offset_adjustment' in block@1 +debug: Terminated block@2 +debug: Sealing block@3 +debug: Terminated block@3 +debug: Sealing block@1 +debug: Added head_offset#0 to Phi node: let head_offset#1: uint64 = φ(head_offset#0 <- block@0) in block@0 +debug: Added head_offset#2 to Phi node: let head_offset#1: uint64 = φ(head_offset#0 <- block@0, head_offset#2 <- block@3) in block@3 +debug: Added array_head_and_tail#0 to Phi node: let array_head_and_tail#1: bytes = φ(array_head_and_tail#0 <- block@0) in block@0 +debug: Added array_head_and_tail#1 to Phi node: let array_head_and_tail#1: bytes = φ(array_head_and_tail#0 <- block@0, array_head_and_tail#1 <- block@3) in block@3 +debug: Replacing trivial Phi node: let array_head_and_tail#1: bytes = φ(array_head_and_tail#0 <- block@0, array_head_and_tail#1 <- block@3) (array_head_and_tail#1) with array_head_and_tail#0 +debug: Deleting Phi assignment: let array_head_and_tail#1: bytes = φ(array_head_and_tail#0 <- block@0, array_head_and_tail#1 <- block@3) +debug: Replaced trivial Phi node: let array_head_and_tail#1: bytes = φ(array_head_and_tail#0 <- block@0, array_head_and_tail#1 <- block@3) (array_head_and_tail#1) with array_head_and_tail#0 in current definition for 3 blocks +debug: Added new_head#0 to Phi node: let new_head#1: bytes = φ(new_head#0 <- block@0) in block@0 +debug: Added new_head#2 to Phi node: let new_head#1: bytes = φ(new_head#0 <- block@0, new_head#2 <- block@3) in block@3 +debug: Added item_offset_adjustment#0 to Phi node: let item_offset_adjustment#1: uint64 = φ(item_offset_adjustment#0 <- block@0) in block@0 +debug: Added item_offset_adjustment#1 to Phi node: let item_offset_adjustment#1: uint64 = φ(item_offset_adjustment#0 <- block@0, item_offset_adjustment#1 <- block@3) in block@3 +debug: Replacing trivial Phi node: let item_offset_adjustment#1: uint64 = φ(item_offset_adjustment#0 <- block@0, item_offset_adjustment#1 <- block@3) (item_offset_adjustment#1) with item_offset_adjustment#0 +debug: Deleting Phi assignment: let item_offset_adjustment#1: uint64 = φ(item_offset_adjustment#0 <- block@0, item_offset_adjustment#1 <- block@3) +debug: Replaced trivial Phi node: let item_offset_adjustment#1: uint64 = φ(item_offset_adjustment#0 <- block@0, item_offset_adjustment#1 <- block@3) (item_offset_adjustment#1) with item_offset_adjustment#0 in current definition for 3 blocks +debug: Sealing block@4 +debug: Created Phi assignment: let new_items_count#1: uint64 = undefined while trying to resolve 'new_items_count' in block@1 +debug: Added new_items_count#0 to Phi node: let new_items_count#1: uint64 = φ(new_items_count#0 <- block@0) in block@0 +debug: Added new_items_count#1 to Phi node: let new_items_count#1: uint64 = φ(new_items_count#0 <- block@0, new_items_count#1 <- block@3) in block@3 +debug: Replacing trivial Phi node: let new_items_count#1: uint64 = φ(new_items_count#0 <- block@0, new_items_count#1 <- block@3) (new_items_count#1) with new_items_count#0 +debug: Deleting Phi assignment: let new_items_count#1: uint64 = φ(new_items_count#0 <- block@0, new_items_count#1 <- block@3) +debug: Replaced trivial Phi node: let new_items_count#1: uint64 = φ(new_items_count#0 <- block@0, new_items_count#1 <- block@3) (new_items_count#1) with new_items_count#0 in current definition for 3 blocks +debug: Terminated block@4 +debug: Looking for 'head_offset' in an unsealed block creating an incomplete Phi: block@5 +debug: Created Phi assignment: let head_offset#4: uint64 = undefined while trying to resolve 'head_offset' in block@5 +debug: Terminated block@5 +debug: Sealing block@6 +debug: Looking for 'new_head_and_tail' in an unsealed block creating an incomplete Phi: block@5 +debug: Created Phi assignment: let new_head_and_tail#1: bytes = undefined while trying to resolve 'new_head_and_tail' in block@5 +debug: Looking for 'new_head' in an unsealed block creating an incomplete Phi: block@5 +debug: Created Phi assignment: let new_head#3: bytes = undefined while trying to resolve 'new_head' in block@5 +debug: Looking for 'item_offset_adjustment' in an unsealed block creating an incomplete Phi: block@5 +debug: Created Phi assignment: let item_offset_adjustment#3: uint64 = undefined while trying to resolve 'item_offset_adjustment' in block@5 +debug: Terminated block@6 +debug: Sealing block@7 +debug: Terminated block@7 +debug: Sealing block@5 +debug: Added head_offset#3 to Phi node: let head_offset#4: uint64 = φ(head_offset#3 <- block@4) in block@4 +debug: Added head_offset#5 to Phi node: let head_offset#4: uint64 = φ(head_offset#3 <- block@4, head_offset#5 <- block@7) in block@7 +debug: Created Phi assignment: let new_head_and_tail#2: bytes = undefined while trying to resolve 'new_head_and_tail' in block@1 +debug: Added new_head_and_tail#0 to Phi node: let new_head_and_tail#2: bytes = φ(new_head_and_tail#0 <- block@0) in block@0 +debug: Added new_head_and_tail#2 to Phi node: let new_head_and_tail#2: bytes = φ(new_head_and_tail#0 <- block@0, new_head_and_tail#2 <- block@3) in block@3 +debug: Replacing trivial Phi node: let new_head_and_tail#2: bytes = φ(new_head_and_tail#0 <- block@0, new_head_and_tail#2 <- block@3) (new_head_and_tail#2) with new_head_and_tail#0 +debug: Deleting Phi assignment: let new_head_and_tail#2: bytes = φ(new_head_and_tail#0 <- block@0, new_head_and_tail#2 <- block@3) +debug: Replaced trivial Phi node: let new_head_and_tail#2: bytes = φ(new_head_and_tail#0 <- block@0, new_head_and_tail#2 <- block@3) (new_head_and_tail#2) with new_head_and_tail#0 in current definition for 3 blocks +debug: Added new_head_and_tail#0 to Phi node: let new_head_and_tail#1: bytes = φ(new_head_and_tail#0 <- block@4) in block@4 +debug: Added new_head_and_tail#1 to Phi node: let new_head_and_tail#1: bytes = φ(new_head_and_tail#0 <- block@4, new_head_and_tail#1 <- block@7) in block@7 +debug: Replacing trivial Phi node: let new_head_and_tail#1: bytes = φ(new_head_and_tail#0 <- block@4, new_head_and_tail#1 <- block@7) (new_head_and_tail#1) with new_head_and_tail#0 +debug: Deleting Phi assignment: let new_head_and_tail#1: bytes = φ(new_head_and_tail#0 <- block@4, new_head_and_tail#1 <- block@7) +debug: Replaced trivial Phi node: let new_head_and_tail#1: bytes = φ(new_head_and_tail#0 <- block@4, new_head_and_tail#1 <- block@7) (new_head_and_tail#1) with new_head_and_tail#0 in current definition for 3 blocks +debug: Added new_head#1 to Phi node: let new_head#3: bytes = φ(new_head#1 <- block@4) in block@4 +debug: Added new_head#4 to Phi node: let new_head#3: bytes = φ(new_head#1 <- block@4, new_head#4 <- block@7) in block@7 +debug: Added item_offset_adjustment#2 to Phi node: let item_offset_adjustment#3: uint64 = φ(item_offset_adjustment#2 <- block@4) in block@4 +debug: Added item_offset_adjustment#3 to Phi node: let item_offset_adjustment#3: uint64 = φ(item_offset_adjustment#2 <- block@4, item_offset_adjustment#3 <- block@7) in block@7 +debug: Replacing trivial Phi node: let item_offset_adjustment#3: uint64 = φ(item_offset_adjustment#2 <- block@4, item_offset_adjustment#3 <- block@7) (item_offset_adjustment#3) with item_offset_adjustment#2 +debug: Deleting Phi assignment: let item_offset_adjustment#3: uint64 = φ(item_offset_adjustment#2 <- block@4, item_offset_adjustment#3 <- block@7) +debug: Replaced trivial Phi node: let item_offset_adjustment#3: uint64 = φ(item_offset_adjustment#2 <- block@4, item_offset_adjustment#3 <- block@7) (item_offset_adjustment#3) with item_offset_adjustment#2 in current definition for 3 blocks +debug: Sealing block@8 +debug: Created Phi assignment: let array_items_count#1: uint64 = undefined while trying to resolve 'array_items_count' in block@5 +debug: Created Phi assignment: let array_items_count#2: uint64 = undefined while trying to resolve 'array_items_count' in block@1 +debug: Added array_items_count#0 to Phi node: let array_items_count#2: uint64 = φ(array_items_count#0 <- block@0) in block@0 +debug: Added array_items_count#2 to Phi node: let array_items_count#2: uint64 = φ(array_items_count#0 <- block@0, array_items_count#2 <- block@3) in block@3 +debug: Replacing trivial Phi node: let array_items_count#2: uint64 = φ(array_items_count#0 <- block@0, array_items_count#2 <- block@3) (array_items_count#2) with array_items_count#0 +debug: Deleting Phi assignment: let array_items_count#2: uint64 = φ(array_items_count#0 <- block@0, array_items_count#2 <- block@3) +debug: Replaced trivial Phi node: let array_items_count#2: uint64 = φ(array_items_count#0 <- block@0, array_items_count#2 <- block@3) (array_items_count#2) with array_items_count#0 in current definition for 3 blocks +debug: Added array_items_count#0 to Phi node: let array_items_count#1: uint64 = φ(array_items_count#0 <- block@4) in block@4 +debug: Added array_items_count#1 to Phi node: let array_items_count#1: uint64 = φ(array_items_count#0 <- block@4, array_items_count#1 <- block@7) in block@7 +debug: Replacing trivial Phi node: let array_items_count#1: uint64 = φ(array_items_count#0 <- block@4, array_items_count#1 <- block@7) (array_items_count#1) with array_items_count#0 +debug: Deleting Phi assignment: let array_items_count#1: uint64 = φ(array_items_count#0 <- block@4, array_items_count#1 <- block@7) +debug: Replaced trivial Phi node: let array_items_count#1: uint64 = φ(array_items_count#0 <- block@4, array_items_count#1 <- block@7) (array_items_count#1) with array_items_count#0 in current definition for 3 blocks +debug: Created Phi assignment: let new_items_count#2: uint64 = undefined while trying to resolve 'new_items_count' in block@5 +debug: Added new_items_count#0 to Phi node: let new_items_count#2: uint64 = φ(new_items_count#0 <- block@4) in block@4 +debug: Added new_items_count#2 to Phi node: let new_items_count#2: uint64 = φ(new_items_count#0 <- block@4, new_items_count#2 <- block@7) in block@7 +debug: Replacing trivial Phi node: let new_items_count#2: uint64 = φ(new_items_count#0 <- block@4, new_items_count#2 <- block@7) (new_items_count#2) with new_items_count#0 +debug: Deleting Phi assignment: let new_items_count#2: uint64 = φ(new_items_count#0 <- block@4, new_items_count#2 <- block@7) +debug: Replaced trivial Phi node: let new_items_count#2: uint64 = φ(new_items_count#0 <- block@4, new_items_count#2 <- block@7) (new_items_count#2) with new_items_count#0 in current definition for 3 blocks +debug: Created Phi assignment: let array_head_and_tail#2: bytes = undefined while trying to resolve 'array_head_and_tail' in block@5 +debug: Added array_head_and_tail#0 to Phi node: let array_head_and_tail#2: bytes = φ(array_head_and_tail#0 <- block@4) in block@4 +debug: Added array_head_and_tail#2 to Phi node: let array_head_and_tail#2: bytes = φ(array_head_and_tail#0 <- block@4, array_head_and_tail#2 <- block@7) in block@7 +debug: Replacing trivial Phi node: let array_head_and_tail#2: bytes = φ(array_head_and_tail#0 <- block@4, array_head_and_tail#2 <- block@7) (array_head_and_tail#2) with array_head_and_tail#0 +debug: Deleting Phi assignment: let array_head_and_tail#2: bytes = φ(array_head_and_tail#0 <- block@4, array_head_and_tail#2 <- block@7) +debug: Replaced trivial Phi node: let array_head_and_tail#2: bytes = φ(array_head_and_tail#0 <- block@4, array_head_and_tail#2 <- block@7) (array_head_and_tail#2) with array_head_and_tail#0 in current definition for 3 blocks +debug: Terminated block@8 +debug: Building IR for function _puya_lib.arc4.dynamic_array_replace_byte_length_head +debug: Sealing block@0 +debug: Terminated block@0 +debug: Building IR for function _puya_lib.arc4.dynamic_array_replace_dynamic_element +debug: Sealing block@0 +debug: Terminated block@0 +debug: Building IR for function _puya_lib.arc4.static_array_replace_dynamic_element +debug: Sealing block@0 +debug: Terminated block@0 +debug: Looking for 'head_offset' in an unsealed block creating an incomplete Phi: block@1 +debug: Created Phi assignment: let head_offset#1: uint64 = undefined while trying to resolve 'head_offset' in block@1 +debug: Terminated block@1 +debug: Sealing block@2 +debug: Looking for 'new_head_and_tail' in an unsealed block creating an incomplete Phi: block@1 +debug: Created Phi assignment: let new_head_and_tail#1: bytes = undefined while trying to resolve 'new_head_and_tail' in block@1 +debug: Looking for 'new_item_length' in an unsealed block creating an incomplete Phi: block@1 +debug: Created Phi assignment: let new_item_length#1: uint64 = undefined while trying to resolve 'new_item_length' in block@1 +debug: Looking for 'original_item_length' in an unsealed block creating an incomplete Phi: block@1 +debug: Created Phi assignment: let original_item_length#1: uint64 = undefined while trying to resolve 'original_item_length' in block@1 +debug: Terminated block@2 +debug: Sealing block@3 +debug: Terminated block@3 +debug: Sealing block@1 +debug: Added head_offset#0 to Phi node: let head_offset#1: uint64 = φ(head_offset#0 <- block@0) in block@0 +debug: Added head_offset#2 to Phi node: let head_offset#1: uint64 = φ(head_offset#0 <- block@0, head_offset#2 <- block@3) in block@3 +debug: Added new_head_and_tail#0 to Phi node: let new_head_and_tail#1: bytes = φ(new_head_and_tail#0 <- block@0) in block@0 +debug: Added new_head_and_tail#2 to Phi node: let new_head_and_tail#1: bytes = φ(new_head_and_tail#0 <- block@0, new_head_and_tail#2 <- block@3) in block@3 +debug: Added new_item_length#0 to Phi node: let new_item_length#1: uint64 = φ(new_item_length#0 <- block@0) in block@0 +debug: Added new_item_length#1 to Phi node: let new_item_length#1: uint64 = φ(new_item_length#0 <- block@0, new_item_length#1 <- block@3) in block@3 +debug: Replacing trivial Phi node: let new_item_length#1: uint64 = φ(new_item_length#0 <- block@0, new_item_length#1 <- block@3) (new_item_length#1) with new_item_length#0 +debug: Deleting Phi assignment: let new_item_length#1: uint64 = φ(new_item_length#0 <- block@0, new_item_length#1 <- block@3) +debug: Replaced trivial Phi node: let new_item_length#1: uint64 = φ(new_item_length#0 <- block@0, new_item_length#1 <- block@3) (new_item_length#1) with new_item_length#0 in current definition for 3 blocks +debug: Added original_item_length#0 to Phi node: let original_item_length#1: uint64 = φ(original_item_length#0 <- block@0) in block@0 +debug: Added original_item_length#1 to Phi node: let original_item_length#1: uint64 = φ(original_item_length#0 <- block@0, original_item_length#1 <- block@3) in block@3 +debug: Replacing trivial Phi node: let original_item_length#1: uint64 = φ(original_item_length#0 <- block@0, original_item_length#1 <- block@3) (original_item_length#1) with original_item_length#0 +debug: Deleting Phi assignment: let original_item_length#1: uint64 = φ(original_item_length#0 <- block@0, original_item_length#1 <- block@3) +debug: Replaced trivial Phi node: let original_item_length#1: uint64 = φ(original_item_length#0 <- block@0, original_item_length#1 <- block@3) (original_item_length#1) with original_item_length#0 in current definition for 3 blocks +debug: Sealing block@4 +debug: Terminated block@4 +debug: Building IR for function _puya_lib.arc4.static_array_replace_byte_length_head +debug: Sealing block@0 +debug: Terminated block@0 +debug: Building IR for function _puya_lib.arc4.recalculate_head_for_elements_with_byte_length_head +debug: Sealing block@0 +debug: Terminated block@0 +debug: Looking for 'head_offset' in an unsealed block creating an incomplete Phi: block@1 +debug: Created Phi assignment: let head_offset#1: uint64 = undefined while trying to resolve 'head_offset' in block@1 +debug: Terminated block@1 +debug: Sealing block@2 +debug: Looking for 'tail_offset' in an unsealed block creating an incomplete Phi: block@1 +debug: Created Phi assignment: let tail_offset#1: uint64 = undefined while trying to resolve 'tail_offset' in block@1 +debug: Looking for 'array_head_and_tail' in an unsealed block creating an incomplete Phi: block@1 +debug: Created Phi assignment: let array_head_and_tail#1: bytes = undefined while trying to resolve 'array_head_and_tail' in block@1 +debug: Terminated block@2 +debug: Sealing block@3 +debug: Terminated block@3 +debug: Sealing block@1 +debug: Added head_offset#0 to Phi node: let head_offset#1: uint64 = φ(head_offset#0 <- block@0) in block@0 +debug: Added head_offset#3 to Phi node: let head_offset#1: uint64 = φ(head_offset#0 <- block@0, head_offset#3 <- block@3) in block@3 +debug: Added tail_offset#0 to Phi node: let tail_offset#1: uint64 = φ(tail_offset#0 <- block@0) in block@0 +debug: Added tail_offset#2 to Phi node: let tail_offset#1: uint64 = φ(tail_offset#0 <- block@0, tail_offset#2 <- block@3) in block@3 +debug: Added array_head_and_tail#0 to Phi node: let array_head_and_tail#1: bytes = φ(array_head_and_tail#0 <- block@0) in block@0 +debug: Added array_head_and_tail#2 to Phi node: let array_head_and_tail#1: bytes = φ(array_head_and_tail#0 <- block@0, array_head_and_tail#2 <- block@3) in block@3 +debug: Sealing block@4 +debug: Terminated block@4 +debug: Building IR for function test_cases.avm_12.contract.avm_12_sig +debug: Sealing block@0 +debug: Terminated block@0 +debug: removing unused subroutine _puya_lib.util.ensure_budget +debug: removing unused subroutine _puya_lib.bytes_.is_substring +debug: removing unused subroutine _puya_lib.arc4.dynamic_array_pop_bit +debug: removing unused subroutine _puya_lib.arc4.dynamic_array_pop_fixed_size +debug: removing unused subroutine _puya_lib.arc4.dynamic_array_pop_byte_length_head +debug: removing unused subroutine _puya_lib.arc4.dynamic_array_pop_dynamic_element +debug: removing unused subroutine _puya_lib.arc4.dynamic_array_concat_bits +debug: removing unused subroutine _puya_lib.arc4.dynamic_array_concat_byte_length_head +debug: removing unused subroutine _puya_lib.arc4.dynamic_array_concat_dynamic_element +debug: removing unused subroutine _puya_lib.arc4.dynamic_array_replace_byte_length_head +debug: removing unused subroutine _puya_lib.arc4.dynamic_array_replace_dynamic_element +debug: removing unused subroutine _puya_lib.arc4.static_array_replace_dynamic_element +debug: removing unused subroutine _puya_lib.arc4.static_array_replace_byte_length_head +debug: removing unused subroutine _puya_lib.arc4.recalculate_head_for_elements_with_byte_length_head +debug: Building IR for function test_cases.avm_12.contract.Contract.__puya_arc4_router__ +debug: Sealing block@0 +debug: Terminated block@0 +debug: Sealing block@1 +debug: Terminated block@1 +debug: Sealing block@2 +debug: Terminated block@2 +debug: Sealing block@3 +debug: Terminated block@3 +debug: Sealing block@4 +debug: Terminated block@4 +debug: Sealing block@5 +debug: Terminated block@5 +debug: Sealing block@6 +debug: Terminated block@6 +debug: Sealing block@7 +debug: Terminated block@7 +debug: Sealing block@8 +debug: Terminated block@8 +debug: Sealing block@9 +debug: Terminated block@9 +debug: Building IR for function test_cases.avm_12.contract.Contract.test_new_ops +debug: Sealing block@0 +debug: Terminated block@0 +debug: Building IR for function test_cases.avm_12.contract.Contract.__algopy_default_create +debug: Sealing block@0 +debug: Terminated block@0 +debug: Building IR for function algopy.arc4.ARC4Contract.approval_program +debug: Sealing block@0 +debug: Terminated block@0 +debug: removing unused subroutine _puya_lib.util.ensure_budget +debug: removing unused subroutine _puya_lib.bytes_.is_substring +debug: removing unused subroutine _puya_lib.arc4.dynamic_array_pop_bit +debug: removing unused subroutine _puya_lib.arc4.dynamic_array_pop_fixed_size +debug: removing unused subroutine _puya_lib.arc4.dynamic_array_pop_byte_length_head +debug: removing unused subroutine _puya_lib.arc4.dynamic_array_pop_dynamic_element +debug: removing unused subroutine _puya_lib.arc4.dynamic_array_concat_bits +debug: removing unused subroutine _puya_lib.arc4.dynamic_array_concat_byte_length_head +debug: removing unused subroutine _puya_lib.arc4.dynamic_array_concat_dynamic_element +debug: removing unused subroutine _puya_lib.arc4.dynamic_array_replace_byte_length_head +debug: removing unused subroutine _puya_lib.arc4.dynamic_array_replace_dynamic_element +debug: removing unused subroutine _puya_lib.arc4.static_array_replace_dynamic_element +debug: removing unused subroutine _puya_lib.arc4.static_array_replace_byte_length_head +debug: removing unused subroutine _puya_lib.arc4.recalculate_head_for_elements_with_byte_length_head +debug: Building IR for function algopy.arc4.ARC4Contract.clear_state_program +debug: Sealing block@0 +debug: Terminated block@0 +debug: removing unused subroutine _puya_lib.util.ensure_budget +debug: removing unused subroutine _puya_lib.bytes_.is_substring +debug: removing unused subroutine _puya_lib.arc4.dynamic_array_pop_bit +debug: removing unused subroutine _puya_lib.arc4.dynamic_array_pop_fixed_size +debug: removing unused subroutine _puya_lib.arc4.dynamic_array_pop_byte_length_head +debug: removing unused subroutine _puya_lib.arc4.dynamic_array_pop_dynamic_element +debug: removing unused subroutine _puya_lib.arc4.dynamic_array_concat_bits +debug: removing unused subroutine _puya_lib.arc4.dynamic_array_concat_byte_length_head +debug: removing unused subroutine _puya_lib.arc4.dynamic_array_concat_dynamic_element +debug: removing unused subroutine _puya_lib.arc4.dynamic_array_replace_byte_length_head +debug: removing unused subroutine _puya_lib.arc4.dynamic_array_replace_dynamic_element +debug: removing unused subroutine _puya_lib.arc4.static_array_replace_dynamic_element +debug: removing unused subroutine _puya_lib.arc4.static_array_replace_byte_length_head +debug: removing unused subroutine _puya_lib.arc4.recalculate_head_for_elements_with_byte_length_head +debug: Output IR to avm_12/out/avm_12_sig.ir/avm_12_sig.0.ssa.ir +info: optimizing lsig program of test_cases.avm_12.contract.avm_12_sig at level 1 +debug: Begin optimization pass 1/100 +debug: Optimizing subroutine test_cases.avm_12.contract.avm_12_sig +debug: Optimizer: Perform Subroutine Inlining +debug: Optimizer: Split Parallel Copies +debug: Optimizer: Constant Replacer +debug: Optimizer: Copy Propagation +debug: Optimizer: Intrinsic Simplifier +debug: Don't know how to simplify sumhash512 of 0x +debug: Optimizer: Elide Itxn Field Calls +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: No optimizations performed in pass 1, ending loop +debug: Performing SSA IR destructuring for test_cases.avm_12.contract.avm_12_sig +debug: Converting to CSSA +debug: Removing Phi nodes +debug: Coalescing local variables in test_cases.avm_12.contract.avm_12_sig using strategy RootOperandGrouping +debug: Coalescing resulted in 0 replacement/s +debug: Sequentializing parallel copies in test_cases.avm_12.contract.avm_12_sig +debug: Performing post-SSA optimizations at level 1 +debug: Output IR to avm_12/out/avm_12_sig.ir/avm_12_sig.1.destructured.ir +debug: Inserted main.ops[2]: 'l-store-copy tmp%0#0 0' +debug: Replaced main.ops[4]: 'v-load tmp%0#0' with 'l-load tmp%0#0' +debug: Inserted main.ops[6]: 'l-store-copy tmp%1#0 0' +debug: Replaced main.ops[8]: 'v-load tmp%1#0' with 'l-load tmp%1#0' +avm_12/contract.py:4 debug: optimizing TEAL subroutine test_cases.avm_12.contract.avm_12_sig() -> uint64: +debug: Output IR to avm_12/out/Contract.ir/Contract.approval.0.ssa.ir +info: optimizing approval program of test_cases.avm_12.contract.Contract at level 1 +debug: Begin optimization pass 1/100 +debug: Optimizing subroutine algopy.arc4.ARC4Contract.approval_program +debug: Optimizer: Perform Subroutine Inlining +debug: inlining call to test_cases.avm_12.contract.Contract.__puya_arc4_router__ in algopy.arc4.ARC4Contract.approval_program +debug: Optimizer: Split Parallel Copies +debug: Optimizer: Constant Replacer +debug: Optimizer: Copy Propagation +debug: Optimizer: Intrinsic Simplifier +debug: Simplified (== tmp%3#0 NoOp) to (! tmp%3#0) +debug: Simplified (== tmp%8#0 0u) to (! tmp%8#0) +debug: Optimizer: Elide Itxn Field Calls +debug: Optimizer: Remove Unused Variables +debug: Removing unused variable tmp%1#0 +debug: Removing unused variable tmp%6#0 +debug: Optimizer: Inner Txn Field Replacer +debug: Optimizer: Replace Compiled References +debug: Optimizer: Simplify Control Ops +debug: simplifying a switch with constants into goto nth +debug: simplified terminator of block@6 from switch tmp%7#0 {0u => block@7, * => block@8} to goto_nth [block@7][tmp%7#0] else goto block@8 +debug: simplifying a goto nth with two targets into a conditional branch +debug: simplified terminator of block@6 from goto_nth [block@7][tmp%7#0] else goto block@8 to goto tmp%7#0 ? block@8 : block@7 +debug: Optimizer: Remove Linear Jump +debug: Replaced predecessor block@1 with block@0 in block@6 +debug: Replaced predecessor block@1 with block@0 in block@2 +debug: Merged linear block@1 into block@0 +debug: Replaced predecessor block@5 with block@4 in block@10 +debug: Merged linear block@5 into block@4 +debug: Replaced predecessor block@9 with block@8 in block@10 +debug: Merged linear block@9 into block@8 +debug: Optimizer: Remove Empty Blocks +debug: Removed empty block: block@4 +debug: Removed empty block: block@8 +debug: Optimizer: Remove Unreachable Blocks +debug: Optimizer: Repeated Expression Elimination +debug: Optimizing subroutine test_cases.avm_12.contract.Contract.__puya_arc4_router__ +debug: Optimizer: Perform Subroutine Inlining +debug: inlining call to test_cases.avm_12.contract.Contract.__algopy_default_create in test_cases.avm_12.contract.Contract.__puya_arc4_router__ +debug: Optimizer: Split Parallel Copies +debug: Optimizer: Constant Replacer +debug: Optimizer: Copy Propagation +debug: Optimizer: Intrinsic Simplifier +debug: Simplified (== tmp%3#0 NoOp) to (! tmp%3#0) +debug: Simplified (== tmp%8#0 0u) to (! tmp%8#0) +debug: Optimizer: Elide Itxn Field Calls +debug: Optimizer: Remove Unused Variables +debug: Removing unused variable tmp%1#0 +debug: Removing unused variable tmp%6#0 +debug: Optimizer: Inner Txn Field Replacer +debug: Optimizer: Replace Compiled References +debug: Optimizer: Simplify Control Ops +debug: simplifying a switch with constants into goto nth +debug: simplified terminator of block@5 from switch tmp%7#0 {0u => block@6, * => block@7} to goto_nth [block@6][tmp%7#0] else goto block@7 +debug: simplifying a goto nth with two targets into a conditional branch +debug: simplified terminator of block@5 from goto_nth [block@6][tmp%7#0] else goto block@7 to goto tmp%7#0 ? block@7 : block@6 +debug: Optimizer: Remove Linear Jump +debug: Replaced predecessor block@4 with block@3 in block@9 +debug: Merged linear block@4 into block@3 +debug: Replaced predecessor block@10 with block@6 in block@11 +debug: Merged linear block@10 into block@6 +debug: Merged linear block@11 into block@6 +debug: Replaced predecessor block@8 with block@7 in block@9 +debug: Merged linear block@8 into block@7 +debug: Optimizer: Remove Empty Blocks +debug: Removed empty block: block@3 +debug: Removed empty block: block@7 +debug: Optimizer: Remove Unreachable Blocks +debug: Optimizer: Repeated Expression Elimination +debug: Optimizing subroutine test_cases.avm_12.contract.Contract.test_new_ops +debug: Optimizer: Perform Subroutine Inlining +debug: Optimizer: Split Parallel Copies +debug: Optimizer: Constant Replacer +debug: Optimizer: Copy Propagation +debug: Optimizer: Intrinsic Simplifier +debug: Don't know how to simplify sumhash512 of 0x +debug: Optimizer: Elide Itxn Field Calls +debug: Optimizer: Remove Unused Variables +debug: Removing unused variable tmp%5#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: Optimizing subroutine test_cases.avm_12.contract.Contract.__algopy_default_create +debug: Optimizer: Perform Subroutine Inlining +debug: Optimizer: Split Parallel Copies +debug: Optimizer: Constant Replacer +debug: Optimizer: Copy Propagation +debug: Optimizer: Intrinsic Simplifier +debug: Optimizer: Elide Itxn Field Calls +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: removing unused subroutine test_cases.avm_12.contract.Contract.__puya_arc4_router__ +debug: Output IR to avm_12/out/Contract.ir/Contract.approval.1.ssa.opt.ir +debug: Begin optimization pass 2/100 +debug: Optimizing subroutine algopy.arc4.ARC4Contract.approval_program +debug: Optimizer: Perform Subroutine Inlining +debug: inlining call to test_cases.avm_12.contract.Contract.__algopy_default_create in algopy.arc4.ARC4Contract.approval_program +debug: Optimizer: Split Parallel Copies +debug: Optimizer: Constant Replacer +debug: Optimizer: Copy Propagation +debug: Optimizer: Intrinsic Simplifier +debug: Optimizer: Elide Itxn Field Calls +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: Replaced predecessor block@12 with block@7 in block@13 +debug: Merged linear block@12 into block@7 +debug: Replaced predecessor block@13 with block@7 in block@11 +debug: Merged linear block@13 into block@7 +debug: Optimizer: Remove Empty Blocks +debug: Optimizer: Remove Unreachable Blocks +debug: Optimizer: Repeated Expression Elimination +debug: Optimizing subroutine test_cases.avm_12.contract.Contract.test_new_ops +debug: Optimizer: Perform Subroutine Inlining +debug: Optimizer: Split Parallel Copies +debug: Optimizer: Constant Replacer +debug: Optimizer: Copy Propagation +debug: Optimizer: Intrinsic Simplifier +debug: Don't know how to simplify sumhash512 of 0x +debug: Optimizer: Elide Itxn Field Calls +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: Optimizing subroutine test_cases.avm_12.contract.Contract.__algopy_default_create +debug: Optimizer: Perform Subroutine Inlining +debug: Optimizer: Split Parallel Copies +debug: Optimizer: Constant Replacer +debug: Optimizer: Copy Propagation +debug: Optimizer: Intrinsic Simplifier +debug: Optimizer: Elide Itxn Field Calls +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: removing unused subroutine test_cases.avm_12.contract.Contract.__algopy_default_create +debug: Output IR to avm_12/out/Contract.ir/Contract.approval.2.ssa.opt.ir +debug: Begin optimization pass 3/100 +debug: Optimizing subroutine algopy.arc4.ARC4Contract.approval_program +debug: Optimizer: Perform Subroutine Inlining +debug: Optimizer: Split Parallel Copies +debug: Optimizer: Constant Replacer +debug: Optimizer: Copy Propagation +debug: Optimizer: Intrinsic Simplifier +debug: Optimizer: Elide Itxn Field Calls +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: Optimizing subroutine test_cases.avm_12.contract.Contract.test_new_ops +debug: Optimizer: Perform Subroutine Inlining +debug: Optimizer: Split Parallel Copies +debug: Optimizer: Constant Replacer +debug: Optimizer: Copy Propagation +debug: Optimizer: Intrinsic Simplifier +debug: Don't know how to simplify sumhash512 of 0x +debug: Optimizer: Elide Itxn Field Calls +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: No optimizations performed in pass 3, ending loop +debug: Performing SSA IR destructuring for algopy.arc4.ARC4Contract.approval_program +debug: Converting to CSSA +debug: Removing Phi nodes +debug: Coalescing local variables in algopy.arc4.ARC4Contract.approval_program using strategy RootOperandGrouping +debug: Coalescing test_cases.avm_12.contract.Contract.__puya_arc4_router__%0#0 with [test_cases.avm_12.contract.Contract.__puya_arc4_router__%0#1, test_cases.avm_12.contract.Contract.__puya_arc4_router__%0#2] +debug: Coalescing tmp%0#0 with [tmp%0#2] +debug: Coalescing resulted in 8 replacement/s +debug: Sequentializing parallel copies in algopy.arc4.ARC4Contract.approval_program +debug: Performing post-SSA optimizations at level 1 +debug: Performing SSA IR destructuring for test_cases.avm_12.contract.Contract.test_new_ops +debug: Converting to CSSA +debug: Removing Phi nodes +debug: Coalescing local variables in test_cases.avm_12.contract.Contract.test_new_ops using strategy RootOperandGrouping +debug: Coalescing resulted in 0 replacement/s +debug: Sequentializing parallel copies in test_cases.avm_12.contract.Contract.test_new_ops +debug: Performing post-SSA optimizations at level 1 +debug: Output IR to avm_12/out/Contract.ir/Contract.approval.3.destructured.ir +debug: Output IR to avm_12/out/Contract.ir/Contract.clear.0.ssa.ir +info: optimizing clear program of test_cases.avm_12.contract.Contract at level 1 +debug: Begin optimization pass 1/100 +debug: Optimizing subroutine algopy.arc4.ARC4Contract.clear_state_program +debug: Optimizer: Perform Subroutine Inlining +debug: Optimizer: Split Parallel Copies +debug: Optimizer: Constant Replacer +debug: Optimizer: Copy Propagation +debug: Optimizer: Intrinsic Simplifier +debug: Optimizer: Elide Itxn Field Calls +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: No optimizations performed in pass 1, ending loop +debug: Performing SSA IR destructuring for algopy.arc4.ARC4Contract.clear_state_program +debug: Converting to CSSA +debug: Removing Phi nodes +debug: Coalescing local variables in algopy.arc4.ARC4Contract.clear_state_program using strategy RootOperandGrouping +debug: Coalescing resulted in 0 replacement/s +debug: Sequentializing parallel copies in algopy.arc4.ARC4Contract.clear_state_program +debug: Performing post-SSA optimizations at level 1 +debug: Output IR to avm_12/out/Contract.ir/Contract.clear.1.destructured.ir +debug: Inserted main.ops[1]: 'l-store-copy tmp%0#1 0' +debug: Replaced main.ops[3]: 'v-load tmp%0#1' with 'l-load tmp%0#1' +debug: Inserted main_abi_routing@2.ops[1]: 'l-store-copy tmp%2#0 0' +debug: Replaced main_abi_routing@2.ops[4]: 'v-load tmp%2#0' with 'l-load tmp%2#0' +debug: Inserted main_test_new_ops_route@3.ops[1]: 'l-store-copy tmp%3#0 0' +debug: Replaced main_test_new_ops_route@3.ops[3]: 'v-load tmp%3#0' with 'l-load tmp%3#0' +debug: Inserted main_test_new_ops_route@3.ops[5]: 'l-store-copy tmp%4#0 0' +debug: Replaced main_test_new_ops_route@3.ops[7]: 'v-load tmp%4#0' with 'l-load tmp%4#0' +debug: Inserted main_test_new_ops_route@3.ops[10]: 'l-store-copy tmp%5#0 0' +debug: Replaced main_test_new_ops_route@3.ops[12]: 'v-load tmp%5#0' with 'l-load tmp%5#0' +debug: Inserted main_test_new_ops_route@3.ops[16]: 'l-store-copy test_cases.avm_12.contract.Contract.__puya_arc4_router__%0#0 0' +debug: Replaced main_test_new_ops_route@3.ops[18]: 'v-load test_cases.avm_12.contract.Contract.__puya_arc4_router__%0#0' with 'l-load test_cases.avm_12.contract.Contract.__puya_arc4_router__%0#0' +debug: Inserted main_bare_routing@6.ops[1]: 'l-store-copy tmp%7#0 0' +debug: Replaced main_bare_routing@6.ops[3]: 'v-load tmp%7#0' with 'l-load tmp%7#0' +debug: Inserted main___algopy_default_create@7.ops[1]: 'l-store-copy tmp%8#0 0' +debug: Replaced main___algopy_default_create@7.ops[3]: 'v-load tmp%8#0' with 'l-load tmp%8#0' +debug: Inserted main___algopy_default_create@7.ops[5]: 'l-store-copy tmp%9#0 0' +debug: Replaced main___algopy_default_create@7.ops[7]: 'v-load tmp%9#0' with 'l-load tmp%9#0' +debug: Inserted main___algopy_default_create@7.ops[10]: 'l-store-copy test_cases.avm_12.contract.Contract.__puya_arc4_router__%0#0 0' +debug: Replaced main___algopy_default_create@7.ops[12]: 'v-load test_cases.avm_12.contract.Contract.__puya_arc4_router__%0#0' with 'l-load test_cases.avm_12.contract.Contract.__puya_arc4_router__%0#0' +debug: Inserted main_after_if_else@10.ops[1]: 'l-store-copy test_cases.avm_12.contract.Contract.__puya_arc4_router__%0#0 0' +debug: Replaced main_after_if_else@10.ops[3]: 'v-load test_cases.avm_12.contract.Contract.__puya_arc4_router__%0#0' with 'l-load test_cases.avm_12.contract.Contract.__puya_arc4_router__%0#0' +debug: Inserted test_new_ops.ops[7]: 'l-store-copy tmp%1#0 0' +debug: Replaced test_new_ops.ops[9]: 'v-load tmp%1#0' with 'l-load tmp%1#0' +debug: Inserted test_new_ops.ops[11]: 'l-store-copy tmp%2#0 0' +debug: Replaced test_new_ops.ops[13]: 'v-load tmp%2#0' with 'l-load tmp%2#0' +debug: Inserted test_new_ops.ops[17]: 'l-store-copy tmp%3#0 0' +debug: Replaced test_new_ops.ops[19]: 'v-load tmp%3#0' with 'l-load tmp%3#0' +debug: Inserted test_new_ops.ops[21]: 'l-store-copy tmp%4#0 0' +debug: Replaced test_new_ops.ops[23]: 'v-load tmp%4#0' with 'l-load tmp%4#0' +debug: Inserted test_new_ops.ops[2]: 'l-store-copy tmp%0#0 0' +debug: Replaced test_new_ops.ops[6]: 'v-load tmp%0#0' with 'l-load tmp%0#0' +debug: Found 3 edge set/s for algopy.arc4.ARC4Contract.approval_program +debug: Allocated 1 variable/s to x-stack: tmp%0#0 +debug: shared x-stack for main_test_new_ops_route@3 -> main_after_inlined_test_cases.avm_12.contract.Contract.__puya_arc4_router__@11: tmp%0#0 +debug: shared x-stack for main___algopy_default_create@7 -> main_after_inlined_test_cases.avm_12.contract.Contract.__puya_arc4_router__@11: tmp%0#0 +debug: shared x-stack for main_after_if_else@10 -> main_after_inlined_test_cases.avm_12.contract.Contract.__puya_arc4_router__@11: tmp%0#0 +debug: optimizing TEAL subroutine algopy.arc4.ARC4Contract.approval_program() -> uint64: +debug: replacing `b main_after_inlined_test_cases.avm_12.contract.Contract.__puya_arc4_router__@11` with `return` +debug: replacing `b main_after_inlined_test_cases.avm_12.contract.Contract.__puya_arc4_router__@11` with `return` +debug: inlining single reference block main_abi_routing@2 into main +debug: inlining single reference block main_after_inlined_test_cases.avm_12.contract.Contract.__puya_arc4_router__@11 into main_after_if_else@10 +debug: inlining single reference block main___algopy_default_create@7 into main_bare_routing@6 +debug: removing explicit jump to fall-through block main_after_if_else@10 +avm_12/contract.py:10 debug: optimizing TEAL subroutine test_cases.avm_12.contract.Contract.test_new_ops() -> void: +debug: optimizing TEAL subroutine algopy.arc4.ARC4Contract.clear_state_program() -> uint64: +info: Writing avm_12/out/avm_12_sig.teal +info: Writing avm_12/out/avm_12_sig.bin +info: Writing avm_12/out/avm_12_sig.puya.map +info: Writing avm_12/out/Contract.arc32.json +info: Writing avm_12/out/Contract.arc56.json +info: Writing avm_12/out/Contract.approval.teal +info: Writing avm_12/out/Contract.clear.teal +info: Writing avm_12/out/Contract.approval.bin +info: Writing avm_12/out/Contract.clear.bin +info: Writing avm_12/out/Contract.approval.puya.map +info: Writing avm_12/out/Contract.clear.puya.map +info: writing avm_12/out/client_Contract.py \ No newline at end of file diff --git a/test_cases/avm_12/puya_O2.log b/test_cases/avm_12/puya_O2.log new file mode 100644 index 0000000000..089b3bb269 --- /dev/null +++ b/test_cases/avm_12/puya_O2.log @@ -0,0 +1,752 @@ +debug: PuyaPyOptions(output_teal=True, output_source_map=True, output_arc32=False, output_arc56=False, output_ssa_ir=False, output_optimization_ir=False, output_destructured_ir=True, output_memory_ir=False, output_bytecode=True, debug_level=0, optimization_level=2, target_avm_version=10, cli_template_definitions={}, template_vars_prefix='TMPL_', locals_coalescing_strategy=, paths=['avm_12'], output_awst=False, output_awst_json=False, output_client=False, log_level=) +info: Found python prefix: /.venv +debug: Building IR for function _puya_lib.util.ensure_budget +debug: Sealing block@0 +debug: Terminated block@0 +debug: Looking for 'required_budget_with_buffer' in an unsealed block creating an incomplete Phi: block@1 +debug: Created Phi assignment: let required_budget_with_buffer#1: uint64 = undefined while trying to resolve 'required_budget_with_buffer' in block@1 +debug: Terminated block@1 +debug: Sealing block@2 +debug: Looking for 'fee_source' in an unsealed block creating an incomplete Phi: block@1 +debug: Created Phi assignment: let fee_source#1: uint64 = undefined while trying to resolve 'fee_source' in block@1 +debug: Terminated block@2 +debug: Sealing block@3 +debug: Terminated block@3 +debug: Sealing block@4 +debug: Terminated block@4 +debug: Sealing block@5 +debug: Terminated block@5 +debug: Sealing block@6 +debug: Terminated block@6 +debug: Sealing block@1 +debug: Added required_budget_with_buffer#0 to Phi node: let required_budget_with_buffer#1: uint64 = φ(required_budget_with_buffer#0 <- block@0) in block@0 +debug: Created Phi assignment: let required_budget_with_buffer#2: uint64 = undefined while trying to resolve 'required_budget_with_buffer' in block@6 +debug: Added required_budget_with_buffer#1 to Phi node: let required_budget_with_buffer#2: uint64 = φ(required_budget_with_buffer#1 <- block@3) in block@3 +debug: Added required_budget_with_buffer#1 to Phi node: let required_budget_with_buffer#2: uint64 = φ(required_budget_with_buffer#1 <- block@3, required_budget_with_buffer#1 <- block@4) in block@4 +debug: Added required_budget_with_buffer#1 to Phi node: let required_budget_with_buffer#2: uint64 = φ(required_budget_with_buffer#1 <- block@3, required_budget_with_buffer#1 <- block@4, required_budget_with_buffer#1 <- block@5) in block@5 +debug: Replacing trivial Phi node: let required_budget_with_buffer#2: uint64 = φ(required_budget_with_buffer#1 <- block@3, required_budget_with_buffer#1 <- block@4, required_budget_with_buffer#1 <- block@5) (required_budget_with_buffer#2) with required_budget_with_buffer#1 +debug: Deleting Phi assignment: let required_budget_with_buffer#2: uint64 = φ(required_budget_with_buffer#1 <- block@3, required_budget_with_buffer#1 <- block@4, required_budget_with_buffer#1 <- block@5) +debug: Replaced trivial Phi node: let required_budget_with_buffer#2: uint64 = φ(required_budget_with_buffer#1 <- block@3, required_budget_with_buffer#1 <- block@4, required_budget_with_buffer#1 <- block@5) (required_budget_with_buffer#2) with required_budget_with_buffer#1 in current definition for 1 blocks +debug: Added required_budget_with_buffer#1 to Phi node: let required_budget_with_buffer#1: uint64 = φ(required_budget_with_buffer#0 <- block@0, required_budget_with_buffer#1 <- block@6) in block@6 +debug: Replacing trivial Phi node: let required_budget_with_buffer#1: uint64 = φ(required_budget_with_buffer#0 <- block@0, required_budget_with_buffer#1 <- block@6) (required_budget_with_buffer#1) with required_budget_with_buffer#0 +debug: Deleting Phi assignment: let required_budget_with_buffer#1: uint64 = φ(required_budget_with_buffer#0 <- block@0, required_budget_with_buffer#1 <- block@6) +debug: Replaced trivial Phi node: let required_budget_with_buffer#1: uint64 = φ(required_budget_with_buffer#0 <- block@0, required_budget_with_buffer#1 <- block@6) (required_budget_with_buffer#1) with required_budget_with_buffer#0 in current definition for 6 blocks +debug: Added fee_source#0 to Phi node: let fee_source#1: uint64 = φ(fee_source#0 <- block@0) in block@0 +debug: Created Phi assignment: let fee_source#2: uint64 = undefined while trying to resolve 'fee_source' in block@6 +debug: Added fee_source#1 to Phi node: let fee_source#2: uint64 = φ(fee_source#1 <- block@3) in block@3 +debug: Added fee_source#1 to Phi node: let fee_source#2: uint64 = φ(fee_source#1 <- block@3, fee_source#1 <- block@4) in block@4 +debug: Added fee_source#1 to Phi node: let fee_source#2: uint64 = φ(fee_source#1 <- block@3, fee_source#1 <- block@4, fee_source#1 <- block@5) in block@5 +debug: Replacing trivial Phi node: let fee_source#2: uint64 = φ(fee_source#1 <- block@3, fee_source#1 <- block@4, fee_source#1 <- block@5) (fee_source#2) with fee_source#1 +debug: Deleting Phi assignment: let fee_source#2: uint64 = φ(fee_source#1 <- block@3, fee_source#1 <- block@4, fee_source#1 <- block@5) +debug: Replaced trivial Phi node: let fee_source#2: uint64 = φ(fee_source#1 <- block@3, fee_source#1 <- block@4, fee_source#1 <- block@5) (fee_source#2) with fee_source#1 in current definition for 1 blocks +debug: Added fee_source#1 to Phi node: let fee_source#1: uint64 = φ(fee_source#0 <- block@0, fee_source#1 <- block@6) in block@6 +debug: Replacing trivial Phi node: let fee_source#1: uint64 = φ(fee_source#0 <- block@0, fee_source#1 <- block@6) (fee_source#1) with fee_source#0 +debug: Deleting Phi assignment: let fee_source#1: uint64 = φ(fee_source#0 <- block@0, fee_source#1 <- block@6) +debug: Replaced trivial Phi node: let fee_source#1: uint64 = φ(fee_source#0 <- block@0, fee_source#1 <- block@6) (fee_source#1) with fee_source#0 in current definition for 6 blocks +debug: Sealing block@7 +debug: Terminated block@7 +debug: Building IR for function _puya_lib.bytes_.is_substring +debug: Sealing block@0 +debug: Terminated block@0 +debug: Looking for 'start' in an unsealed block creating an incomplete Phi: block@1 +debug: Created Phi assignment: let start#1: uint64 = undefined while trying to resolve 'start' in block@1 +debug: Looking for 'item' in an unsealed block creating an incomplete Phi: block@1 +debug: Created Phi assignment: let item#1: bytes = undefined while trying to resolve 'item' in block@1 +debug: Looking for 'sequence' in an unsealed block creating an incomplete Phi: block@1 +debug: Created Phi assignment: let sequence#1: bytes = undefined while trying to resolve 'sequence' in block@1 +debug: Terminated block@1 +debug: Sealing block@2 +debug: Terminated block@2 +debug: Sealing block@3 +debug: Terminated block@3 +debug: Sealing block@4 +debug: Terminated block@4 +debug: Sealing block@1 +debug: Added start#0 to Phi node: let start#1: uint64 = φ(start#0 <- block@0) in block@0 +debug: Added start#2 to Phi node: let start#1: uint64 = φ(start#0 <- block@0, start#2 <- block@4) in block@4 +debug: Added item#0 to Phi node: let item#1: bytes = φ(item#0 <- block@0) in block@0 +debug: Added item#1 to Phi node: let item#1: bytes = φ(item#0 <- block@0, item#1 <- block@4) in block@4 +debug: Replacing trivial Phi node: let item#1: bytes = φ(item#0 <- block@0, item#1 <- block@4) (item#1) with item#0 +debug: Deleting Phi assignment: let item#1: bytes = φ(item#0 <- block@0, item#1 <- block@4) +debug: Replaced trivial Phi node: let item#1: bytes = φ(item#0 <- block@0, item#1 <- block@4) (item#1) with item#0 in current definition for 3 blocks +debug: Added sequence#0 to Phi node: let sequence#1: bytes = φ(sequence#0 <- block@0) in block@0 +debug: Added sequence#1 to Phi node: let sequence#1: bytes = φ(sequence#0 <- block@0, sequence#1 <- block@4) in block@4 +debug: Replacing trivial Phi node: let sequence#1: bytes = φ(sequence#0 <- block@0, sequence#1 <- block@4) (sequence#1) with sequence#0 +debug: Deleting Phi assignment: let sequence#1: bytes = φ(sequence#0 <- block@0, sequence#1 <- block@4) +debug: Replaced trivial Phi node: let sequence#1: bytes = φ(sequence#0 <- block@0, sequence#1 <- block@4) (sequence#1) with sequence#0 in current definition for 3 blocks +debug: Sealing block@5 +debug: Terminated block@5 +debug: Building IR for function _puya_lib.arc4.dynamic_array_pop_bit +debug: Sealing block@0 +debug: Terminated block@0 +debug: Building IR for function _puya_lib.arc4.dynamic_array_pop_fixed_size +debug: Sealing block@0 +debug: Terminated block@0 +debug: Building IR for function _puya_lib.arc4.dynamic_array_pop_byte_length_head +debug: Sealing block@0 +debug: Terminated block@0 +debug: Building IR for function _puya_lib.arc4.dynamic_array_pop_dynamic_element +debug: Sealing block@0 +debug: Terminated block@0 +debug: Looking for 'head_offset' in an unsealed block creating an incomplete Phi: block@1 +debug: Created Phi assignment: let head_offset#1: uint64 = undefined while trying to resolve 'head_offset' in block@1 +debug: Terminated block@1 +debug: Sealing block@2 +debug: Looking for 'head_and_tail' in an unsealed block creating an incomplete Phi: block@1 +debug: Created Phi assignment: let head_and_tail#1: bytes = undefined while trying to resolve 'head_and_tail' in block@1 +debug: Looking for 'new_head' in an unsealed block creating an incomplete Phi: block@1 +debug: Created Phi assignment: let new_head#1: bytes = undefined while trying to resolve 'new_head' in block@1 +debug: Terminated block@2 +debug: Sealing block@3 +debug: Terminated block@3 +debug: Sealing block@1 +debug: Added head_offset#0 to Phi node: let head_offset#1: uint64 = φ(head_offset#0 <- block@0) in block@0 +debug: Added head_offset#2 to Phi node: let head_offset#1: uint64 = φ(head_offset#0 <- block@0, head_offset#2 <- block@3) in block@3 +debug: Added head_and_tail#0 to Phi node: let head_and_tail#1: bytes = φ(head_and_tail#0 <- block@0) in block@0 +debug: Added head_and_tail#1 to Phi node: let head_and_tail#1: bytes = φ(head_and_tail#0 <- block@0, head_and_tail#1 <- block@3) in block@3 +debug: Replacing trivial Phi node: let head_and_tail#1: bytes = φ(head_and_tail#0 <- block@0, head_and_tail#1 <- block@3) (head_and_tail#1) with head_and_tail#0 +debug: Deleting Phi assignment: let head_and_tail#1: bytes = φ(head_and_tail#0 <- block@0, head_and_tail#1 <- block@3) +debug: Replaced trivial Phi node: let head_and_tail#1: bytes = φ(head_and_tail#0 <- block@0, head_and_tail#1 <- block@3) (head_and_tail#1) with head_and_tail#0 in current definition for 3 blocks +debug: Added new_head#0 to Phi node: let new_head#1: bytes = φ(new_head#0 <- block@0) in block@0 +debug: Added new_head#2 to Phi node: let new_head#1: bytes = φ(new_head#0 <- block@0, new_head#2 <- block@3) in block@3 +debug: Sealing block@4 +debug: Created Phi assignment: let length_minus_1#1: uint64 = undefined while trying to resolve 'length_minus_1' in block@1 +debug: Added length_minus_1#0 to Phi node: let length_minus_1#1: uint64 = φ(length_minus_1#0 <- block@0) in block@0 +debug: Added length_minus_1#1 to Phi node: let length_minus_1#1: uint64 = φ(length_minus_1#0 <- block@0, length_minus_1#1 <- block@3) in block@3 +debug: Replacing trivial Phi node: let length_minus_1#1: uint64 = φ(length_minus_1#0 <- block@0, length_minus_1#1 <- block@3) (length_minus_1#1) with length_minus_1#0 +debug: Deleting Phi assignment: let length_minus_1#1: uint64 = φ(length_minus_1#0 <- block@0, length_minus_1#1 <- block@3) +debug: Replaced trivial Phi node: let length_minus_1#1: uint64 = φ(length_minus_1#0 <- block@0, length_minus_1#1 <- block@3) (length_minus_1#1) with length_minus_1#0 in current definition for 3 blocks +debug: Created Phi assignment: let popped_header_offset#1: uint64 = undefined while trying to resolve 'popped_header_offset' in block@1 +debug: Added popped_header_offset#0 to Phi node: let popped_header_offset#1: uint64 = φ(popped_header_offset#0 <- block@0) in block@0 +debug: Added popped_header_offset#1 to Phi node: let popped_header_offset#1: uint64 = φ(popped_header_offset#0 <- block@0, popped_header_offset#1 <- block@3) in block@3 +debug: Replacing trivial Phi node: let popped_header_offset#1: uint64 = φ(popped_header_offset#0 <- block@0, popped_header_offset#1 <- block@3) (popped_header_offset#1) with popped_header_offset#0 +debug: Deleting Phi assignment: let popped_header_offset#1: uint64 = φ(popped_header_offset#0 <- block@0, popped_header_offset#1 <- block@3) +debug: Replaced trivial Phi node: let popped_header_offset#1: uint64 = φ(popped_header_offset#0 <- block@0, popped_header_offset#1 <- block@3) (popped_header_offset#1) with popped_header_offset#0 in current definition for 3 blocks +debug: Created Phi assignment: let popped_offset#1: uint64 = undefined while trying to resolve 'popped_offset' in block@1 +debug: Added popped_offset#0 to Phi node: let popped_offset#1: uint64 = φ(popped_offset#0 <- block@0) in block@0 +debug: Added popped_offset#1 to Phi node: let popped_offset#1: uint64 = φ(popped_offset#0 <- block@0, popped_offset#1 <- block@3) in block@3 +debug: Replacing trivial Phi node: let popped_offset#1: uint64 = φ(popped_offset#0 <- block@0, popped_offset#1 <- block@3) (popped_offset#1) with popped_offset#0 +debug: Deleting Phi assignment: let popped_offset#1: uint64 = φ(popped_offset#0 <- block@0, popped_offset#1 <- block@3) +debug: Replaced trivial Phi node: let popped_offset#1: uint64 = φ(popped_offset#0 <- block@0, popped_offset#1 <- block@3) (popped_offset#1) with popped_offset#0 in current definition for 3 blocks +debug: Created Phi assignment: let popped#1: bytes = undefined while trying to resolve 'popped' in block@1 +debug: Added popped#0 to Phi node: let popped#1: bytes = φ(popped#0 <- block@0) in block@0 +debug: Added popped#1 to Phi node: let popped#1: bytes = φ(popped#0 <- block@0, popped#1 <- block@3) in block@3 +debug: Replacing trivial Phi node: let popped#1: bytes = φ(popped#0 <- block@0, popped#1 <- block@3) (popped#1) with popped#0 +debug: Deleting Phi assignment: let popped#1: bytes = φ(popped#0 <- block@0, popped#1 <- block@3) +debug: Replaced trivial Phi node: let popped#1: bytes = φ(popped#0 <- block@0, popped#1 <- block@3) (popped#1) with popped#0 in current definition for 3 blocks +debug: Terminated block@4 +debug: Building IR for function _puya_lib.arc4.dynamic_array_concat_bits +debug: Sealing block@0 +debug: Terminated block@0 +debug: Sealing block@1 +debug: Terminated block@1 +debug: Sealing block@2 +debug: Created Phi assignment: let array_length#1: uint64 = undefined while trying to resolve 'array_length' in block@2 +debug: Added array_length#0 to Phi node: let array_length#1: uint64 = φ(array_length#0 <- block@0) in block@0 +debug: Added array_length#0 to Phi node: let array_length#1: uint64 = φ(array_length#0 <- block@0, array_length#0 <- block@1) in block@1 +debug: Replacing trivial Phi node: let array_length#1: uint64 = φ(array_length#0 <- block@0, array_length#0 <- block@1) (array_length#1) with array_length#0 +debug: Deleting Phi assignment: let array_length#1: uint64 = φ(array_length#0 <- block@0, array_length#0 <- block@1) +debug: Replaced trivial Phi node: let array_length#1: uint64 = φ(array_length#0 <- block@0, array_length#0 <- block@1) (array_length#1) with array_length#0 in current definition for 1 blocks +debug: Created Phi assignment: let is_packed#1: bool = undefined while trying to resolve 'is_packed' in block@2 +debug: Added is_packed#0 to Phi node: let is_packed#1: bool = φ(is_packed#0 <- block@0) in block@0 +debug: Added is_packed#0 to Phi node: let is_packed#1: bool = φ(is_packed#0 <- block@0, is_packed#0 <- block@1) in block@1 +debug: Replacing trivial Phi node: let is_packed#1: bool = φ(is_packed#0 <- block@0, is_packed#0 <- block@1) (is_packed#1) with is_packed#0 +debug: Deleting Phi assignment: let is_packed#1: bool = φ(is_packed#0 <- block@0, is_packed#0 <- block@1) +debug: Replaced trivial Phi node: let is_packed#1: bool = φ(is_packed#0 <- block@0, is_packed#0 <- block@1) (is_packed#1) with is_packed#0 in current definition for 1 blocks +debug: Created Phi assignment: let new_items_count#1: uint64 = undefined while trying to resolve 'new_items_count' in block@2 +debug: Added new_items_count#0 to Phi node: let new_items_count#1: uint64 = φ(new_items_count#0 <- block@0) in block@0 +debug: Added new_items_count#0 to Phi node: let new_items_count#1: uint64 = φ(new_items_count#0 <- block@0, new_items_count#0 <- block@1) in block@1 +debug: Replacing trivial Phi node: let new_items_count#1: uint64 = φ(new_items_count#0 <- block@0, new_items_count#0 <- block@1) (new_items_count#1) with new_items_count#0 +debug: Deleting Phi assignment: let new_items_count#1: uint64 = φ(new_items_count#0 <- block@0, new_items_count#0 <- block@1) +debug: Replaced trivial Phi node: let new_items_count#1: uint64 = φ(new_items_count#0 <- block@0, new_items_count#0 <- block@1) (new_items_count#1) with new_items_count#0 in current definition for 1 blocks +debug: Terminated block@2 +debug: Looking for 'i' in an unsealed block creating an incomplete Phi: block@3 +debug: Created Phi assignment: let i#1: uint64 = undefined while trying to resolve 'i' in block@3 +debug: Terminated block@3 +debug: Sealing block@4 +debug: Looking for 'result' in an unsealed block creating an incomplete Phi: block@3 +debug: Created Phi assignment: let result#2: bytes = undefined while trying to resolve 'result' in block@3 +debug: Looking for 'write_offset' in an unsealed block creating an incomplete Phi: block@3 +debug: Created Phi assignment: let write_offset#1: uint64 = undefined while trying to resolve 'write_offset' in block@3 +debug: Looking for 'new_items_bytes' in an unsealed block creating an incomplete Phi: block@3 +debug: Created Phi assignment: let new_items_bytes#1: bytes = undefined while trying to resolve 'new_items_bytes' in block@3 +debug: Terminated block@4 +debug: Sealing block@5 +debug: Terminated block@5 +debug: Sealing block@3 +debug: Added i#0 to Phi node: let i#1: uint64 = φ(i#0 <- block@2) in block@2 +debug: Added i#2 to Phi node: let i#1: uint64 = φ(i#0 <- block@2, i#2 <- block@5) in block@5 +debug: Created Phi assignment: let result#4: bytes = undefined while trying to resolve 'result' in block@2 +debug: Added result#0 to Phi node: let result#4: bytes = φ(result#0 <- block@0) in block@0 +debug: Added result#1 to Phi node: let result#4: bytes = φ(result#0 <- block@0, result#1 <- block@1) in block@1 +debug: Added result#4 to Phi node: let result#2: bytes = φ(result#4 <- block@2) in block@2 +debug: Added result#3 to Phi node: let result#2: bytes = φ(result#4 <- block@2, result#3 <- block@5) in block@5 +debug: Added write_offset#0 to Phi node: let write_offset#1: uint64 = φ(write_offset#0 <- block@2) in block@2 +debug: Added write_offset#2 to Phi node: let write_offset#1: uint64 = φ(write_offset#0 <- block@2, write_offset#2 <- block@5) in block@5 +debug: Created Phi assignment: let new_items_bytes#2: bytes = undefined while trying to resolve 'new_items_bytes' in block@2 +debug: Added new_items_bytes#0 to Phi node: let new_items_bytes#2: bytes = φ(new_items_bytes#0 <- block@0) in block@0 +debug: Added new_items_bytes#0 to Phi node: let new_items_bytes#2: bytes = φ(new_items_bytes#0 <- block@0, new_items_bytes#0 <- block@1) in block@1 +debug: Replacing trivial Phi node: let new_items_bytes#2: bytes = φ(new_items_bytes#0 <- block@0, new_items_bytes#0 <- block@1) (new_items_bytes#2) with new_items_bytes#0 +debug: Deleting Phi assignment: let new_items_bytes#2: bytes = φ(new_items_bytes#0 <- block@0, new_items_bytes#0 <- block@1) +debug: Replaced trivial Phi node: let new_items_bytes#2: bytes = φ(new_items_bytes#0 <- block@0, new_items_bytes#0 <- block@1) (new_items_bytes#2) with new_items_bytes#0 in current definition for 1 blocks +debug: Added new_items_bytes#0 to Phi node: let new_items_bytes#1: bytes = φ(new_items_bytes#0 <- block@2) in block@2 +debug: Added new_items_bytes#1 to Phi node: let new_items_bytes#1: bytes = φ(new_items_bytes#0 <- block@2, new_items_bytes#1 <- block@5) in block@5 +debug: Replacing trivial Phi node: let new_items_bytes#1: bytes = φ(new_items_bytes#0 <- block@2, new_items_bytes#1 <- block@5) (new_items_bytes#1) with new_items_bytes#0 +debug: Deleting Phi assignment: let new_items_bytes#1: bytes = φ(new_items_bytes#0 <- block@2, new_items_bytes#1 <- block@5) +debug: Replaced trivial Phi node: let new_items_bytes#1: bytes = φ(new_items_bytes#0 <- block@2, new_items_bytes#1 <- block@5) (new_items_bytes#1) with new_items_bytes#0 in current definition for 3 blocks +debug: Sealing block@6 +debug: Terminated block@6 +debug: Building IR for function _puya_lib.arc4.dynamic_array_concat_byte_length_head +debug: Sealing block@0 +debug: Terminated block@0 +debug: Building IR for function _puya_lib.arc4.dynamic_array_concat_dynamic_element +debug: Sealing block@0 +debug: Terminated block@0 +debug: Looking for 'head_offset' in an unsealed block creating an incomplete Phi: block@1 +debug: Created Phi assignment: let head_offset#1: uint64 = undefined while trying to resolve 'head_offset' in block@1 +debug: Terminated block@1 +debug: Sealing block@2 +debug: Looking for 'array_head_and_tail' in an unsealed block creating an incomplete Phi: block@1 +debug: Created Phi assignment: let array_head_and_tail#1: bytes = undefined while trying to resolve 'array_head_and_tail' in block@1 +debug: Looking for 'new_head' in an unsealed block creating an incomplete Phi: block@1 +debug: Created Phi assignment: let new_head#1: bytes = undefined while trying to resolve 'new_head' in block@1 +debug: Looking for 'item_offset_adjustment' in an unsealed block creating an incomplete Phi: block@1 +debug: Created Phi assignment: let item_offset_adjustment#1: uint64 = undefined while trying to resolve 'item_offset_adjustment' in block@1 +debug: Terminated block@2 +debug: Sealing block@3 +debug: Terminated block@3 +debug: Sealing block@1 +debug: Added head_offset#0 to Phi node: let head_offset#1: uint64 = φ(head_offset#0 <- block@0) in block@0 +debug: Added head_offset#2 to Phi node: let head_offset#1: uint64 = φ(head_offset#0 <- block@0, head_offset#2 <- block@3) in block@3 +debug: Added array_head_and_tail#0 to Phi node: let array_head_and_tail#1: bytes = φ(array_head_and_tail#0 <- block@0) in block@0 +debug: Added array_head_and_tail#1 to Phi node: let array_head_and_tail#1: bytes = φ(array_head_and_tail#0 <- block@0, array_head_and_tail#1 <- block@3) in block@3 +debug: Replacing trivial Phi node: let array_head_and_tail#1: bytes = φ(array_head_and_tail#0 <- block@0, array_head_and_tail#1 <- block@3) (array_head_and_tail#1) with array_head_and_tail#0 +debug: Deleting Phi assignment: let array_head_and_tail#1: bytes = φ(array_head_and_tail#0 <- block@0, array_head_and_tail#1 <- block@3) +debug: Replaced trivial Phi node: let array_head_and_tail#1: bytes = φ(array_head_and_tail#0 <- block@0, array_head_and_tail#1 <- block@3) (array_head_and_tail#1) with array_head_and_tail#0 in current definition for 3 blocks +debug: Added new_head#0 to Phi node: let new_head#1: bytes = φ(new_head#0 <- block@0) in block@0 +debug: Added new_head#2 to Phi node: let new_head#1: bytes = φ(new_head#0 <- block@0, new_head#2 <- block@3) in block@3 +debug: Added item_offset_adjustment#0 to Phi node: let item_offset_adjustment#1: uint64 = φ(item_offset_adjustment#0 <- block@0) in block@0 +debug: Added item_offset_adjustment#1 to Phi node: let item_offset_adjustment#1: uint64 = φ(item_offset_adjustment#0 <- block@0, item_offset_adjustment#1 <- block@3) in block@3 +debug: Replacing trivial Phi node: let item_offset_adjustment#1: uint64 = φ(item_offset_adjustment#0 <- block@0, item_offset_adjustment#1 <- block@3) (item_offset_adjustment#1) with item_offset_adjustment#0 +debug: Deleting Phi assignment: let item_offset_adjustment#1: uint64 = φ(item_offset_adjustment#0 <- block@0, item_offset_adjustment#1 <- block@3) +debug: Replaced trivial Phi node: let item_offset_adjustment#1: uint64 = φ(item_offset_adjustment#0 <- block@0, item_offset_adjustment#1 <- block@3) (item_offset_adjustment#1) with item_offset_adjustment#0 in current definition for 3 blocks +debug: Sealing block@4 +debug: Created Phi assignment: let new_items_count#1: uint64 = undefined while trying to resolve 'new_items_count' in block@1 +debug: Added new_items_count#0 to Phi node: let new_items_count#1: uint64 = φ(new_items_count#0 <- block@0) in block@0 +debug: Added new_items_count#1 to Phi node: let new_items_count#1: uint64 = φ(new_items_count#0 <- block@0, new_items_count#1 <- block@3) in block@3 +debug: Replacing trivial Phi node: let new_items_count#1: uint64 = φ(new_items_count#0 <- block@0, new_items_count#1 <- block@3) (new_items_count#1) with new_items_count#0 +debug: Deleting Phi assignment: let new_items_count#1: uint64 = φ(new_items_count#0 <- block@0, new_items_count#1 <- block@3) +debug: Replaced trivial Phi node: let new_items_count#1: uint64 = φ(new_items_count#0 <- block@0, new_items_count#1 <- block@3) (new_items_count#1) with new_items_count#0 in current definition for 3 blocks +debug: Terminated block@4 +debug: Looking for 'head_offset' in an unsealed block creating an incomplete Phi: block@5 +debug: Created Phi assignment: let head_offset#4: uint64 = undefined while trying to resolve 'head_offset' in block@5 +debug: Terminated block@5 +debug: Sealing block@6 +debug: Looking for 'new_head_and_tail' in an unsealed block creating an incomplete Phi: block@5 +debug: Created Phi assignment: let new_head_and_tail#1: bytes = undefined while trying to resolve 'new_head_and_tail' in block@5 +debug: Looking for 'new_head' in an unsealed block creating an incomplete Phi: block@5 +debug: Created Phi assignment: let new_head#3: bytes = undefined while trying to resolve 'new_head' in block@5 +debug: Looking for 'item_offset_adjustment' in an unsealed block creating an incomplete Phi: block@5 +debug: Created Phi assignment: let item_offset_adjustment#3: uint64 = undefined while trying to resolve 'item_offset_adjustment' in block@5 +debug: Terminated block@6 +debug: Sealing block@7 +debug: Terminated block@7 +debug: Sealing block@5 +debug: Added head_offset#3 to Phi node: let head_offset#4: uint64 = φ(head_offset#3 <- block@4) in block@4 +debug: Added head_offset#5 to Phi node: let head_offset#4: uint64 = φ(head_offset#3 <- block@4, head_offset#5 <- block@7) in block@7 +debug: Created Phi assignment: let new_head_and_tail#2: bytes = undefined while trying to resolve 'new_head_and_tail' in block@1 +debug: Added new_head_and_tail#0 to Phi node: let new_head_and_tail#2: bytes = φ(new_head_and_tail#0 <- block@0) in block@0 +debug: Added new_head_and_tail#2 to Phi node: let new_head_and_tail#2: bytes = φ(new_head_and_tail#0 <- block@0, new_head_and_tail#2 <- block@3) in block@3 +debug: Replacing trivial Phi node: let new_head_and_tail#2: bytes = φ(new_head_and_tail#0 <- block@0, new_head_and_tail#2 <- block@3) (new_head_and_tail#2) with new_head_and_tail#0 +debug: Deleting Phi assignment: let new_head_and_tail#2: bytes = φ(new_head_and_tail#0 <- block@0, new_head_and_tail#2 <- block@3) +debug: Replaced trivial Phi node: let new_head_and_tail#2: bytes = φ(new_head_and_tail#0 <- block@0, new_head_and_tail#2 <- block@3) (new_head_and_tail#2) with new_head_and_tail#0 in current definition for 3 blocks +debug: Added new_head_and_tail#0 to Phi node: let new_head_and_tail#1: bytes = φ(new_head_and_tail#0 <- block@4) in block@4 +debug: Added new_head_and_tail#1 to Phi node: let new_head_and_tail#1: bytes = φ(new_head_and_tail#0 <- block@4, new_head_and_tail#1 <- block@7) in block@7 +debug: Replacing trivial Phi node: let new_head_and_tail#1: bytes = φ(new_head_and_tail#0 <- block@4, new_head_and_tail#1 <- block@7) (new_head_and_tail#1) with new_head_and_tail#0 +debug: Deleting Phi assignment: let new_head_and_tail#1: bytes = φ(new_head_and_tail#0 <- block@4, new_head_and_tail#1 <- block@7) +debug: Replaced trivial Phi node: let new_head_and_tail#1: bytes = φ(new_head_and_tail#0 <- block@4, new_head_and_tail#1 <- block@7) (new_head_and_tail#1) with new_head_and_tail#0 in current definition for 3 blocks +debug: Added new_head#1 to Phi node: let new_head#3: bytes = φ(new_head#1 <- block@4) in block@4 +debug: Added new_head#4 to Phi node: let new_head#3: bytes = φ(new_head#1 <- block@4, new_head#4 <- block@7) in block@7 +debug: Added item_offset_adjustment#2 to Phi node: let item_offset_adjustment#3: uint64 = φ(item_offset_adjustment#2 <- block@4) in block@4 +debug: Added item_offset_adjustment#3 to Phi node: let item_offset_adjustment#3: uint64 = φ(item_offset_adjustment#2 <- block@4, item_offset_adjustment#3 <- block@7) in block@7 +debug: Replacing trivial Phi node: let item_offset_adjustment#3: uint64 = φ(item_offset_adjustment#2 <- block@4, item_offset_adjustment#3 <- block@7) (item_offset_adjustment#3) with item_offset_adjustment#2 +debug: Deleting Phi assignment: let item_offset_adjustment#3: uint64 = φ(item_offset_adjustment#2 <- block@4, item_offset_adjustment#3 <- block@7) +debug: Replaced trivial Phi node: let item_offset_adjustment#3: uint64 = φ(item_offset_adjustment#2 <- block@4, item_offset_adjustment#3 <- block@7) (item_offset_adjustment#3) with item_offset_adjustment#2 in current definition for 3 blocks +debug: Sealing block@8 +debug: Created Phi assignment: let array_items_count#1: uint64 = undefined while trying to resolve 'array_items_count' in block@5 +debug: Created Phi assignment: let array_items_count#2: uint64 = undefined while trying to resolve 'array_items_count' in block@1 +debug: Added array_items_count#0 to Phi node: let array_items_count#2: uint64 = φ(array_items_count#0 <- block@0) in block@0 +debug: Added array_items_count#2 to Phi node: let array_items_count#2: uint64 = φ(array_items_count#0 <- block@0, array_items_count#2 <- block@3) in block@3 +debug: Replacing trivial Phi node: let array_items_count#2: uint64 = φ(array_items_count#0 <- block@0, array_items_count#2 <- block@3) (array_items_count#2) with array_items_count#0 +debug: Deleting Phi assignment: let array_items_count#2: uint64 = φ(array_items_count#0 <- block@0, array_items_count#2 <- block@3) +debug: Replaced trivial Phi node: let array_items_count#2: uint64 = φ(array_items_count#0 <- block@0, array_items_count#2 <- block@3) (array_items_count#2) with array_items_count#0 in current definition for 3 blocks +debug: Added array_items_count#0 to Phi node: let array_items_count#1: uint64 = φ(array_items_count#0 <- block@4) in block@4 +debug: Added array_items_count#1 to Phi node: let array_items_count#1: uint64 = φ(array_items_count#0 <- block@4, array_items_count#1 <- block@7) in block@7 +debug: Replacing trivial Phi node: let array_items_count#1: uint64 = φ(array_items_count#0 <- block@4, array_items_count#1 <- block@7) (array_items_count#1) with array_items_count#0 +debug: Deleting Phi assignment: let array_items_count#1: uint64 = φ(array_items_count#0 <- block@4, array_items_count#1 <- block@7) +debug: Replaced trivial Phi node: let array_items_count#1: uint64 = φ(array_items_count#0 <- block@4, array_items_count#1 <- block@7) (array_items_count#1) with array_items_count#0 in current definition for 3 blocks +debug: Created Phi assignment: let new_items_count#2: uint64 = undefined while trying to resolve 'new_items_count' in block@5 +debug: Added new_items_count#0 to Phi node: let new_items_count#2: uint64 = φ(new_items_count#0 <- block@4) in block@4 +debug: Added new_items_count#2 to Phi node: let new_items_count#2: uint64 = φ(new_items_count#0 <- block@4, new_items_count#2 <- block@7) in block@7 +debug: Replacing trivial Phi node: let new_items_count#2: uint64 = φ(new_items_count#0 <- block@4, new_items_count#2 <- block@7) (new_items_count#2) with new_items_count#0 +debug: Deleting Phi assignment: let new_items_count#2: uint64 = φ(new_items_count#0 <- block@4, new_items_count#2 <- block@7) +debug: Replaced trivial Phi node: let new_items_count#2: uint64 = φ(new_items_count#0 <- block@4, new_items_count#2 <- block@7) (new_items_count#2) with new_items_count#0 in current definition for 3 blocks +debug: Created Phi assignment: let array_head_and_tail#2: bytes = undefined while trying to resolve 'array_head_and_tail' in block@5 +debug: Added array_head_and_tail#0 to Phi node: let array_head_and_tail#2: bytes = φ(array_head_and_tail#0 <- block@4) in block@4 +debug: Added array_head_and_tail#2 to Phi node: let array_head_and_tail#2: bytes = φ(array_head_and_tail#0 <- block@4, array_head_and_tail#2 <- block@7) in block@7 +debug: Replacing trivial Phi node: let array_head_and_tail#2: bytes = φ(array_head_and_tail#0 <- block@4, array_head_and_tail#2 <- block@7) (array_head_and_tail#2) with array_head_and_tail#0 +debug: Deleting Phi assignment: let array_head_and_tail#2: bytes = φ(array_head_and_tail#0 <- block@4, array_head_and_tail#2 <- block@7) +debug: Replaced trivial Phi node: let array_head_and_tail#2: bytes = φ(array_head_and_tail#0 <- block@4, array_head_and_tail#2 <- block@7) (array_head_and_tail#2) with array_head_and_tail#0 in current definition for 3 blocks +debug: Terminated block@8 +debug: Building IR for function _puya_lib.arc4.dynamic_array_replace_byte_length_head +debug: Sealing block@0 +debug: Terminated block@0 +debug: Building IR for function _puya_lib.arc4.dynamic_array_replace_dynamic_element +debug: Sealing block@0 +debug: Terminated block@0 +debug: Building IR for function _puya_lib.arc4.static_array_replace_dynamic_element +debug: Sealing block@0 +debug: Terminated block@0 +debug: Looking for 'head_offset' in an unsealed block creating an incomplete Phi: block@1 +debug: Created Phi assignment: let head_offset#1: uint64 = undefined while trying to resolve 'head_offset' in block@1 +debug: Terminated block@1 +debug: Sealing block@2 +debug: Looking for 'new_head_and_tail' in an unsealed block creating an incomplete Phi: block@1 +debug: Created Phi assignment: let new_head_and_tail#1: bytes = undefined while trying to resolve 'new_head_and_tail' in block@1 +debug: Looking for 'new_item_length' in an unsealed block creating an incomplete Phi: block@1 +debug: Created Phi assignment: let new_item_length#1: uint64 = undefined while trying to resolve 'new_item_length' in block@1 +debug: Looking for 'original_item_length' in an unsealed block creating an incomplete Phi: block@1 +debug: Created Phi assignment: let original_item_length#1: uint64 = undefined while trying to resolve 'original_item_length' in block@1 +debug: Terminated block@2 +debug: Sealing block@3 +debug: Terminated block@3 +debug: Sealing block@1 +debug: Added head_offset#0 to Phi node: let head_offset#1: uint64 = φ(head_offset#0 <- block@0) in block@0 +debug: Added head_offset#2 to Phi node: let head_offset#1: uint64 = φ(head_offset#0 <- block@0, head_offset#2 <- block@3) in block@3 +debug: Added new_head_and_tail#0 to Phi node: let new_head_and_tail#1: bytes = φ(new_head_and_tail#0 <- block@0) in block@0 +debug: Added new_head_and_tail#2 to Phi node: let new_head_and_tail#1: bytes = φ(new_head_and_tail#0 <- block@0, new_head_and_tail#2 <- block@3) in block@3 +debug: Added new_item_length#0 to Phi node: let new_item_length#1: uint64 = φ(new_item_length#0 <- block@0) in block@0 +debug: Added new_item_length#1 to Phi node: let new_item_length#1: uint64 = φ(new_item_length#0 <- block@0, new_item_length#1 <- block@3) in block@3 +debug: Replacing trivial Phi node: let new_item_length#1: uint64 = φ(new_item_length#0 <- block@0, new_item_length#1 <- block@3) (new_item_length#1) with new_item_length#0 +debug: Deleting Phi assignment: let new_item_length#1: uint64 = φ(new_item_length#0 <- block@0, new_item_length#1 <- block@3) +debug: Replaced trivial Phi node: let new_item_length#1: uint64 = φ(new_item_length#0 <- block@0, new_item_length#1 <- block@3) (new_item_length#1) with new_item_length#0 in current definition for 3 blocks +debug: Added original_item_length#0 to Phi node: let original_item_length#1: uint64 = φ(original_item_length#0 <- block@0) in block@0 +debug: Added original_item_length#1 to Phi node: let original_item_length#1: uint64 = φ(original_item_length#0 <- block@0, original_item_length#1 <- block@3) in block@3 +debug: Replacing trivial Phi node: let original_item_length#1: uint64 = φ(original_item_length#0 <- block@0, original_item_length#1 <- block@3) (original_item_length#1) with original_item_length#0 +debug: Deleting Phi assignment: let original_item_length#1: uint64 = φ(original_item_length#0 <- block@0, original_item_length#1 <- block@3) +debug: Replaced trivial Phi node: let original_item_length#1: uint64 = φ(original_item_length#0 <- block@0, original_item_length#1 <- block@3) (original_item_length#1) with original_item_length#0 in current definition for 3 blocks +debug: Sealing block@4 +debug: Terminated block@4 +debug: Building IR for function _puya_lib.arc4.static_array_replace_byte_length_head +debug: Sealing block@0 +debug: Terminated block@0 +debug: Building IR for function _puya_lib.arc4.recalculate_head_for_elements_with_byte_length_head +debug: Sealing block@0 +debug: Terminated block@0 +debug: Looking for 'head_offset' in an unsealed block creating an incomplete Phi: block@1 +debug: Created Phi assignment: let head_offset#1: uint64 = undefined while trying to resolve 'head_offset' in block@1 +debug: Terminated block@1 +debug: Sealing block@2 +debug: Looking for 'tail_offset' in an unsealed block creating an incomplete Phi: block@1 +debug: Created Phi assignment: let tail_offset#1: uint64 = undefined while trying to resolve 'tail_offset' in block@1 +debug: Looking for 'array_head_and_tail' in an unsealed block creating an incomplete Phi: block@1 +debug: Created Phi assignment: let array_head_and_tail#1: bytes = undefined while trying to resolve 'array_head_and_tail' in block@1 +debug: Terminated block@2 +debug: Sealing block@3 +debug: Terminated block@3 +debug: Sealing block@1 +debug: Added head_offset#0 to Phi node: let head_offset#1: uint64 = φ(head_offset#0 <- block@0) in block@0 +debug: Added head_offset#3 to Phi node: let head_offset#1: uint64 = φ(head_offset#0 <- block@0, head_offset#3 <- block@3) in block@3 +debug: Added tail_offset#0 to Phi node: let tail_offset#1: uint64 = φ(tail_offset#0 <- block@0) in block@0 +debug: Added tail_offset#2 to Phi node: let tail_offset#1: uint64 = φ(tail_offset#0 <- block@0, tail_offset#2 <- block@3) in block@3 +debug: Added array_head_and_tail#0 to Phi node: let array_head_and_tail#1: bytes = φ(array_head_and_tail#0 <- block@0) in block@0 +debug: Added array_head_and_tail#2 to Phi node: let array_head_and_tail#1: bytes = φ(array_head_and_tail#0 <- block@0, array_head_and_tail#2 <- block@3) in block@3 +debug: Sealing block@4 +debug: Terminated block@4 +debug: Building IR for function test_cases.avm_12.contract.avm_12_sig +debug: Sealing block@0 +debug: Terminated block@0 +debug: removing unused subroutine _puya_lib.util.ensure_budget +debug: removing unused subroutine _puya_lib.bytes_.is_substring +debug: removing unused subroutine _puya_lib.arc4.dynamic_array_pop_bit +debug: removing unused subroutine _puya_lib.arc4.dynamic_array_pop_fixed_size +debug: removing unused subroutine _puya_lib.arc4.dynamic_array_pop_byte_length_head +debug: removing unused subroutine _puya_lib.arc4.dynamic_array_pop_dynamic_element +debug: removing unused subroutine _puya_lib.arc4.dynamic_array_concat_bits +debug: removing unused subroutine _puya_lib.arc4.dynamic_array_concat_byte_length_head +debug: removing unused subroutine _puya_lib.arc4.dynamic_array_concat_dynamic_element +debug: removing unused subroutine _puya_lib.arc4.dynamic_array_replace_byte_length_head +debug: removing unused subroutine _puya_lib.arc4.dynamic_array_replace_dynamic_element +debug: removing unused subroutine _puya_lib.arc4.static_array_replace_dynamic_element +debug: removing unused subroutine _puya_lib.arc4.static_array_replace_byte_length_head +debug: removing unused subroutine _puya_lib.arc4.recalculate_head_for_elements_with_byte_length_head +debug: Building IR for function test_cases.avm_12.contract.Contract.__puya_arc4_router__ +debug: Sealing block@0 +debug: Terminated block@0 +debug: Sealing block@1 +debug: Terminated block@1 +debug: Sealing block@2 +debug: Terminated block@2 +debug: Sealing block@3 +debug: Terminated block@3 +debug: Sealing block@4 +debug: Terminated block@4 +debug: Sealing block@5 +debug: Terminated block@5 +debug: Sealing block@6 +debug: Terminated block@6 +debug: Sealing block@7 +debug: Terminated block@7 +debug: Sealing block@8 +debug: Terminated block@8 +debug: Sealing block@9 +debug: Terminated block@9 +debug: Building IR for function test_cases.avm_12.contract.Contract.test_new_ops +debug: Sealing block@0 +debug: Terminated block@0 +debug: Building IR for function test_cases.avm_12.contract.Contract.__algopy_default_create +debug: Sealing block@0 +debug: Terminated block@0 +debug: Building IR for function algopy.arc4.ARC4Contract.approval_program +debug: Sealing block@0 +debug: Terminated block@0 +debug: removing unused subroutine _puya_lib.util.ensure_budget +debug: removing unused subroutine _puya_lib.bytes_.is_substring +debug: removing unused subroutine _puya_lib.arc4.dynamic_array_pop_bit +debug: removing unused subroutine _puya_lib.arc4.dynamic_array_pop_fixed_size +debug: removing unused subroutine _puya_lib.arc4.dynamic_array_pop_byte_length_head +debug: removing unused subroutine _puya_lib.arc4.dynamic_array_pop_dynamic_element +debug: removing unused subroutine _puya_lib.arc4.dynamic_array_concat_bits +debug: removing unused subroutine _puya_lib.arc4.dynamic_array_concat_byte_length_head +debug: removing unused subroutine _puya_lib.arc4.dynamic_array_concat_dynamic_element +debug: removing unused subroutine _puya_lib.arc4.dynamic_array_replace_byte_length_head +debug: removing unused subroutine _puya_lib.arc4.dynamic_array_replace_dynamic_element +debug: removing unused subroutine _puya_lib.arc4.static_array_replace_dynamic_element +debug: removing unused subroutine _puya_lib.arc4.static_array_replace_byte_length_head +debug: removing unused subroutine _puya_lib.arc4.recalculate_head_for_elements_with_byte_length_head +debug: Building IR for function algopy.arc4.ARC4Contract.clear_state_program +debug: Sealing block@0 +debug: Terminated block@0 +debug: removing unused subroutine _puya_lib.util.ensure_budget +debug: removing unused subroutine _puya_lib.bytes_.is_substring +debug: removing unused subroutine _puya_lib.arc4.dynamic_array_pop_bit +debug: removing unused subroutine _puya_lib.arc4.dynamic_array_pop_fixed_size +debug: removing unused subroutine _puya_lib.arc4.dynamic_array_pop_byte_length_head +debug: removing unused subroutine _puya_lib.arc4.dynamic_array_pop_dynamic_element +debug: removing unused subroutine _puya_lib.arc4.dynamic_array_concat_bits +debug: removing unused subroutine _puya_lib.arc4.dynamic_array_concat_byte_length_head +debug: removing unused subroutine _puya_lib.arc4.dynamic_array_concat_dynamic_element +debug: removing unused subroutine _puya_lib.arc4.dynamic_array_replace_byte_length_head +debug: removing unused subroutine _puya_lib.arc4.dynamic_array_replace_dynamic_element +debug: removing unused subroutine _puya_lib.arc4.static_array_replace_dynamic_element +debug: removing unused subroutine _puya_lib.arc4.static_array_replace_byte_length_head +debug: removing unused subroutine _puya_lib.arc4.recalculate_head_for_elements_with_byte_length_head +info: optimizing lsig program of test_cases.avm_12.contract.avm_12_sig at level 2 +debug: Begin optimization pass 1/100 +debug: Optimizing subroutine test_cases.avm_12.contract.avm_12_sig +debug: Optimizer: Perform Subroutine Inlining +debug: Optimizer: Split Parallel Copies +debug: Optimizer: Constant Replacer +debug: Optimizer: Copy Propagation +debug: Optimizer: Intrinsic Simplifier +debug: Don't know how to simplify sumhash512 of 0x +debug: Optimizer: Elide Itxn Field Calls +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: No optimizations performed in pass 1, ending loop +debug: Performing SSA IR destructuring for test_cases.avm_12.contract.avm_12_sig +debug: Converting to CSSA +debug: Removing Phi nodes +debug: Coalescing local variables in test_cases.avm_12.contract.avm_12_sig using strategy RootOperandGrouping +debug: Coalescing resulted in 0 replacement/s +debug: Sequentializing parallel copies in test_cases.avm_12.contract.avm_12_sig +debug: Performing post-SSA optimizations at level 2 +debug: Output IR to avm_12/out_O2/avm_12_sig.ir/avm_12_sig.0.destructured.ir +debug: Inserted main.ops[2]: 'l-store-copy tmp%0#0 0' +debug: Replaced main.ops[4]: 'v-load tmp%0#0' with 'l-load tmp%0#0' +debug: Inserted main.ops[6]: 'l-store-copy tmp%1#0 0' +debug: Replaced main.ops[8]: 'v-load tmp%1#0' with 'l-load tmp%1#0' +avm_12/contract.py:4 debug: optimizing TEAL subroutine test_cases.avm_12.contract.avm_12_sig() -> uint64: +info: optimizing approval program of test_cases.avm_12.contract.Contract at level 2 +debug: Begin optimization pass 1/100 +debug: marking single-use function test_cases.avm_12.contract.Contract.test_new_ops for inlining +debug: Optimizing subroutine algopy.arc4.ARC4Contract.approval_program +debug: Optimizer: Perform Subroutine Inlining +debug: inlining call to test_cases.avm_12.contract.Contract.__puya_arc4_router__ in algopy.arc4.ARC4Contract.approval_program +debug: Optimizer: Split Parallel Copies +debug: Optimizer: Constant Replacer +debug: Optimizer: Copy Propagation +debug: Optimizer: Intrinsic Simplifier +debug: Simplified (== tmp%3#0 NoOp) to (! tmp%3#0) +debug: Simplified (== tmp%8#0 0u) to (! tmp%8#0) +debug: Optimizer: Elide Itxn Field Calls +debug: Optimizer: Remove Unused Variables +debug: Removing unused variable tmp%1#0 +debug: Removing unused variable tmp%6#0 +debug: Optimizer: Inner Txn Field Replacer +debug: Optimizer: Replace Compiled References +debug: Optimizer: Simplify Control Ops +debug: simplifying a switch with constants into goto nth +debug: simplified terminator of block@6 from switch tmp%7#0 {0u => block@7, * => block@8} to goto_nth [block@7][tmp%7#0] else goto block@8 +debug: simplifying a goto nth with two targets into a conditional branch +debug: simplified terminator of block@6 from goto_nth [block@7][tmp%7#0] else goto block@8 to goto tmp%7#0 ? block@8 : block@7 +debug: Optimizer: Remove Linear Jump +debug: Replaced predecessor block@1 with block@0 in block@6 +debug: Replaced predecessor block@1 with block@0 in block@2 +debug: Merged linear block@1 into block@0 +debug: Replaced predecessor block@5 with block@4 in block@10 +debug: Merged linear block@5 into block@4 +debug: Replaced predecessor block@9 with block@8 in block@10 +debug: Merged linear block@9 into block@8 +debug: Optimizer: Remove Empty Blocks +debug: Removed empty block: block@4 +debug: Removed empty block: block@8 +debug: Optimizer: Remove Unreachable Blocks +debug: Optimizer: Repeated Expression Elimination +debug: Optimizing subroutine test_cases.avm_12.contract.Contract.__puya_arc4_router__ +debug: Optimizer: Perform Subroutine Inlining +debug: inlining call to test_cases.avm_12.contract.Contract.__algopy_default_create in test_cases.avm_12.contract.Contract.__puya_arc4_router__ +avm_12/contract.py:10:6 debug: inlining call to test_cases.avm_12.contract.Contract.test_new_ops in test_cases.avm_12.contract.Contract.__puya_arc4_router__ +debug: Optimizer: Split Parallel Copies +debug: Optimizer: Constant Replacer +debug: Optimizer: Copy Propagation +debug: Optimizer: Intrinsic Simplifier +debug: Simplified (== tmp%3#0 NoOp) to (! tmp%3#0) +debug: Don't know how to simplify sumhash512 of 0x +debug: Simplified (== tmp%8#0 0u) to (! tmp%8#0) +debug: Optimizer: Elide Itxn Field Calls +debug: Optimizer: Remove Unused Variables +debug: Removing unused variable tmp%1#0 +debug: Removing unused variable tmp%6#0 +debug: Removing unused variable tmp%5#1 +debug: Optimizer: Inner Txn Field Replacer +debug: Optimizer: Replace Compiled References +debug: Optimizer: Simplify Control Ops +debug: simplifying a switch with constants into goto nth +debug: simplified terminator of block@5 from switch tmp%7#0 {0u => block@6, * => block@7} to goto_nth [block@6][tmp%7#0] else goto block@7 +debug: simplifying a goto nth with two targets into a conditional branch +debug: simplified terminator of block@5 from goto_nth [block@6][tmp%7#0] else goto block@7 to goto tmp%7#0 ? block@7 : block@6 +debug: Optimizer: Remove Linear Jump +debug: Replaced predecessor block@12 with block@2 in block@13 +debug: Merged linear block@12 into block@2 +debug: Merged linear block@13 into block@2 +debug: Replaced predecessor block@4 with block@3 in block@9 +debug: Merged linear block@4 into block@3 +debug: Replaced predecessor block@10 with block@6 in block@11 +debug: Merged linear block@10 into block@6 +debug: Merged linear block@11 into block@6 +debug: Replaced predecessor block@8 with block@7 in block@9 +debug: Merged linear block@8 into block@7 +debug: Optimizer: Remove Empty Blocks +debug: Removed empty block: block@3 +debug: Removed empty block: block@7 +debug: Optimizer: Remove Unreachable Blocks +debug: Optimizer: Repeated Expression Elimination +debug: Optimizing subroutine test_cases.avm_12.contract.Contract.test_new_ops +debug: Optimizer: Perform Subroutine Inlining +debug: Optimizer: Split Parallel Copies +debug: Optimizer: Constant Replacer +debug: Optimizer: Copy Propagation +debug: Optimizer: Intrinsic Simplifier +debug: Don't know how to simplify sumhash512 of 0x +debug: Optimizer: Elide Itxn Field Calls +debug: Optimizer: Remove Unused Variables +debug: Removing unused variable tmp%5#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: Optimizing subroutine test_cases.avm_12.contract.Contract.__algopy_default_create +debug: Optimizer: Perform Subroutine Inlining +debug: Optimizer: Split Parallel Copies +debug: Optimizer: Constant Replacer +debug: Optimizer: Copy Propagation +debug: Optimizer: Intrinsic Simplifier +debug: Optimizer: Elide Itxn Field Calls +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: removing unused subroutine test_cases.avm_12.contract.Contract.__puya_arc4_router__ +debug: Begin optimization pass 2/100 +debug: marking single-use function test_cases.avm_12.contract.Contract.test_new_ops for inlining +debug: Optimizing subroutine algopy.arc4.ARC4Contract.approval_program +debug: Optimizer: Perform Subroutine Inlining +debug: inlining call to test_cases.avm_12.contract.Contract.__algopy_default_create in algopy.arc4.ARC4Contract.approval_program +avm_12/contract.py:10:6 debug: inlining call to test_cases.avm_12.contract.Contract.test_new_ops in algopy.arc4.ARC4Contract.approval_program +debug: Optimizer: Split Parallel Copies +debug: Optimizer: Constant Replacer +debug: Optimizer: Copy Propagation +debug: Optimizer: Intrinsic Simplifier +debug: Don't know how to simplify sumhash512 of 0x +debug: Optimizer: Elide Itxn Field Calls +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: Replaced predecessor block@14 with block@3 in block@15 +debug: Merged linear block@14 into block@3 +debug: Replaced predecessor block@15 with block@3 in block@11 +debug: Merged linear block@15 into block@3 +debug: Replaced predecessor block@12 with block@7 in block@13 +debug: Merged linear block@12 into block@7 +debug: Replaced predecessor block@13 with block@7 in block@11 +debug: Merged linear block@13 into block@7 +debug: Optimizer: Remove Empty Blocks +debug: Optimizer: Remove Unreachable Blocks +debug: Optimizer: Repeated Expression Elimination +debug: Optimizing subroutine test_cases.avm_12.contract.Contract.test_new_ops +debug: Optimizer: Perform Subroutine Inlining +debug: Optimizer: Split Parallel Copies +debug: Optimizer: Constant Replacer +debug: Optimizer: Copy Propagation +debug: Optimizer: Intrinsic Simplifier +debug: Don't know how to simplify sumhash512 of 0x +debug: Optimizer: Elide Itxn Field Calls +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: Optimizing subroutine test_cases.avm_12.contract.Contract.__algopy_default_create +debug: Optimizer: Perform Subroutine Inlining +debug: Optimizer: Split Parallel Copies +debug: Optimizer: Constant Replacer +debug: Optimizer: Copy Propagation +debug: Optimizer: Intrinsic Simplifier +debug: Optimizer: Elide Itxn Field Calls +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: removing unused subroutine test_cases.avm_12.contract.Contract.test_new_ops +debug: removing unused subroutine test_cases.avm_12.contract.Contract.__algopy_default_create +debug: Begin optimization pass 3/100 +debug: Optimizing subroutine algopy.arc4.ARC4Contract.approval_program +debug: Optimizer: Perform Subroutine Inlining +debug: Optimizer: Split Parallel Copies +debug: Optimizer: Constant Replacer +debug: Optimizer: Copy Propagation +debug: Optimizer: Intrinsic Simplifier +debug: Don't know how to simplify sumhash512 of 0x +debug: Optimizer: Elide Itxn Field Calls +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: No optimizations performed in pass 3, ending loop +debug: Performing SSA IR destructuring for algopy.arc4.ARC4Contract.approval_program +debug: Converting to CSSA +debug: Removing Phi nodes +debug: Coalescing local variables in algopy.arc4.ARC4Contract.approval_program using strategy RootOperandGrouping +debug: Coalescing test_cases.avm_12.contract.Contract.__puya_arc4_router__%0#0 with [test_cases.avm_12.contract.Contract.__puya_arc4_router__%0#1, test_cases.avm_12.contract.Contract.__puya_arc4_router__%0#2] +debug: Coalescing tmp%0#0 with [tmp%0#3] +debug: Coalescing resulted in 8 replacement/s +debug: Sequentializing parallel copies in algopy.arc4.ARC4Contract.approval_program +debug: Performing post-SSA optimizations at level 2 +debug: Output IR to avm_12/out_O2/Contract.ir/Contract.approval.0.destructured.ir +info: optimizing clear program of test_cases.avm_12.contract.Contract at level 2 +debug: Begin optimization pass 1/100 +debug: Optimizing subroutine algopy.arc4.ARC4Contract.clear_state_program +debug: Optimizer: Perform Subroutine Inlining +debug: Optimizer: Split Parallel Copies +debug: Optimizer: Constant Replacer +debug: Optimizer: Copy Propagation +debug: Optimizer: Intrinsic Simplifier +debug: Optimizer: Elide Itxn Field Calls +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: No optimizations performed in pass 1, ending loop +debug: Performing SSA IR destructuring for algopy.arc4.ARC4Contract.clear_state_program +debug: Converting to CSSA +debug: Removing Phi nodes +debug: Coalescing local variables in algopy.arc4.ARC4Contract.clear_state_program using strategy RootOperandGrouping +debug: Coalescing resulted in 0 replacement/s +debug: Sequentializing parallel copies in algopy.arc4.ARC4Contract.clear_state_program +debug: Performing post-SSA optimizations at level 2 +debug: Output IR to avm_12/out_O2/Contract.ir/Contract.clear.0.destructured.ir +debug: Inserted main.ops[1]: 'l-store-copy tmp%0#1 0' +debug: Replaced main.ops[3]: 'v-load tmp%0#1' with 'l-load tmp%0#1' +debug: Inserted main_abi_routing@2.ops[1]: 'l-store-copy tmp%2#0 0' +debug: Replaced main_abi_routing@2.ops[4]: 'v-load tmp%2#0' with 'l-load tmp%2#0' +debug: Inserted main_test_new_ops_route@3.ops[1]: 'l-store-copy tmp%3#0 0' +debug: Replaced main_test_new_ops_route@3.ops[3]: 'v-load tmp%3#0' with 'l-load tmp%3#0' +debug: Inserted main_test_new_ops_route@3.ops[5]: 'l-store-copy tmp%4#0 0' +debug: Replaced main_test_new_ops_route@3.ops[7]: 'v-load tmp%4#0' with 'l-load tmp%4#0' +debug: Inserted main_test_new_ops_route@3.ops[10]: 'l-store-copy tmp%5#0 0' +debug: Replaced main_test_new_ops_route@3.ops[12]: 'v-load tmp%5#0' with 'l-load tmp%5#0' +debug: Inserted main_test_new_ops_route@3.ops[21]: 'l-store-copy tmp%1#0 0' +debug: Replaced main_test_new_ops_route@3.ops[23]: 'v-load tmp%1#0' with 'l-load tmp%1#0' +debug: Inserted main_test_new_ops_route@3.ops[25]: 'l-store-copy tmp%2#1 0' +debug: Replaced main_test_new_ops_route@3.ops[27]: 'v-load tmp%2#1' with 'l-load tmp%2#1' +debug: Inserted main_test_new_ops_route@3.ops[31]: 'l-store-copy tmp%3#1 0' +debug: Replaced main_test_new_ops_route@3.ops[33]: 'v-load tmp%3#1' with 'l-load tmp%3#1' +debug: Inserted main_test_new_ops_route@3.ops[35]: 'l-store-copy tmp%4#1 0' +debug: Replaced main_test_new_ops_route@3.ops[37]: 'v-load tmp%4#1' with 'l-load tmp%4#1' +debug: Inserted main_test_new_ops_route@3.ops[40]: 'l-store-copy test_cases.avm_12.contract.Contract.__puya_arc4_router__%0#0 0' +debug: Replaced main_test_new_ops_route@3.ops[42]: 'v-load test_cases.avm_12.contract.Contract.__puya_arc4_router__%0#0' with 'l-load test_cases.avm_12.contract.Contract.__puya_arc4_router__%0#0' +debug: Inserted main_test_new_ops_route@3.ops[16]: 'l-store-copy tmp%0#2 0' +debug: Replaced main_test_new_ops_route@3.ops[20]: 'v-load tmp%0#2' with 'l-load tmp%0#2' +debug: Inserted main_bare_routing@6.ops[1]: 'l-store-copy tmp%7#0 0' +debug: Replaced main_bare_routing@6.ops[3]: 'v-load tmp%7#0' with 'l-load tmp%7#0' +debug: Inserted main___algopy_default_create@7.ops[1]: 'l-store-copy tmp%8#0 0' +debug: Replaced main___algopy_default_create@7.ops[3]: 'v-load tmp%8#0' with 'l-load tmp%8#0' +debug: Inserted main___algopy_default_create@7.ops[5]: 'l-store-copy tmp%9#0 0' +debug: Replaced main___algopy_default_create@7.ops[7]: 'v-load tmp%9#0' with 'l-load tmp%9#0' +debug: Inserted main___algopy_default_create@7.ops[10]: 'l-store-copy test_cases.avm_12.contract.Contract.__puya_arc4_router__%0#0 0' +debug: Replaced main___algopy_default_create@7.ops[12]: 'v-load test_cases.avm_12.contract.Contract.__puya_arc4_router__%0#0' with 'l-load test_cases.avm_12.contract.Contract.__puya_arc4_router__%0#0' +debug: Inserted main_after_if_else@10.ops[1]: 'l-store-copy test_cases.avm_12.contract.Contract.__puya_arc4_router__%0#0 0' +debug: Replaced main_after_if_else@10.ops[3]: 'v-load test_cases.avm_12.contract.Contract.__puya_arc4_router__%0#0' with 'l-load test_cases.avm_12.contract.Contract.__puya_arc4_router__%0#0' +debug: Found 3 edge set/s for algopy.arc4.ARC4Contract.approval_program +debug: Allocated 1 variable/s to x-stack: tmp%0#0 +debug: shared x-stack for main_test_new_ops_route@3 -> main_after_inlined_test_cases.avm_12.contract.Contract.__puya_arc4_router__@11: tmp%0#0 +debug: shared x-stack for main___algopy_default_create@7 -> main_after_inlined_test_cases.avm_12.contract.Contract.__puya_arc4_router__@11: tmp%0#0 +debug: shared x-stack for main_after_if_else@10 -> main_after_inlined_test_cases.avm_12.contract.Contract.__puya_arc4_router__@11: tmp%0#0 +debug: optimizing TEAL subroutine algopy.arc4.ARC4Contract.approval_program() -> uint64: +debug: replacing `b main_after_inlined_test_cases.avm_12.contract.Contract.__puya_arc4_router__@11` with `return` +debug: replacing `b main_after_inlined_test_cases.avm_12.contract.Contract.__puya_arc4_router__@11` with `return` +debug: inlining single reference block main_abi_routing@2 into main +debug: inlining single reference block main_after_inlined_test_cases.avm_12.contract.Contract.__puya_arc4_router__@11 into main_after_if_else@10 +debug: inlining single reference block main___algopy_default_create@7 into main_bare_routing@6 +debug: removing explicit jump to fall-through block main_after_if_else@10 +debug: optimizing TEAL subroutine algopy.arc4.ARC4Contract.clear_state_program() -> uint64: +info: Writing avm_12/out_O2/avm_12_sig.teal +info: Writing avm_12/out_O2/avm_12_sig.bin +info: Writing avm_12/out_O2/avm_12_sig.puya.map +info: Writing avm_12/out_O2/Contract.approval.teal +info: Writing avm_12/out_O2/Contract.clear.teal +info: Writing avm_12/out_O2/Contract.approval.bin +info: Writing avm_12/out_O2/Contract.clear.bin +info: Writing avm_12/out_O2/Contract.approval.puya.map +info: Writing avm_12/out_O2/Contract.clear.puya.map \ No newline at end of file diff --git a/test_cases/avm_12/puya_unoptimized.log b/test_cases/avm_12/puya_unoptimized.log new file mode 100644 index 0000000000..12ca23dca3 --- /dev/null +++ b/test_cases/avm_12/puya_unoptimized.log @@ -0,0 +1,639 @@ +debug: PuyaPyOptions(output_teal=True, output_source_map=True, output_arc32=False, output_arc56=False, output_ssa_ir=False, output_optimization_ir=False, output_destructured_ir=True, output_memory_ir=False, output_bytecode=True, debug_level=1, optimization_level=0, target_avm_version=10, cli_template_definitions={}, template_vars_prefix='TMPL_', locals_coalescing_strategy=, paths=['avm_12'], output_awst=False, output_awst_json=False, output_client=False, log_level=) +info: Found python prefix: /.venv +debug: Building IR for function _puya_lib.util.ensure_budget +debug: Sealing block@0 +debug: Terminated block@0 +debug: Looking for 'required_budget_with_buffer' in an unsealed block creating an incomplete Phi: block@1 +debug: Created Phi assignment: let required_budget_with_buffer#1: uint64 = undefined while trying to resolve 'required_budget_with_buffer' in block@1 +debug: Terminated block@1 +debug: Sealing block@2 +debug: Looking for 'fee_source' in an unsealed block creating an incomplete Phi: block@1 +debug: Created Phi assignment: let fee_source#1: uint64 = undefined while trying to resolve 'fee_source' in block@1 +debug: Terminated block@2 +debug: Sealing block@3 +debug: Terminated block@3 +debug: Sealing block@4 +debug: Terminated block@4 +debug: Sealing block@5 +debug: Terminated block@5 +debug: Sealing block@6 +debug: Terminated block@6 +debug: Sealing block@1 +debug: Added required_budget_with_buffer#0 to Phi node: let required_budget_with_buffer#1: uint64 = φ(required_budget_with_buffer#0 <- block@0) in block@0 +debug: Created Phi assignment: let required_budget_with_buffer#2: uint64 = undefined while trying to resolve 'required_budget_with_buffer' in block@6 +debug: Added required_budget_with_buffer#1 to Phi node: let required_budget_with_buffer#2: uint64 = φ(required_budget_with_buffer#1 <- block@3) in block@3 +debug: Added required_budget_with_buffer#1 to Phi node: let required_budget_with_buffer#2: uint64 = φ(required_budget_with_buffer#1 <- block@3, required_budget_with_buffer#1 <- block@4) in block@4 +debug: Added required_budget_with_buffer#1 to Phi node: let required_budget_with_buffer#2: uint64 = φ(required_budget_with_buffer#1 <- block@3, required_budget_with_buffer#1 <- block@4, required_budget_with_buffer#1 <- block@5) in block@5 +debug: Replacing trivial Phi node: let required_budget_with_buffer#2: uint64 = φ(required_budget_with_buffer#1 <- block@3, required_budget_with_buffer#1 <- block@4, required_budget_with_buffer#1 <- block@5) (required_budget_with_buffer#2) with required_budget_with_buffer#1 +debug: Deleting Phi assignment: let required_budget_with_buffer#2: uint64 = φ(required_budget_with_buffer#1 <- block@3, required_budget_with_buffer#1 <- block@4, required_budget_with_buffer#1 <- block@5) +debug: Replaced trivial Phi node: let required_budget_with_buffer#2: uint64 = φ(required_budget_with_buffer#1 <- block@3, required_budget_with_buffer#1 <- block@4, required_budget_with_buffer#1 <- block@5) (required_budget_with_buffer#2) with required_budget_with_buffer#1 in current definition for 1 blocks +debug: Added required_budget_with_buffer#1 to Phi node: let required_budget_with_buffer#1: uint64 = φ(required_budget_with_buffer#0 <- block@0, required_budget_with_buffer#1 <- block@6) in block@6 +debug: Replacing trivial Phi node: let required_budget_with_buffer#1: uint64 = φ(required_budget_with_buffer#0 <- block@0, required_budget_with_buffer#1 <- block@6) (required_budget_with_buffer#1) with required_budget_with_buffer#0 +debug: Deleting Phi assignment: let required_budget_with_buffer#1: uint64 = φ(required_budget_with_buffer#0 <- block@0, required_budget_with_buffer#1 <- block@6) +debug: Replaced trivial Phi node: let required_budget_with_buffer#1: uint64 = φ(required_budget_with_buffer#0 <- block@0, required_budget_with_buffer#1 <- block@6) (required_budget_with_buffer#1) with required_budget_with_buffer#0 in current definition for 6 blocks +debug: Added fee_source#0 to Phi node: let fee_source#1: uint64 = φ(fee_source#0 <- block@0) in block@0 +debug: Created Phi assignment: let fee_source#2: uint64 = undefined while trying to resolve 'fee_source' in block@6 +debug: Added fee_source#1 to Phi node: let fee_source#2: uint64 = φ(fee_source#1 <- block@3) in block@3 +debug: Added fee_source#1 to Phi node: let fee_source#2: uint64 = φ(fee_source#1 <- block@3, fee_source#1 <- block@4) in block@4 +debug: Added fee_source#1 to Phi node: let fee_source#2: uint64 = φ(fee_source#1 <- block@3, fee_source#1 <- block@4, fee_source#1 <- block@5) in block@5 +debug: Replacing trivial Phi node: let fee_source#2: uint64 = φ(fee_source#1 <- block@3, fee_source#1 <- block@4, fee_source#1 <- block@5) (fee_source#2) with fee_source#1 +debug: Deleting Phi assignment: let fee_source#2: uint64 = φ(fee_source#1 <- block@3, fee_source#1 <- block@4, fee_source#1 <- block@5) +debug: Replaced trivial Phi node: let fee_source#2: uint64 = φ(fee_source#1 <- block@3, fee_source#1 <- block@4, fee_source#1 <- block@5) (fee_source#2) with fee_source#1 in current definition for 1 blocks +debug: Added fee_source#1 to Phi node: let fee_source#1: uint64 = φ(fee_source#0 <- block@0, fee_source#1 <- block@6) in block@6 +debug: Replacing trivial Phi node: let fee_source#1: uint64 = φ(fee_source#0 <- block@0, fee_source#1 <- block@6) (fee_source#1) with fee_source#0 +debug: Deleting Phi assignment: let fee_source#1: uint64 = φ(fee_source#0 <- block@0, fee_source#1 <- block@6) +debug: Replaced trivial Phi node: let fee_source#1: uint64 = φ(fee_source#0 <- block@0, fee_source#1 <- block@6) (fee_source#1) with fee_source#0 in current definition for 6 blocks +debug: Sealing block@7 +debug: Terminated block@7 +debug: Building IR for function _puya_lib.bytes_.is_substring +debug: Sealing block@0 +debug: Terminated block@0 +debug: Looking for 'start' in an unsealed block creating an incomplete Phi: block@1 +debug: Created Phi assignment: let start#1: uint64 = undefined while trying to resolve 'start' in block@1 +debug: Looking for 'item' in an unsealed block creating an incomplete Phi: block@1 +debug: Created Phi assignment: let item#1: bytes = undefined while trying to resolve 'item' in block@1 +debug: Looking for 'sequence' in an unsealed block creating an incomplete Phi: block@1 +debug: Created Phi assignment: let sequence#1: bytes = undefined while trying to resolve 'sequence' in block@1 +debug: Terminated block@1 +debug: Sealing block@2 +debug: Terminated block@2 +debug: Sealing block@3 +debug: Terminated block@3 +debug: Sealing block@4 +debug: Terminated block@4 +debug: Sealing block@1 +debug: Added start#0 to Phi node: let start#1: uint64 = φ(start#0 <- block@0) in block@0 +debug: Added start#2 to Phi node: let start#1: uint64 = φ(start#0 <- block@0, start#2 <- block@4) in block@4 +debug: Added item#0 to Phi node: let item#1: bytes = φ(item#0 <- block@0) in block@0 +debug: Added item#1 to Phi node: let item#1: bytes = φ(item#0 <- block@0, item#1 <- block@4) in block@4 +debug: Replacing trivial Phi node: let item#1: bytes = φ(item#0 <- block@0, item#1 <- block@4) (item#1) with item#0 +debug: Deleting Phi assignment: let item#1: bytes = φ(item#0 <- block@0, item#1 <- block@4) +debug: Replaced trivial Phi node: let item#1: bytes = φ(item#0 <- block@0, item#1 <- block@4) (item#1) with item#0 in current definition for 3 blocks +debug: Added sequence#0 to Phi node: let sequence#1: bytes = φ(sequence#0 <- block@0) in block@0 +debug: Added sequence#1 to Phi node: let sequence#1: bytes = φ(sequence#0 <- block@0, sequence#1 <- block@4) in block@4 +debug: Replacing trivial Phi node: let sequence#1: bytes = φ(sequence#0 <- block@0, sequence#1 <- block@4) (sequence#1) with sequence#0 +debug: Deleting Phi assignment: let sequence#1: bytes = φ(sequence#0 <- block@0, sequence#1 <- block@4) +debug: Replaced trivial Phi node: let sequence#1: bytes = φ(sequence#0 <- block@0, sequence#1 <- block@4) (sequence#1) with sequence#0 in current definition for 3 blocks +debug: Sealing block@5 +debug: Terminated block@5 +debug: Building IR for function _puya_lib.arc4.dynamic_array_pop_bit +debug: Sealing block@0 +debug: Terminated block@0 +debug: Building IR for function _puya_lib.arc4.dynamic_array_pop_fixed_size +debug: Sealing block@0 +debug: Terminated block@0 +debug: Building IR for function _puya_lib.arc4.dynamic_array_pop_byte_length_head +debug: Sealing block@0 +debug: Terminated block@0 +debug: Building IR for function _puya_lib.arc4.dynamic_array_pop_dynamic_element +debug: Sealing block@0 +debug: Terminated block@0 +debug: Looking for 'head_offset' in an unsealed block creating an incomplete Phi: block@1 +debug: Created Phi assignment: let head_offset#1: uint64 = undefined while trying to resolve 'head_offset' in block@1 +debug: Terminated block@1 +debug: Sealing block@2 +debug: Looking for 'head_and_tail' in an unsealed block creating an incomplete Phi: block@1 +debug: Created Phi assignment: let head_and_tail#1: bytes = undefined while trying to resolve 'head_and_tail' in block@1 +debug: Looking for 'new_head' in an unsealed block creating an incomplete Phi: block@1 +debug: Created Phi assignment: let new_head#1: bytes = undefined while trying to resolve 'new_head' in block@1 +debug: Terminated block@2 +debug: Sealing block@3 +debug: Terminated block@3 +debug: Sealing block@1 +debug: Added head_offset#0 to Phi node: let head_offset#1: uint64 = φ(head_offset#0 <- block@0) in block@0 +debug: Added head_offset#2 to Phi node: let head_offset#1: uint64 = φ(head_offset#0 <- block@0, head_offset#2 <- block@3) in block@3 +debug: Added head_and_tail#0 to Phi node: let head_and_tail#1: bytes = φ(head_and_tail#0 <- block@0) in block@0 +debug: Added head_and_tail#1 to Phi node: let head_and_tail#1: bytes = φ(head_and_tail#0 <- block@0, head_and_tail#1 <- block@3) in block@3 +debug: Replacing trivial Phi node: let head_and_tail#1: bytes = φ(head_and_tail#0 <- block@0, head_and_tail#1 <- block@3) (head_and_tail#1) with head_and_tail#0 +debug: Deleting Phi assignment: let head_and_tail#1: bytes = φ(head_and_tail#0 <- block@0, head_and_tail#1 <- block@3) +debug: Replaced trivial Phi node: let head_and_tail#1: bytes = φ(head_and_tail#0 <- block@0, head_and_tail#1 <- block@3) (head_and_tail#1) with head_and_tail#0 in current definition for 3 blocks +debug: Added new_head#0 to Phi node: let new_head#1: bytes = φ(new_head#0 <- block@0) in block@0 +debug: Added new_head#2 to Phi node: let new_head#1: bytes = φ(new_head#0 <- block@0, new_head#2 <- block@3) in block@3 +debug: Sealing block@4 +debug: Created Phi assignment: let length_minus_1#1: uint64 = undefined while trying to resolve 'length_minus_1' in block@1 +debug: Added length_minus_1#0 to Phi node: let length_minus_1#1: uint64 = φ(length_minus_1#0 <- block@0) in block@0 +debug: Added length_minus_1#1 to Phi node: let length_minus_1#1: uint64 = φ(length_minus_1#0 <- block@0, length_minus_1#1 <- block@3) in block@3 +debug: Replacing trivial Phi node: let length_minus_1#1: uint64 = φ(length_minus_1#0 <- block@0, length_minus_1#1 <- block@3) (length_minus_1#1) with length_minus_1#0 +debug: Deleting Phi assignment: let length_minus_1#1: uint64 = φ(length_minus_1#0 <- block@0, length_minus_1#1 <- block@3) +debug: Replaced trivial Phi node: let length_minus_1#1: uint64 = φ(length_minus_1#0 <- block@0, length_minus_1#1 <- block@3) (length_minus_1#1) with length_minus_1#0 in current definition for 3 blocks +debug: Created Phi assignment: let popped_header_offset#1: uint64 = undefined while trying to resolve 'popped_header_offset' in block@1 +debug: Added popped_header_offset#0 to Phi node: let popped_header_offset#1: uint64 = φ(popped_header_offset#0 <- block@0) in block@0 +debug: Added popped_header_offset#1 to Phi node: let popped_header_offset#1: uint64 = φ(popped_header_offset#0 <- block@0, popped_header_offset#1 <- block@3) in block@3 +debug: Replacing trivial Phi node: let popped_header_offset#1: uint64 = φ(popped_header_offset#0 <- block@0, popped_header_offset#1 <- block@3) (popped_header_offset#1) with popped_header_offset#0 +debug: Deleting Phi assignment: let popped_header_offset#1: uint64 = φ(popped_header_offset#0 <- block@0, popped_header_offset#1 <- block@3) +debug: Replaced trivial Phi node: let popped_header_offset#1: uint64 = φ(popped_header_offset#0 <- block@0, popped_header_offset#1 <- block@3) (popped_header_offset#1) with popped_header_offset#0 in current definition for 3 blocks +debug: Created Phi assignment: let popped_offset#1: uint64 = undefined while trying to resolve 'popped_offset' in block@1 +debug: Added popped_offset#0 to Phi node: let popped_offset#1: uint64 = φ(popped_offset#0 <- block@0) in block@0 +debug: Added popped_offset#1 to Phi node: let popped_offset#1: uint64 = φ(popped_offset#0 <- block@0, popped_offset#1 <- block@3) in block@3 +debug: Replacing trivial Phi node: let popped_offset#1: uint64 = φ(popped_offset#0 <- block@0, popped_offset#1 <- block@3) (popped_offset#1) with popped_offset#0 +debug: Deleting Phi assignment: let popped_offset#1: uint64 = φ(popped_offset#0 <- block@0, popped_offset#1 <- block@3) +debug: Replaced trivial Phi node: let popped_offset#1: uint64 = φ(popped_offset#0 <- block@0, popped_offset#1 <- block@3) (popped_offset#1) with popped_offset#0 in current definition for 3 blocks +debug: Created Phi assignment: let popped#1: bytes = undefined while trying to resolve 'popped' in block@1 +debug: Added popped#0 to Phi node: let popped#1: bytes = φ(popped#0 <- block@0) in block@0 +debug: Added popped#1 to Phi node: let popped#1: bytes = φ(popped#0 <- block@0, popped#1 <- block@3) in block@3 +debug: Replacing trivial Phi node: let popped#1: bytes = φ(popped#0 <- block@0, popped#1 <- block@3) (popped#1) with popped#0 +debug: Deleting Phi assignment: let popped#1: bytes = φ(popped#0 <- block@0, popped#1 <- block@3) +debug: Replaced trivial Phi node: let popped#1: bytes = φ(popped#0 <- block@0, popped#1 <- block@3) (popped#1) with popped#0 in current definition for 3 blocks +debug: Terminated block@4 +debug: Building IR for function _puya_lib.arc4.dynamic_array_concat_bits +debug: Sealing block@0 +debug: Terminated block@0 +debug: Sealing block@1 +debug: Terminated block@1 +debug: Sealing block@2 +debug: Created Phi assignment: let array_length#1: uint64 = undefined while trying to resolve 'array_length' in block@2 +debug: Added array_length#0 to Phi node: let array_length#1: uint64 = φ(array_length#0 <- block@0) in block@0 +debug: Added array_length#0 to Phi node: let array_length#1: uint64 = φ(array_length#0 <- block@0, array_length#0 <- block@1) in block@1 +debug: Replacing trivial Phi node: let array_length#1: uint64 = φ(array_length#0 <- block@0, array_length#0 <- block@1) (array_length#1) with array_length#0 +debug: Deleting Phi assignment: let array_length#1: uint64 = φ(array_length#0 <- block@0, array_length#0 <- block@1) +debug: Replaced trivial Phi node: let array_length#1: uint64 = φ(array_length#0 <- block@0, array_length#0 <- block@1) (array_length#1) with array_length#0 in current definition for 1 blocks +debug: Created Phi assignment: let is_packed#1: bool = undefined while trying to resolve 'is_packed' in block@2 +debug: Added is_packed#0 to Phi node: let is_packed#1: bool = φ(is_packed#0 <- block@0) in block@0 +debug: Added is_packed#0 to Phi node: let is_packed#1: bool = φ(is_packed#0 <- block@0, is_packed#0 <- block@1) in block@1 +debug: Replacing trivial Phi node: let is_packed#1: bool = φ(is_packed#0 <- block@0, is_packed#0 <- block@1) (is_packed#1) with is_packed#0 +debug: Deleting Phi assignment: let is_packed#1: bool = φ(is_packed#0 <- block@0, is_packed#0 <- block@1) +debug: Replaced trivial Phi node: let is_packed#1: bool = φ(is_packed#0 <- block@0, is_packed#0 <- block@1) (is_packed#1) with is_packed#0 in current definition for 1 blocks +debug: Created Phi assignment: let new_items_count#1: uint64 = undefined while trying to resolve 'new_items_count' in block@2 +debug: Added new_items_count#0 to Phi node: let new_items_count#1: uint64 = φ(new_items_count#0 <- block@0) in block@0 +debug: Added new_items_count#0 to Phi node: let new_items_count#1: uint64 = φ(new_items_count#0 <- block@0, new_items_count#0 <- block@1) in block@1 +debug: Replacing trivial Phi node: let new_items_count#1: uint64 = φ(new_items_count#0 <- block@0, new_items_count#0 <- block@1) (new_items_count#1) with new_items_count#0 +debug: Deleting Phi assignment: let new_items_count#1: uint64 = φ(new_items_count#0 <- block@0, new_items_count#0 <- block@1) +debug: Replaced trivial Phi node: let new_items_count#1: uint64 = φ(new_items_count#0 <- block@0, new_items_count#0 <- block@1) (new_items_count#1) with new_items_count#0 in current definition for 1 blocks +debug: Terminated block@2 +debug: Looking for 'i' in an unsealed block creating an incomplete Phi: block@3 +debug: Created Phi assignment: let i#1: uint64 = undefined while trying to resolve 'i' in block@3 +debug: Terminated block@3 +debug: Sealing block@4 +debug: Looking for 'result' in an unsealed block creating an incomplete Phi: block@3 +debug: Created Phi assignment: let result#2: bytes = undefined while trying to resolve 'result' in block@3 +debug: Looking for 'write_offset' in an unsealed block creating an incomplete Phi: block@3 +debug: Created Phi assignment: let write_offset#1: uint64 = undefined while trying to resolve 'write_offset' in block@3 +debug: Looking for 'new_items_bytes' in an unsealed block creating an incomplete Phi: block@3 +debug: Created Phi assignment: let new_items_bytes#1: bytes = undefined while trying to resolve 'new_items_bytes' in block@3 +debug: Terminated block@4 +debug: Sealing block@5 +debug: Terminated block@5 +debug: Sealing block@3 +debug: Added i#0 to Phi node: let i#1: uint64 = φ(i#0 <- block@2) in block@2 +debug: Added i#2 to Phi node: let i#1: uint64 = φ(i#0 <- block@2, i#2 <- block@5) in block@5 +debug: Created Phi assignment: let result#4: bytes = undefined while trying to resolve 'result' in block@2 +debug: Added result#0 to Phi node: let result#4: bytes = φ(result#0 <- block@0) in block@0 +debug: Added result#1 to Phi node: let result#4: bytes = φ(result#0 <- block@0, result#1 <- block@1) in block@1 +debug: Added result#4 to Phi node: let result#2: bytes = φ(result#4 <- block@2) in block@2 +debug: Added result#3 to Phi node: let result#2: bytes = φ(result#4 <- block@2, result#3 <- block@5) in block@5 +debug: Added write_offset#0 to Phi node: let write_offset#1: uint64 = φ(write_offset#0 <- block@2) in block@2 +debug: Added write_offset#2 to Phi node: let write_offset#1: uint64 = φ(write_offset#0 <- block@2, write_offset#2 <- block@5) in block@5 +debug: Created Phi assignment: let new_items_bytes#2: bytes = undefined while trying to resolve 'new_items_bytes' in block@2 +debug: Added new_items_bytes#0 to Phi node: let new_items_bytes#2: bytes = φ(new_items_bytes#0 <- block@0) in block@0 +debug: Added new_items_bytes#0 to Phi node: let new_items_bytes#2: bytes = φ(new_items_bytes#0 <- block@0, new_items_bytes#0 <- block@1) in block@1 +debug: Replacing trivial Phi node: let new_items_bytes#2: bytes = φ(new_items_bytes#0 <- block@0, new_items_bytes#0 <- block@1) (new_items_bytes#2) with new_items_bytes#0 +debug: Deleting Phi assignment: let new_items_bytes#2: bytes = φ(new_items_bytes#0 <- block@0, new_items_bytes#0 <- block@1) +debug: Replaced trivial Phi node: let new_items_bytes#2: bytes = φ(new_items_bytes#0 <- block@0, new_items_bytes#0 <- block@1) (new_items_bytes#2) with new_items_bytes#0 in current definition for 1 blocks +debug: Added new_items_bytes#0 to Phi node: let new_items_bytes#1: bytes = φ(new_items_bytes#0 <- block@2) in block@2 +debug: Added new_items_bytes#1 to Phi node: let new_items_bytes#1: bytes = φ(new_items_bytes#0 <- block@2, new_items_bytes#1 <- block@5) in block@5 +debug: Replacing trivial Phi node: let new_items_bytes#1: bytes = φ(new_items_bytes#0 <- block@2, new_items_bytes#1 <- block@5) (new_items_bytes#1) with new_items_bytes#0 +debug: Deleting Phi assignment: let new_items_bytes#1: bytes = φ(new_items_bytes#0 <- block@2, new_items_bytes#1 <- block@5) +debug: Replaced trivial Phi node: let new_items_bytes#1: bytes = φ(new_items_bytes#0 <- block@2, new_items_bytes#1 <- block@5) (new_items_bytes#1) with new_items_bytes#0 in current definition for 3 blocks +debug: Sealing block@6 +debug: Terminated block@6 +debug: Building IR for function _puya_lib.arc4.dynamic_array_concat_byte_length_head +debug: Sealing block@0 +debug: Terminated block@0 +debug: Building IR for function _puya_lib.arc4.dynamic_array_concat_dynamic_element +debug: Sealing block@0 +debug: Terminated block@0 +debug: Looking for 'head_offset' in an unsealed block creating an incomplete Phi: block@1 +debug: Created Phi assignment: let head_offset#1: uint64 = undefined while trying to resolve 'head_offset' in block@1 +debug: Terminated block@1 +debug: Sealing block@2 +debug: Looking for 'array_head_and_tail' in an unsealed block creating an incomplete Phi: block@1 +debug: Created Phi assignment: let array_head_and_tail#1: bytes = undefined while trying to resolve 'array_head_and_tail' in block@1 +debug: Looking for 'new_head' in an unsealed block creating an incomplete Phi: block@1 +debug: Created Phi assignment: let new_head#1: bytes = undefined while trying to resolve 'new_head' in block@1 +debug: Looking for 'item_offset_adjustment' in an unsealed block creating an incomplete Phi: block@1 +debug: Created Phi assignment: let item_offset_adjustment#1: uint64 = undefined while trying to resolve 'item_offset_adjustment' in block@1 +debug: Terminated block@2 +debug: Sealing block@3 +debug: Terminated block@3 +debug: Sealing block@1 +debug: Added head_offset#0 to Phi node: let head_offset#1: uint64 = φ(head_offset#0 <- block@0) in block@0 +debug: Added head_offset#2 to Phi node: let head_offset#1: uint64 = φ(head_offset#0 <- block@0, head_offset#2 <- block@3) in block@3 +debug: Added array_head_and_tail#0 to Phi node: let array_head_and_tail#1: bytes = φ(array_head_and_tail#0 <- block@0) in block@0 +debug: Added array_head_and_tail#1 to Phi node: let array_head_and_tail#1: bytes = φ(array_head_and_tail#0 <- block@0, array_head_and_tail#1 <- block@3) in block@3 +debug: Replacing trivial Phi node: let array_head_and_tail#1: bytes = φ(array_head_and_tail#0 <- block@0, array_head_and_tail#1 <- block@3) (array_head_and_tail#1) with array_head_and_tail#0 +debug: Deleting Phi assignment: let array_head_and_tail#1: bytes = φ(array_head_and_tail#0 <- block@0, array_head_and_tail#1 <- block@3) +debug: Replaced trivial Phi node: let array_head_and_tail#1: bytes = φ(array_head_and_tail#0 <- block@0, array_head_and_tail#1 <- block@3) (array_head_and_tail#1) with array_head_and_tail#0 in current definition for 3 blocks +debug: Added new_head#0 to Phi node: let new_head#1: bytes = φ(new_head#0 <- block@0) in block@0 +debug: Added new_head#2 to Phi node: let new_head#1: bytes = φ(new_head#0 <- block@0, new_head#2 <- block@3) in block@3 +debug: Added item_offset_adjustment#0 to Phi node: let item_offset_adjustment#1: uint64 = φ(item_offset_adjustment#0 <- block@0) in block@0 +debug: Added item_offset_adjustment#1 to Phi node: let item_offset_adjustment#1: uint64 = φ(item_offset_adjustment#0 <- block@0, item_offset_adjustment#1 <- block@3) in block@3 +debug: Replacing trivial Phi node: let item_offset_adjustment#1: uint64 = φ(item_offset_adjustment#0 <- block@0, item_offset_adjustment#1 <- block@3) (item_offset_adjustment#1) with item_offset_adjustment#0 +debug: Deleting Phi assignment: let item_offset_adjustment#1: uint64 = φ(item_offset_adjustment#0 <- block@0, item_offset_adjustment#1 <- block@3) +debug: Replaced trivial Phi node: let item_offset_adjustment#1: uint64 = φ(item_offset_adjustment#0 <- block@0, item_offset_adjustment#1 <- block@3) (item_offset_adjustment#1) with item_offset_adjustment#0 in current definition for 3 blocks +debug: Sealing block@4 +debug: Created Phi assignment: let new_items_count#1: uint64 = undefined while trying to resolve 'new_items_count' in block@1 +debug: Added new_items_count#0 to Phi node: let new_items_count#1: uint64 = φ(new_items_count#0 <- block@0) in block@0 +debug: Added new_items_count#1 to Phi node: let new_items_count#1: uint64 = φ(new_items_count#0 <- block@0, new_items_count#1 <- block@3) in block@3 +debug: Replacing trivial Phi node: let new_items_count#1: uint64 = φ(new_items_count#0 <- block@0, new_items_count#1 <- block@3) (new_items_count#1) with new_items_count#0 +debug: Deleting Phi assignment: let new_items_count#1: uint64 = φ(new_items_count#0 <- block@0, new_items_count#1 <- block@3) +debug: Replaced trivial Phi node: let new_items_count#1: uint64 = φ(new_items_count#0 <- block@0, new_items_count#1 <- block@3) (new_items_count#1) with new_items_count#0 in current definition for 3 blocks +debug: Terminated block@4 +debug: Looking for 'head_offset' in an unsealed block creating an incomplete Phi: block@5 +debug: Created Phi assignment: let head_offset#4: uint64 = undefined while trying to resolve 'head_offset' in block@5 +debug: Terminated block@5 +debug: Sealing block@6 +debug: Looking for 'new_head_and_tail' in an unsealed block creating an incomplete Phi: block@5 +debug: Created Phi assignment: let new_head_and_tail#1: bytes = undefined while trying to resolve 'new_head_and_tail' in block@5 +debug: Looking for 'new_head' in an unsealed block creating an incomplete Phi: block@5 +debug: Created Phi assignment: let new_head#3: bytes = undefined while trying to resolve 'new_head' in block@5 +debug: Looking for 'item_offset_adjustment' in an unsealed block creating an incomplete Phi: block@5 +debug: Created Phi assignment: let item_offset_adjustment#3: uint64 = undefined while trying to resolve 'item_offset_adjustment' in block@5 +debug: Terminated block@6 +debug: Sealing block@7 +debug: Terminated block@7 +debug: Sealing block@5 +debug: Added head_offset#3 to Phi node: let head_offset#4: uint64 = φ(head_offset#3 <- block@4) in block@4 +debug: Added head_offset#5 to Phi node: let head_offset#4: uint64 = φ(head_offset#3 <- block@4, head_offset#5 <- block@7) in block@7 +debug: Created Phi assignment: let new_head_and_tail#2: bytes = undefined while trying to resolve 'new_head_and_tail' in block@1 +debug: Added new_head_and_tail#0 to Phi node: let new_head_and_tail#2: bytes = φ(new_head_and_tail#0 <- block@0) in block@0 +debug: Added new_head_and_tail#2 to Phi node: let new_head_and_tail#2: bytes = φ(new_head_and_tail#0 <- block@0, new_head_and_tail#2 <- block@3) in block@3 +debug: Replacing trivial Phi node: let new_head_and_tail#2: bytes = φ(new_head_and_tail#0 <- block@0, new_head_and_tail#2 <- block@3) (new_head_and_tail#2) with new_head_and_tail#0 +debug: Deleting Phi assignment: let new_head_and_tail#2: bytes = φ(new_head_and_tail#0 <- block@0, new_head_and_tail#2 <- block@3) +debug: Replaced trivial Phi node: let new_head_and_tail#2: bytes = φ(new_head_and_tail#0 <- block@0, new_head_and_tail#2 <- block@3) (new_head_and_tail#2) with new_head_and_tail#0 in current definition for 3 blocks +debug: Added new_head_and_tail#0 to Phi node: let new_head_and_tail#1: bytes = φ(new_head_and_tail#0 <- block@4) in block@4 +debug: Added new_head_and_tail#1 to Phi node: let new_head_and_tail#1: bytes = φ(new_head_and_tail#0 <- block@4, new_head_and_tail#1 <- block@7) in block@7 +debug: Replacing trivial Phi node: let new_head_and_tail#1: bytes = φ(new_head_and_tail#0 <- block@4, new_head_and_tail#1 <- block@7) (new_head_and_tail#1) with new_head_and_tail#0 +debug: Deleting Phi assignment: let new_head_and_tail#1: bytes = φ(new_head_and_tail#0 <- block@4, new_head_and_tail#1 <- block@7) +debug: Replaced trivial Phi node: let new_head_and_tail#1: bytes = φ(new_head_and_tail#0 <- block@4, new_head_and_tail#1 <- block@7) (new_head_and_tail#1) with new_head_and_tail#0 in current definition for 3 blocks +debug: Added new_head#1 to Phi node: let new_head#3: bytes = φ(new_head#1 <- block@4) in block@4 +debug: Added new_head#4 to Phi node: let new_head#3: bytes = φ(new_head#1 <- block@4, new_head#4 <- block@7) in block@7 +debug: Added item_offset_adjustment#2 to Phi node: let item_offset_adjustment#3: uint64 = φ(item_offset_adjustment#2 <- block@4) in block@4 +debug: Added item_offset_adjustment#3 to Phi node: let item_offset_adjustment#3: uint64 = φ(item_offset_adjustment#2 <- block@4, item_offset_adjustment#3 <- block@7) in block@7 +debug: Replacing trivial Phi node: let item_offset_adjustment#3: uint64 = φ(item_offset_adjustment#2 <- block@4, item_offset_adjustment#3 <- block@7) (item_offset_adjustment#3) with item_offset_adjustment#2 +debug: Deleting Phi assignment: let item_offset_adjustment#3: uint64 = φ(item_offset_adjustment#2 <- block@4, item_offset_adjustment#3 <- block@7) +debug: Replaced trivial Phi node: let item_offset_adjustment#3: uint64 = φ(item_offset_adjustment#2 <- block@4, item_offset_adjustment#3 <- block@7) (item_offset_adjustment#3) with item_offset_adjustment#2 in current definition for 3 blocks +debug: Sealing block@8 +debug: Created Phi assignment: let array_items_count#1: uint64 = undefined while trying to resolve 'array_items_count' in block@5 +debug: Created Phi assignment: let array_items_count#2: uint64 = undefined while trying to resolve 'array_items_count' in block@1 +debug: Added array_items_count#0 to Phi node: let array_items_count#2: uint64 = φ(array_items_count#0 <- block@0) in block@0 +debug: Added array_items_count#2 to Phi node: let array_items_count#2: uint64 = φ(array_items_count#0 <- block@0, array_items_count#2 <- block@3) in block@3 +debug: Replacing trivial Phi node: let array_items_count#2: uint64 = φ(array_items_count#0 <- block@0, array_items_count#2 <- block@3) (array_items_count#2) with array_items_count#0 +debug: Deleting Phi assignment: let array_items_count#2: uint64 = φ(array_items_count#0 <- block@0, array_items_count#2 <- block@3) +debug: Replaced trivial Phi node: let array_items_count#2: uint64 = φ(array_items_count#0 <- block@0, array_items_count#2 <- block@3) (array_items_count#2) with array_items_count#0 in current definition for 3 blocks +debug: Added array_items_count#0 to Phi node: let array_items_count#1: uint64 = φ(array_items_count#0 <- block@4) in block@4 +debug: Added array_items_count#1 to Phi node: let array_items_count#1: uint64 = φ(array_items_count#0 <- block@4, array_items_count#1 <- block@7) in block@7 +debug: Replacing trivial Phi node: let array_items_count#1: uint64 = φ(array_items_count#0 <- block@4, array_items_count#1 <- block@7) (array_items_count#1) with array_items_count#0 +debug: Deleting Phi assignment: let array_items_count#1: uint64 = φ(array_items_count#0 <- block@4, array_items_count#1 <- block@7) +debug: Replaced trivial Phi node: let array_items_count#1: uint64 = φ(array_items_count#0 <- block@4, array_items_count#1 <- block@7) (array_items_count#1) with array_items_count#0 in current definition for 3 blocks +debug: Created Phi assignment: let new_items_count#2: uint64 = undefined while trying to resolve 'new_items_count' in block@5 +debug: Added new_items_count#0 to Phi node: let new_items_count#2: uint64 = φ(new_items_count#0 <- block@4) in block@4 +debug: Added new_items_count#2 to Phi node: let new_items_count#2: uint64 = φ(new_items_count#0 <- block@4, new_items_count#2 <- block@7) in block@7 +debug: Replacing trivial Phi node: let new_items_count#2: uint64 = φ(new_items_count#0 <- block@4, new_items_count#2 <- block@7) (new_items_count#2) with new_items_count#0 +debug: Deleting Phi assignment: let new_items_count#2: uint64 = φ(new_items_count#0 <- block@4, new_items_count#2 <- block@7) +debug: Replaced trivial Phi node: let new_items_count#2: uint64 = φ(new_items_count#0 <- block@4, new_items_count#2 <- block@7) (new_items_count#2) with new_items_count#0 in current definition for 3 blocks +debug: Created Phi assignment: let array_head_and_tail#2: bytes = undefined while trying to resolve 'array_head_and_tail' in block@5 +debug: Added array_head_and_tail#0 to Phi node: let array_head_and_tail#2: bytes = φ(array_head_and_tail#0 <- block@4) in block@4 +debug: Added array_head_and_tail#2 to Phi node: let array_head_and_tail#2: bytes = φ(array_head_and_tail#0 <- block@4, array_head_and_tail#2 <- block@7) in block@7 +debug: Replacing trivial Phi node: let array_head_and_tail#2: bytes = φ(array_head_and_tail#0 <- block@4, array_head_and_tail#2 <- block@7) (array_head_and_tail#2) with array_head_and_tail#0 +debug: Deleting Phi assignment: let array_head_and_tail#2: bytes = φ(array_head_and_tail#0 <- block@4, array_head_and_tail#2 <- block@7) +debug: Replaced trivial Phi node: let array_head_and_tail#2: bytes = φ(array_head_and_tail#0 <- block@4, array_head_and_tail#2 <- block@7) (array_head_and_tail#2) with array_head_and_tail#0 in current definition for 3 blocks +debug: Terminated block@8 +debug: Building IR for function _puya_lib.arc4.dynamic_array_replace_byte_length_head +debug: Sealing block@0 +debug: Terminated block@0 +debug: Building IR for function _puya_lib.arc4.dynamic_array_replace_dynamic_element +debug: Sealing block@0 +debug: Terminated block@0 +debug: Building IR for function _puya_lib.arc4.static_array_replace_dynamic_element +debug: Sealing block@0 +debug: Terminated block@0 +debug: Looking for 'head_offset' in an unsealed block creating an incomplete Phi: block@1 +debug: Created Phi assignment: let head_offset#1: uint64 = undefined while trying to resolve 'head_offset' in block@1 +debug: Terminated block@1 +debug: Sealing block@2 +debug: Looking for 'new_head_and_tail' in an unsealed block creating an incomplete Phi: block@1 +debug: Created Phi assignment: let new_head_and_tail#1: bytes = undefined while trying to resolve 'new_head_and_tail' in block@1 +debug: Looking for 'new_item_length' in an unsealed block creating an incomplete Phi: block@1 +debug: Created Phi assignment: let new_item_length#1: uint64 = undefined while trying to resolve 'new_item_length' in block@1 +debug: Looking for 'original_item_length' in an unsealed block creating an incomplete Phi: block@1 +debug: Created Phi assignment: let original_item_length#1: uint64 = undefined while trying to resolve 'original_item_length' in block@1 +debug: Terminated block@2 +debug: Sealing block@3 +debug: Terminated block@3 +debug: Sealing block@1 +debug: Added head_offset#0 to Phi node: let head_offset#1: uint64 = φ(head_offset#0 <- block@0) in block@0 +debug: Added head_offset#2 to Phi node: let head_offset#1: uint64 = φ(head_offset#0 <- block@0, head_offset#2 <- block@3) in block@3 +debug: Added new_head_and_tail#0 to Phi node: let new_head_and_tail#1: bytes = φ(new_head_and_tail#0 <- block@0) in block@0 +debug: Added new_head_and_tail#2 to Phi node: let new_head_and_tail#1: bytes = φ(new_head_and_tail#0 <- block@0, new_head_and_tail#2 <- block@3) in block@3 +debug: Added new_item_length#0 to Phi node: let new_item_length#1: uint64 = φ(new_item_length#0 <- block@0) in block@0 +debug: Added new_item_length#1 to Phi node: let new_item_length#1: uint64 = φ(new_item_length#0 <- block@0, new_item_length#1 <- block@3) in block@3 +debug: Replacing trivial Phi node: let new_item_length#1: uint64 = φ(new_item_length#0 <- block@0, new_item_length#1 <- block@3) (new_item_length#1) with new_item_length#0 +debug: Deleting Phi assignment: let new_item_length#1: uint64 = φ(new_item_length#0 <- block@0, new_item_length#1 <- block@3) +debug: Replaced trivial Phi node: let new_item_length#1: uint64 = φ(new_item_length#0 <- block@0, new_item_length#1 <- block@3) (new_item_length#1) with new_item_length#0 in current definition for 3 blocks +debug: Added original_item_length#0 to Phi node: let original_item_length#1: uint64 = φ(original_item_length#0 <- block@0) in block@0 +debug: Added original_item_length#1 to Phi node: let original_item_length#1: uint64 = φ(original_item_length#0 <- block@0, original_item_length#1 <- block@3) in block@3 +debug: Replacing trivial Phi node: let original_item_length#1: uint64 = φ(original_item_length#0 <- block@0, original_item_length#1 <- block@3) (original_item_length#1) with original_item_length#0 +debug: Deleting Phi assignment: let original_item_length#1: uint64 = φ(original_item_length#0 <- block@0, original_item_length#1 <- block@3) +debug: Replaced trivial Phi node: let original_item_length#1: uint64 = φ(original_item_length#0 <- block@0, original_item_length#1 <- block@3) (original_item_length#1) with original_item_length#0 in current definition for 3 blocks +debug: Sealing block@4 +debug: Terminated block@4 +debug: Building IR for function _puya_lib.arc4.static_array_replace_byte_length_head +debug: Sealing block@0 +debug: Terminated block@0 +debug: Building IR for function _puya_lib.arc4.recalculate_head_for_elements_with_byte_length_head +debug: Sealing block@0 +debug: Terminated block@0 +debug: Looking for 'head_offset' in an unsealed block creating an incomplete Phi: block@1 +debug: Created Phi assignment: let head_offset#1: uint64 = undefined while trying to resolve 'head_offset' in block@1 +debug: Terminated block@1 +debug: Sealing block@2 +debug: Looking for 'tail_offset' in an unsealed block creating an incomplete Phi: block@1 +debug: Created Phi assignment: let tail_offset#1: uint64 = undefined while trying to resolve 'tail_offset' in block@1 +debug: Looking for 'array_head_and_tail' in an unsealed block creating an incomplete Phi: block@1 +debug: Created Phi assignment: let array_head_and_tail#1: bytes = undefined while trying to resolve 'array_head_and_tail' in block@1 +debug: Terminated block@2 +debug: Sealing block@3 +debug: Terminated block@3 +debug: Sealing block@1 +debug: Added head_offset#0 to Phi node: let head_offset#1: uint64 = φ(head_offset#0 <- block@0) in block@0 +debug: Added head_offset#3 to Phi node: let head_offset#1: uint64 = φ(head_offset#0 <- block@0, head_offset#3 <- block@3) in block@3 +debug: Added tail_offset#0 to Phi node: let tail_offset#1: uint64 = φ(tail_offset#0 <- block@0) in block@0 +debug: Added tail_offset#2 to Phi node: let tail_offset#1: uint64 = φ(tail_offset#0 <- block@0, tail_offset#2 <- block@3) in block@3 +debug: Added array_head_and_tail#0 to Phi node: let array_head_and_tail#1: bytes = φ(array_head_and_tail#0 <- block@0) in block@0 +debug: Added array_head_and_tail#2 to Phi node: let array_head_and_tail#1: bytes = φ(array_head_and_tail#0 <- block@0, array_head_and_tail#2 <- block@3) in block@3 +debug: Sealing block@4 +debug: Terminated block@4 +debug: Building IR for function test_cases.avm_12.contract.avm_12_sig +debug: Sealing block@0 +debug: Terminated block@0 +debug: removing unused subroutine _puya_lib.util.ensure_budget +debug: removing unused subroutine _puya_lib.bytes_.is_substring +debug: removing unused subroutine _puya_lib.arc4.dynamic_array_pop_bit +debug: removing unused subroutine _puya_lib.arc4.dynamic_array_pop_fixed_size +debug: removing unused subroutine _puya_lib.arc4.dynamic_array_pop_byte_length_head +debug: removing unused subroutine _puya_lib.arc4.dynamic_array_pop_dynamic_element +debug: removing unused subroutine _puya_lib.arc4.dynamic_array_concat_bits +debug: removing unused subroutine _puya_lib.arc4.dynamic_array_concat_byte_length_head +debug: removing unused subroutine _puya_lib.arc4.dynamic_array_concat_dynamic_element +debug: removing unused subroutine _puya_lib.arc4.dynamic_array_replace_byte_length_head +debug: removing unused subroutine _puya_lib.arc4.dynamic_array_replace_dynamic_element +debug: removing unused subroutine _puya_lib.arc4.static_array_replace_dynamic_element +debug: removing unused subroutine _puya_lib.arc4.static_array_replace_byte_length_head +debug: removing unused subroutine _puya_lib.arc4.recalculate_head_for_elements_with_byte_length_head +debug: Building IR for function test_cases.avm_12.contract.Contract.__puya_arc4_router__ +debug: Sealing block@0 +debug: Terminated block@0 +debug: Sealing block@1 +debug: Terminated block@1 +debug: Sealing block@2 +debug: Terminated block@2 +debug: Sealing block@3 +debug: Terminated block@3 +debug: Sealing block@4 +debug: Terminated block@4 +debug: Sealing block@5 +debug: Terminated block@5 +debug: Sealing block@6 +debug: Terminated block@6 +debug: Sealing block@7 +debug: Terminated block@7 +debug: Sealing block@8 +debug: Terminated block@8 +debug: Sealing block@9 +debug: Terminated block@9 +debug: Building IR for function test_cases.avm_12.contract.Contract.test_new_ops +debug: Sealing block@0 +debug: Terminated block@0 +debug: Building IR for function test_cases.avm_12.contract.Contract.__algopy_default_create +debug: Sealing block@0 +debug: Terminated block@0 +debug: Building IR for function algopy.arc4.ARC4Contract.approval_program +debug: Sealing block@0 +debug: Terminated block@0 +debug: removing unused subroutine _puya_lib.util.ensure_budget +debug: removing unused subroutine _puya_lib.bytes_.is_substring +debug: removing unused subroutine _puya_lib.arc4.dynamic_array_pop_bit +debug: removing unused subroutine _puya_lib.arc4.dynamic_array_pop_fixed_size +debug: removing unused subroutine _puya_lib.arc4.dynamic_array_pop_byte_length_head +debug: removing unused subroutine _puya_lib.arc4.dynamic_array_pop_dynamic_element +debug: removing unused subroutine _puya_lib.arc4.dynamic_array_concat_bits +debug: removing unused subroutine _puya_lib.arc4.dynamic_array_concat_byte_length_head +debug: removing unused subroutine _puya_lib.arc4.dynamic_array_concat_dynamic_element +debug: removing unused subroutine _puya_lib.arc4.dynamic_array_replace_byte_length_head +debug: removing unused subroutine _puya_lib.arc4.dynamic_array_replace_dynamic_element +debug: removing unused subroutine _puya_lib.arc4.static_array_replace_dynamic_element +debug: removing unused subroutine _puya_lib.arc4.static_array_replace_byte_length_head +debug: removing unused subroutine _puya_lib.arc4.recalculate_head_for_elements_with_byte_length_head +debug: Building IR for function algopy.arc4.ARC4Contract.clear_state_program +debug: Sealing block@0 +debug: Terminated block@0 +debug: removing unused subroutine _puya_lib.util.ensure_budget +debug: removing unused subroutine _puya_lib.bytes_.is_substring +debug: removing unused subroutine _puya_lib.arc4.dynamic_array_pop_bit +debug: removing unused subroutine _puya_lib.arc4.dynamic_array_pop_fixed_size +debug: removing unused subroutine _puya_lib.arc4.dynamic_array_pop_byte_length_head +debug: removing unused subroutine _puya_lib.arc4.dynamic_array_pop_dynamic_element +debug: removing unused subroutine _puya_lib.arc4.dynamic_array_concat_bits +debug: removing unused subroutine _puya_lib.arc4.dynamic_array_concat_byte_length_head +debug: removing unused subroutine _puya_lib.arc4.dynamic_array_concat_dynamic_element +debug: removing unused subroutine _puya_lib.arc4.dynamic_array_replace_byte_length_head +debug: removing unused subroutine _puya_lib.arc4.dynamic_array_replace_dynamic_element +debug: removing unused subroutine _puya_lib.arc4.static_array_replace_dynamic_element +debug: removing unused subroutine _puya_lib.arc4.static_array_replace_byte_length_head +debug: removing unused subroutine _puya_lib.arc4.recalculate_head_for_elements_with_byte_length_head +info: optimizing lsig program of test_cases.avm_12.contract.avm_12_sig at level 0 +debug: Begin optimization pass 1/100 +debug: Optimizing subroutine test_cases.avm_12.contract.avm_12_sig +debug: Optimizer: Perform Subroutine Inlining +debug: Optimizer: Split Parallel Copies +debug: Optimizer: Constant Replacer +debug: Optimizer: Remove Unused Variables +debug: Optimizer: Inner Txn Field Replacer +debug: Optimizer: Replace Compiled References +debug: No optimizations performed in pass 1, ending loop +debug: Performing SSA IR destructuring for test_cases.avm_12.contract.avm_12_sig +debug: Converting to CSSA +debug: Removing Phi nodes +debug: Coalescing local variables in test_cases.avm_12.contract.avm_12_sig using strategy RootOperandGrouping +debug: Coalescing resulted in 0 replacement/s +debug: Sequentializing parallel copies in test_cases.avm_12.contract.avm_12_sig +debug: Performing post-SSA optimizations at level 0 +debug: Output IR to avm_12/out_unoptimized/avm_12_sig.ir/avm_12_sig.0.destructured.ir +debug: Inserted main.ops[2]: 'l-store-copy tmp%0#0 0' +debug: Replaced main.ops[4]: 'v-load tmp%0#0' with 'l-load tmp%0#0' +debug: Inserted main.ops[6]: 'l-store-copy tmp%1#0 0' +debug: Replaced main.ops[8]: 'v-load tmp%1#0' with 'l-load tmp%1#0' +avm_12/contract.py:4 debug: optimizing TEAL subroutine test_cases.avm_12.contract.avm_12_sig() -> uint64: +info: optimizing approval program of test_cases.avm_12.contract.Contract at level 0 +debug: Begin optimization pass 1/100 +debug: Optimizing subroutine algopy.arc4.ARC4Contract.approval_program +debug: Optimizer: Perform Subroutine Inlining +debug: inlining call to test_cases.avm_12.contract.Contract.__puya_arc4_router__ in algopy.arc4.ARC4Contract.approval_program +debug: Optimizer: Split Parallel Copies +debug: Optimizer: Constant Replacer +debug: Optimizer: Remove Unused Variables +debug: Optimizer: Inner Txn Field Replacer +debug: Optimizer: Replace Compiled References +debug: Optimizing subroutine test_cases.avm_12.contract.Contract.__puya_arc4_router__ +debug: Optimizer: Perform Subroutine Inlining +debug: inlining call to test_cases.avm_12.contract.Contract.__algopy_default_create in test_cases.avm_12.contract.Contract.__puya_arc4_router__ +debug: Optimizer: Split Parallel Copies +debug: Optimizer: Constant Replacer +debug: Optimizer: Remove Unused Variables +debug: Optimizer: Inner Txn Field Replacer +debug: Optimizer: Replace Compiled References +debug: Optimizing subroutine test_cases.avm_12.contract.Contract.test_new_ops +debug: Optimizer: Perform Subroutine Inlining +debug: Optimizer: Split Parallel Copies +debug: Optimizer: Constant Replacer +debug: Optimizer: Remove Unused Variables +debug: Optimizer: Inner Txn Field Replacer +debug: Optimizer: Replace Compiled References +debug: Optimizing subroutine test_cases.avm_12.contract.Contract.__algopy_default_create +debug: Optimizer: Perform Subroutine Inlining +debug: Optimizer: Split Parallel Copies +debug: Optimizer: Constant Replacer +debug: Optimizer: Remove Unused Variables +debug: Optimizer: Inner Txn Field Replacer +debug: Optimizer: Replace Compiled References +debug: removing unused subroutine test_cases.avm_12.contract.Contract.__puya_arc4_router__ +debug: Begin optimization pass 2/100 +debug: Optimizing subroutine algopy.arc4.ARC4Contract.approval_program +debug: Optimizer: Perform Subroutine Inlining +debug: inlining call to test_cases.avm_12.contract.Contract.__algopy_default_create in algopy.arc4.ARC4Contract.approval_program +debug: Optimizer: Split Parallel Copies +debug: Optimizer: Constant Replacer +debug: Optimizer: Remove Unused Variables +debug: Optimizer: Inner Txn Field Replacer +debug: Optimizer: Replace Compiled References +debug: Optimizing subroutine test_cases.avm_12.contract.Contract.test_new_ops +debug: Optimizer: Perform Subroutine Inlining +debug: Optimizer: Split Parallel Copies +debug: Optimizer: Constant Replacer +debug: Optimizer: Remove Unused Variables +debug: Optimizer: Inner Txn Field Replacer +debug: Optimizer: Replace Compiled References +debug: Optimizing subroutine test_cases.avm_12.contract.Contract.__algopy_default_create +debug: Optimizer: Perform Subroutine Inlining +debug: Optimizer: Split Parallel Copies +debug: Optimizer: Constant Replacer +debug: Optimizer: Remove Unused Variables +debug: Optimizer: Inner Txn Field Replacer +debug: Optimizer: Replace Compiled References +debug: removing unused subroutine test_cases.avm_12.contract.Contract.__algopy_default_create +debug: Begin optimization pass 3/100 +debug: Optimizing subroutine algopy.arc4.ARC4Contract.approval_program +debug: Optimizer: Perform Subroutine Inlining +debug: Optimizer: Split Parallel Copies +debug: Optimizer: Constant Replacer +debug: Optimizer: Remove Unused Variables +debug: Optimizer: Inner Txn Field Replacer +debug: Optimizer: Replace Compiled References +debug: Optimizing subroutine test_cases.avm_12.contract.Contract.test_new_ops +debug: Optimizer: Perform Subroutine Inlining +debug: Optimizer: Split Parallel Copies +debug: Optimizer: Constant Replacer +debug: Optimizer: Remove Unused Variables +debug: Optimizer: Inner Txn Field Replacer +debug: Optimizer: Replace Compiled References +debug: No optimizations performed in pass 3, ending loop +debug: Performing SSA IR destructuring for algopy.arc4.ARC4Contract.approval_program +debug: Converting to CSSA +debug: Removing Phi nodes +debug: Coalescing local variables in algopy.arc4.ARC4Contract.approval_program using strategy RootOperandGrouping +debug: Coalescing test_cases.avm_12.contract.Contract.__puya_arc4_router__%0#0 with [test_cases.avm_12.contract.Contract.__puya_arc4_router__%0#1, test_cases.avm_12.contract.Contract.__puya_arc4_router__%0#2] +debug: Coalescing tmp%0#0 with [tmp%0#2] +debug: Coalescing resulted in 8 replacement/s +debug: Sequentializing parallel copies in algopy.arc4.ARC4Contract.approval_program +debug: Performing post-SSA optimizations at level 0 +debug: Performing SSA IR destructuring for test_cases.avm_12.contract.Contract.test_new_ops +debug: Converting to CSSA +debug: Removing Phi nodes +debug: Coalescing local variables in test_cases.avm_12.contract.Contract.test_new_ops using strategy RootOperandGrouping +debug: Coalescing resulted in 0 replacement/s +debug: Sequentializing parallel copies in test_cases.avm_12.contract.Contract.test_new_ops +debug: Performing post-SSA optimizations at level 0 +debug: Output IR to avm_12/out_unoptimized/Contract.ir/Contract.approval.0.destructured.ir +info: optimizing clear program of test_cases.avm_12.contract.Contract at level 0 +debug: Begin optimization pass 1/100 +debug: Optimizing subroutine algopy.arc4.ARC4Contract.clear_state_program +debug: Optimizer: Perform Subroutine Inlining +debug: Optimizer: Split Parallel Copies +debug: Optimizer: Constant Replacer +debug: Optimizer: Remove Unused Variables +debug: Optimizer: Inner Txn Field Replacer +debug: Optimizer: Replace Compiled References +debug: No optimizations performed in pass 1, ending loop +debug: Performing SSA IR destructuring for algopy.arc4.ARC4Contract.clear_state_program +debug: Converting to CSSA +debug: Removing Phi nodes +debug: Coalescing local variables in algopy.arc4.ARC4Contract.clear_state_program using strategy RootOperandGrouping +debug: Coalescing resulted in 0 replacement/s +debug: Sequentializing parallel copies in algopy.arc4.ARC4Contract.clear_state_program +debug: Performing post-SSA optimizations at level 0 +debug: Output IR to avm_12/out_unoptimized/Contract.ir/Contract.clear.0.destructured.ir +debug: Inserted main_block@1.ops[1]: 'l-store-copy tmp%0#1 0' +debug: Replaced main_block@1.ops[3]: 'v-load tmp%0#1' with 'l-load tmp%0#1' +debug: Inserted main_block@1.ops[6]: 'l-store-copy tmp%1#0 0' +debug: Replaced main_block@1.ops[8]: 'v-load tmp%1#0' with 'l-load tmp%1#0' +debug: Inserted main_abi_routing@2.ops[1]: 'l-store-copy tmp%2#0 0' +debug: Replaced main_abi_routing@2.ops[4]: 'v-load tmp%2#0' with 'l-load tmp%2#0' +debug: Inserted main_test_new_ops_route@3.ops[1]: 'l-store-copy tmp%3#0 0' +debug: Replaced main_test_new_ops_route@3.ops[3]: 'v-load tmp%3#0' with 'l-load tmp%3#0' +debug: Inserted main_test_new_ops_route@3.ops[6]: 'l-store-copy tmp%4#0 0' +debug: Replaced main_test_new_ops_route@3.ops[8]: 'v-load tmp%4#0' with 'l-load tmp%4#0' +debug: Inserted main_test_new_ops_route@3.ops[11]: 'l-store-copy tmp%5#0 0' +debug: Replaced main_test_new_ops_route@3.ops[13]: 'v-load tmp%5#0' with 'l-load tmp%5#0' +debug: Inserted main_test_new_ops_route@3.ops[16]: 'l-store-copy tmp%6#0 0' +debug: Replaced main_test_new_ops_route@3.ops[18]: 'v-load tmp%6#0' with 'l-load tmp%6#0' +debug: Inserted main_test_new_ops_route@3.ops[22]: 'l-store-copy test_cases.avm_12.contract.Contract.__puya_arc4_router__%0#0 0' +debug: Replaced main_test_new_ops_route@3.ops[24]: 'v-load test_cases.avm_12.contract.Contract.__puya_arc4_router__%0#0' with 'l-load test_cases.avm_12.contract.Contract.__puya_arc4_router__%0#0' +debug: Inserted main_bare_routing@6.ops[1]: 'l-store-copy tmp%7#0 0' +debug: Replaced main_bare_routing@6.ops[4]: 'v-load tmp%7#0' with 'l-load tmp%7#0' +debug: Inserted main___algopy_default_create@7.ops[1]: 'l-store-copy tmp%8#0 0' +debug: Replaced main___algopy_default_create@7.ops[3]: 'v-load tmp%8#0' with 'l-load tmp%8#0' +debug: Inserted main___algopy_default_create@7.ops[6]: 'l-store-copy tmp%9#0 0' +debug: Replaced main___algopy_default_create@7.ops[8]: 'v-load tmp%9#0' with 'l-load tmp%9#0' +debug: Inserted main_after_inlined_test_cases.avm_12.contract.Contract.__algopy_default_create@13.ops[1]: 'l-store-copy test_cases.avm_12.contract.Contract.__puya_arc4_router__%0#0 0' +debug: Replaced main_after_inlined_test_cases.avm_12.contract.Contract.__algopy_default_create@13.ops[3]: 'v-load test_cases.avm_12.contract.Contract.__puya_arc4_router__%0#0' with 'l-load test_cases.avm_12.contract.Contract.__puya_arc4_router__%0#0' +debug: Inserted main_after_if_else@10.ops[1]: 'l-store-copy test_cases.avm_12.contract.Contract.__puya_arc4_router__%0#0 0' +debug: Replaced main_after_if_else@10.ops[3]: 'v-load test_cases.avm_12.contract.Contract.__puya_arc4_router__%0#0' with 'l-load test_cases.avm_12.contract.Contract.__puya_arc4_router__%0#0' +debug: Inserted test_new_ops.ops[7]: 'l-store-copy tmp%1#0 0' +debug: Replaced test_new_ops.ops[9]: 'v-load tmp%1#0' with 'l-load tmp%1#0' +debug: Inserted test_new_ops.ops[11]: 'l-store-copy tmp%2#0 0' +debug: Replaced test_new_ops.ops[13]: 'v-load tmp%2#0' with 'l-load tmp%2#0' +debug: Inserted test_new_ops.ops[17]: 'l-store-copy tmp%3#0 0' +debug: Replaced test_new_ops.ops[19]: 'v-load tmp%3#0' with 'l-load tmp%3#0' +debug: Inserted test_new_ops.ops[21]: 'l-store-copy tmp%4#0 0' +debug: Replaced test_new_ops.ops[23]: 'v-load tmp%4#0' with 'l-load tmp%4#0' +debug: Inserted test_new_ops.ops[26]: 'l-store-copy tmp%5#0 0' +debug: Replaced test_new_ops.ops[28]: 'v-load tmp%5#0' with 'l-load tmp%5#0' +debug: Inserted test_new_ops.ops[2]: 'l-store-copy tmp%0#0 0' +debug: Replaced test_new_ops.ops[6]: 'v-load tmp%0#0' with 'l-load tmp%0#0' +debug: Found 10 edge set/s for algopy.arc4.ARC4Contract.approval_program +debug: Allocated 1 variable/s to x-stack: tmp%0#0 +debug: shared x-stack for main_test_new_ops_route@3 -> main_after_inlined_test_cases.avm_12.contract.Contract.__puya_arc4_router__@11: tmp%0#0 +debug: shared x-stack for main_after_if_else@10 -> main_after_inlined_test_cases.avm_12.contract.Contract.__puya_arc4_router__@11: tmp%0#0 +debug: shared x-stack for main_after_inlined_test_cases.avm_12.contract.Contract.__algopy_default_create@13 -> main_after_inlined_test_cases.avm_12.contract.Contract.__puya_arc4_router__@11: tmp%0#0 +debug: optimizing TEAL subroutine algopy.arc4.ARC4Contract.approval_program() -> uint64: +debug: removing explicit jump to fall-through block main_block@1 +debug: removing explicit jump to fall-through block main_abi_routing@2 +debug: removing explicit jump to fall-through block main_switch_case_default@4 +debug: removing explicit jump to fall-through block main_switch_case_next@5 +debug: removing explicit jump to fall-through block main_after_if_else@10 +debug: removing explicit jump to fall-through block main_after_inlined_test_cases.avm_12.contract.Contract.__puya_arc4_router__@11 +debug: removing explicit jump to fall-through block main_switch_case_default@8 +debug: removing explicit jump to fall-through block main_switch_case_next@9 +debug: removing explicit jump to fall-through block main_block@12 +debug: removing explicit jump to fall-through block main_after_inlined_test_cases.avm_12.contract.Contract.__algopy_default_create@13 +avm_12/contract.py:10 debug: optimizing TEAL subroutine test_cases.avm_12.contract.Contract.test_new_ops() -> void: +debug: optimizing TEAL subroutine algopy.arc4.ARC4Contract.clear_state_program() -> uint64: +info: Writing avm_12/out_unoptimized/avm_12_sig.teal +info: Writing avm_12/out_unoptimized/avm_12_sig.bin +info: Writing avm_12/out_unoptimized/avm_12_sig.puya.map +info: Writing avm_12/out_unoptimized/Contract.approval.teal +info: Writing avm_12/out_unoptimized/Contract.clear.teal +info: Writing avm_12/out_unoptimized/Contract.approval.bin +info: Writing avm_12/out_unoptimized/Contract.clear.bin +info: Writing avm_12/out_unoptimized/Contract.approval.puya.map +info: Writing avm_12/out_unoptimized/Contract.clear.puya.map \ No newline at end of file