diff --git a/CHANGELOG.md b/CHANGELOG.md index aaf339d44..e6d566b35 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,7 @@ # Added * Added frame pointer support for subroutine arguments, replacing the previous usage of scratch. ([#562](https://github.com/algorand/pyteal/pull/562)) +* Added frame pointer support for local ABI variables in subroutine. ([#606](https://github.com/algorand/pyteal/pull/606)) * Added `frame_pointers` property in `OptimizeOptions` to optimize away scratch slots during subroutine calls. This defaults to frame pointer usage when not specified. ([#613](https://github.com/algorand/pyteal/pull/613)) # Fixed diff --git a/pyteal/ast/abi/tuple.py b/pyteal/ast/abi/tuple.py index 2d744eeeb..94851e729 100644 --- a/pyteal/ast/abi/tuple.py +++ b/pyteal/ast/abi/tuple.py @@ -23,7 +23,7 @@ from pyteal.ast.unaryexpr import Len from pyteal.ast.binaryexpr import ExtractUint16 from pyteal.ast.naryexpr import Concat -from pyteal.ast.scratchvar import ScratchVar +from pyteal.ast.abstractvar import alloc_abstract_var from pyteal.ast.abi.type import TypeSpec, BaseType, ComputedValue from pyteal.ast.abi.bool import ( @@ -72,8 +72,8 @@ def _encode_tuple(values: Sequence[BaseType]) -> Expr: tail_offset = Uint16() tail_offset_accumulator = Uint16() - tail_holder = ScratchVar(TealType.bytes) - encoded_tail = ScratchVar(TealType.bytes) + tail_holder = alloc_abstract_var(TealType.bytes) + encoded_tail = alloc_abstract_var(TealType.bytes) firstDynamicTail = True for i, elem in enumerate(values): diff --git a/pyteal/ast/abi/type.py b/pyteal/ast/abi/type.py index 6abed2d80..718b5a010 100644 --- a/pyteal/ast/abi/type.py +++ b/pyteal/ast/abi/type.py @@ -2,10 +2,9 @@ from abc import ABC, abstractmethod from pyteal.ast.expr import Expr -from pyteal.ast.abstractvar import AbstractVar -from pyteal.ast.scratchvar import ScratchVar +from pyteal.ast.abstractvar import AbstractVar, alloc_abstract_var from pyteal.ast.seq import Seq -from pyteal.errors import TealInputError +from pyteal.errors import TealInputError, TealTypeError from pyteal.types import TealType @@ -78,7 +77,7 @@ def __init__(self, spec: TypeSpec) -> None: """Create a new BaseType.""" super().__init__() self._type_spec: Final[TypeSpec] = spec - self._stored_value: AbstractVar = ScratchVar(spec.storage_type()) + self._stored_value: AbstractVar = alloc_abstract_var(spec.storage_type()) def type_spec(self) -> TypeSpec: """Get the TypeSpec for this ABI type instance.""" @@ -216,22 +215,33 @@ def produced_type_spec(self) -> TypeSpec: return self.type_spec def store_into(self, output: BaseType) -> Expr: + from pyteal.ast.subroutine import SubroutineDeclaration + if output.type_spec() != self.produced_type_spec(): raise TealInputError( f"expected type_spec {self.produced_type_spec()} but get {output.type_spec()}" ) - declaration = self.computation.subroutine.get_declaration() - - if declaration.deferred_expr is None: - raise TealInputError( - "ABI return subroutine must have deferred_expr to be not-None." - ) - if declaration.deferred_expr.type_of() != output.type_spec().storage_type(): - raise TealInputError( - f"ABI return subroutine deferred_expr is expected to be typed {output.type_spec().storage_type()}, " - f"but has type {declaration.deferred_expr.type_of()}." - ) + # HANG NOTE! This get_declaration check applies only for pre frame pointer case + # the post frame pointer case should not apply + # need to somehow expose the context of evaluation + + declaration: SubroutineDeclaration | None = None + try: + declaration = self.computation.subroutine.get_declaration_by_option(False) + except Exception: + pass + + if declaration is not None: + if declaration.deferred_expr is None: + raise TealInputError( + "ABI return subroutine must have deferred_expr to be not-None." + ) + if declaration.deferred_expr.type_of() != output.type_spec().storage_type(): + raise TealTypeError( + declaration.deferred_expr.type_of(), + output.type_spec().storage_type(), + ) return output._stored_value.store(self.computation) diff --git a/pyteal/ast/abstractvar.py b/pyteal/ast/abstractvar.py index 0ed9bf9b2..1106e0974 100644 --- a/pyteal/ast/abstractvar.py +++ b/pyteal/ast/abstractvar.py @@ -38,3 +38,32 @@ def storage_type(self) -> TealType: AbstractVar.__module__ = "pyteal" + + +def alloc_abstract_var(stack_type: TealType) -> AbstractVar: + """Allocate abstract var over stack, or over scratch. + + This unexported function takes a TealType as value type representation over stack (or scratch), + and generates an AbstractVar instance. + It infers the proto currently being used in context of subroutine evaluation, + and swap to FrameVar to save the use of scratch slots. + + Arg: + stack_type: TealType that represents stack type. + """ + + from pyteal.ast import ScratchVar + from pyteal.ast.subroutine import SubroutineEval + from pyteal.ast.frame import FrameVar, MAX_FRAME_LOCAL_VARS + + if SubroutineEval._current_proto: + local_types = SubroutineEval._current_proto.mem_layout.local_stack_types + + # NOTE: you can have at most 128 local variables. + # len(local_types) + 1 computes the resulting length, + # should be <= 128 + if len(local_types) + 1 <= MAX_FRAME_LOCAL_VARS: + local_types.append(stack_type) + return FrameVar(SubroutineEval._current_proto, len(local_types) - 1) + + return ScratchVar(stack_type) diff --git a/pyteal/ast/frame.py b/pyteal/ast/frame.py index 904885f66..d477d2d86 100644 --- a/pyteal/ast/frame.py +++ b/pyteal/ast/frame.py @@ -1,5 +1,5 @@ from itertools import groupby -from typing import TYPE_CHECKING, Optional +from typing import TYPE_CHECKING, Optional, Final from pyteal.ast.expr import Expr from pyteal.ast.int import Int @@ -13,6 +13,9 @@ from pyteal.compiler import CompileOptions +MAX_FRAME_LOCAL_VARS: Final[int] = 128 + + class LocalTypeSegment(Expr): """An expression that allocates stack spaces for local variable. @@ -104,6 +107,14 @@ def __getitem__(self, index: int) -> TealType: def __str__(self) -> str: return f"(ProtoStackLayout: (args: {self.arg_stack_types}) (locals: {self.local_stack_types}))" + @classmethod + def from_proto(cls, proto: "Proto") -> "ProtoStackLayout": + return cls( + [TealType.anytype] * proto.num_args, + [TealType.anytype] * proto.num_returns, + proto.num_returns, + ) + def has_return(self) -> bool: return False @@ -157,6 +168,9 @@ def __init__( raise TealInputError( f"The number of returns provided to Proto must be >= 0 but {num_returns=}." ) + self.num_args = num_args + self.num_returns = num_returns + if mem_layout: if mem_layout.num_return_allocs > num_returns: raise TealInternalError( @@ -168,10 +182,10 @@ def __init__( f"The number of arguments {num_args} should match with " f"memory layout's number of arguments {len(mem_layout.arg_stack_types)}" ) + else: + mem_layout = ProtoStackLayout.from_proto(self) - self.num_args = num_args - self.num_returns = num_returns - self.mem_layout: Optional[ProtoStackLayout] = mem_layout + self.mem_layout: ProtoStackLayout = mem_layout def __teal__(self, options: "CompileOptions") -> tuple[TealBlock, TealSimpleBlock]: verifyProgramVersion( @@ -181,8 +195,6 @@ def __teal__(self, options: "CompileOptions") -> tuple[TealBlock, TealSimpleBloc ) op = TealOp(self, Op.proto, self.num_args, self.num_returns) proto_srt, proto_end = TealBlock.FromOp(options, op) - if not self.mem_layout: - return proto_srt, proto_end local_srt, local_end = self.mem_layout.__teal__(options) proto_end.setNextBlock(local_srt) return proto_srt, local_end @@ -250,7 +262,7 @@ def __init__( ): super().__init__() - target_type = inferred_type if inferred_type else TealType.anytype + target_type = inferred_type if inferred_type is not None else TealType.anytype require_type(value, target_type) self.value = value @@ -291,11 +303,7 @@ def __init__(self, under_proto: Proto, frame_index: int) -> None: super().__init__() self.proto = under_proto self.frame_index = frame_index - self.stack_type = ( - self.proto.mem_layout[frame_index] - if self.proto.mem_layout - else TealType.anytype - ) + self.stack_type = self.proto.mem_layout[frame_index] def storage_type(self) -> TealType: return self.stack_type diff --git a/pyteal/ast/frame_test.py b/pyteal/ast/frame_test.py index e58e11af7..89e3f2763 100644 --- a/pyteal/ast/frame_test.py +++ b/pyteal/ast/frame_test.py @@ -20,12 +20,19 @@ def test_proto(input_num: int, output_num: int): assert not expr.has_return() assert expr.type_of() == pt.TealType.none - expected = pt.TealSimpleBlock([pt.TealOp(expr, pt.Op.proto, input_num, output_num)]) + block = [pt.TealOp(expr, pt.Op.proto, input_num, output_num)] + if output_num > 0: + block.append(pt.TealOp(None, pt.Op.int, 0)) + if output_num > 1: + block.append(pt.TealOp(None, pt.Op.dupn, output_num - 1)) + + expected = pt.TealSimpleBlock(block) actual, _ = expr.__teal__(avm8Options) actual.addIncoming() actual = pt.TealBlock.NormalizeBlocks(actual) - assert actual == expected + with pt.TealComponent.Context.ignoreExprEquality(): + assert actual == expected def test_proto_invalid(): diff --git a/pyteal/ast/subroutine.py b/pyteal/ast/subroutine.py index eeea8950b..8235d4e49 100644 --- a/pyteal/ast/subroutine.py +++ b/pyteal/ast/subroutine.py @@ -1,15 +1,18 @@ +from contextlib import contextmanager +import algosdk.abi as sdk_abi +import warnings + from dataclasses import dataclass from docstring_parser import parse as parse_docstring from inspect import isclass, Parameter, signature, get_annotations from types import MappingProxyType, NoneType -from typing import Any, Callable, Final, Optional, TYPE_CHECKING, cast -import algosdk.abi as sdk_abi +from typing import Any, Callable, Final, Optional, TYPE_CHECKING, cast, ClassVar from pyteal.ast import abi from pyteal.ast.expr import Expr from pyteal.ast.seq import Seq from pyteal.ast.scratchvar import DynamicScratchVar, ScratchVar, ScratchSlot -from pyteal.ast.frame import Proto, FrameVar, ProtoStackLayout +from pyteal.ast.frame import FrameBury, Proto, FrameVar, ProtoStackLayout from pyteal.errors import TealInputError, TealInternalError, verifyProgramVersion from pyteal.ir import TealOp, Op, TealBlock from pyteal.types import TealType @@ -33,6 +36,10 @@ def __init__(self, subroutine_def: "SubroutineDefinition") -> None: self.type_of: Optional[TealType] = None def get_declaration(self) -> "SubroutineDeclaration": + warnings.warn( + "`get_declaration` is being deprecated: Please use `get_declaration_by_option` instead.", + DeprecationWarning, + ) return self.get_declaration_by_option(False) def get_declaration_by_option( @@ -304,7 +311,11 @@ def _validate_annotation( ) def get_declaration(self) -> "SubroutineDeclaration": - return self.declarations.get_declaration() + warnings.warn( + "`get_declaration` is being deprecated: Please use `get_declaration_by_option` instead.", + DeprecationWarning, + ) + return self.declarations.get_declaration_by_option(False) def get_declaration_by_option( self, @@ -815,6 +826,13 @@ def __call__(self, fn_implementation: Callable[..., Expr]) -> SubroutineFnWrappe Subroutine.__module__ = "pyteal" +@contextmanager +def _frame_pointer_context(proto: Proto): + tmp, SubroutineEval._current_proto = SubroutineEval._current_proto, proto + yield proto + SubroutineEval._current_proto = tmp + + @dataclass class SubroutineEval: """ @@ -889,6 +907,7 @@ class SubroutineEval: tuple[Optional[ScratchVar], ScratchVar | abi.BaseType | Expr], ] use_frame_pt: bool = False + _current_proto: ClassVar[Optional[Proto]] = None @staticmethod def var_n_loaded_scratch( @@ -1006,7 +1025,17 @@ def __call__(self, subroutine: SubroutineDefinition) -> SubroutineDeclaration: abi_output_kwargs[output_kwarg_info.name] = output_carrying_abi # Arg usage "B" supplied to build an AST from the user-defined PyTEAL function: - subroutine_body = subroutine.implementation(*loaded_args, **abi_output_kwargs) + subroutine_body: Expr + if not self.use_frame_pt: + subroutine_body = subroutine.implementation( + *loaded_args, **abi_output_kwargs + ) + else: + with _frame_pointer_context(proto): + subroutine_body = subroutine.implementation( + *loaded_args, **abi_output_kwargs + ) + if not isinstance(subroutine_body, Expr): raise TealInputError( f"Subroutine function does not return a PyTeal expression. Got type {type(subroutine_body)}." @@ -1025,6 +1054,13 @@ def __call__(self, subroutine: SubroutineDefinition) -> SubroutineDeclaration: if not self.use_frame_pt: deferred_expr = output_carrying_abi._stored_value.load() + if self.use_frame_pt: + local_size = len(proto.mem_layout.local_stack_types) + # only when we have 1 return, and with other local variables + # we use bury to bury the result to 0 index against frame pointer + if not abi_output_kwargs and proto.num_returns > 0 and local_size > 0: + deferred_expr = FrameBury(Seq(), 0, inferred_type=TealType.none) + # Arg usage "A" to be pick up and store in scratch parameters that have been placed on the stack # need to reverse order of argumentVars because the last argument will be on top of the stack diff --git a/pyteal/ast/subroutine_test.py b/pyteal/ast/subroutine_test.py index b8d3d04f5..294dcf73f 100644 --- a/pyteal/ast/subroutine_test.py +++ b/pyteal/ast/subroutine_test.py @@ -6,7 +6,7 @@ from dataclasses import dataclass import pyteal as pt -from pyteal.ast.frame import Proto +from pyteal.ast.frame import Proto, ProtoStackLayout, FrameBury, FrameDig from pyteal.ast.subroutine import ABIReturnSubroutine, SubroutineEval from pyteal.compiler.compiler import FRAME_POINTERS_VERSION @@ -1344,6 +1344,499 @@ def mySubroutine_arg_10(a1, a2, a3, a4, a5, a6, a7, a8, a9, a10): assert actual == expected +@dataclass +class LocalVariableTestCase: + input_subroutine: Callable[..., pt.Expr] + input_subroutine_return_type: pt.TealType + input_subroutine_abi_return: bool + expected_body_normal_evaluator: pt.Expr + expected_body_fp_evaluator: pt.Expr + + +def example_subroutine_no_args_no_return(): + local_scratch_var = pt.ScratchVar(pt.TealType.uint64) + local_abi_type = pt.abi.Uint64() + return pt.Seq( + local_scratch_var.store(pt.Int(1)), + local_abi_type.set(pt.Int(2)), + ) + + +def example_subroutine_no_args_uint64_return(): + local_scratch_var = pt.ScratchVar(pt.TealType.uint64) + local_abi_type = pt.abi.Uint64() + return pt.Seq( + local_scratch_var.store(pt.Int(1)), local_abi_type.set(pt.Int(2)), pt.Int(3) + ) + + +def example_subroutine_no_args_bytes_return(): + local_scratch_var = pt.ScratchVar(pt.TealType.uint64) + local_abi_type = pt.abi.Uint64() + return pt.Seq( + local_scratch_var.store(pt.Int(1)), + local_abi_type.set(pt.Int(2)), + pt.Bytes(b"abc"), + ) + + +def example_subroutine_no_args_abi_return(*, output: pt.abi.Uint64): + local_scratch_var = pt.ScratchVar(pt.TealType.uint64) + local_abi_type = pt.abi.Uint64() + return pt.Seq( + local_scratch_var.store(pt.Int(1)), + local_abi_type.set(pt.Int(2)), + output.set(pt.Int(3)), + ) + + +def example_subroutine_expr_args_uint64_return(a: pt.Expr, b: pt.Expr): + local_scratch_var = pt.ScratchVar(pt.TealType.uint64) + local_abi_type = pt.abi.Uint64() + return pt.Seq( + pt.Pop(a == pt.Len(b)), + local_scratch_var.store(pt.Int(1)), + local_abi_type.set(pt.Int(2)), + pt.Int(3), + ) + + +def example_subroutine_expr_args_bytes_return(a: pt.Expr, b: pt.Expr): + local_scratch_var = pt.ScratchVar(pt.TealType.uint64) + local_abi_type = pt.abi.Uint64() + return pt.Seq( + pt.Pop(a == pt.Len(b)), + local_scratch_var.store(pt.Int(1)), + local_abi_type.set(pt.Int(2)), + pt.Bytes(b"abc"), + ) + + +def example_subroutine_expr_args_abi_return( + a: pt.Expr, b: pt.Expr, *, output: pt.abi.StaticBytes[Literal[5]] +): + local_scratch_var = pt.ScratchVar(pt.TealType.uint64) + local_abi_type = pt.abi.Uint64() + return pt.Seq( + pt.Pop(a == pt.Len(b)), + local_scratch_var.store(pt.Int(1)), + local_abi_type.set(pt.Int(2)), + output.set(b"hello"), + ) + + +def example_subroutine_abi_args_uint64_return(a: pt.abi.Uint8, b: pt.abi.String): + local_scratch_var = pt.ScratchVar(pt.TealType.uint64) + local_abi_type = pt.abi.Uint64() + return pt.Seq( + pt.Pop(a.get() == pt.Len(b.get())), + local_scratch_var.store(pt.Int(1)), + local_abi_type.set(pt.Int(2)), + pt.Int(3), + ) + + +def example_subroutine_abi_args_bytes_return(a: pt.abi.Uint8, b: pt.abi.String): + local_scratch_var = pt.ScratchVar(pt.TealType.uint64) + local_abi_type = pt.abi.Uint64() + return pt.Seq( + pt.Pop(a.get() == pt.Len(b.get())), + local_scratch_var.store(pt.Int(1)), + local_abi_type.set(pt.Int(2)), + pt.Bytes(b"abc"), + ) + + +def example_subroutine_abi_args_abi_return( + a: pt.abi.Uint8, b: pt.abi.String, *, output: pt.abi.StaticBytes[Literal[5]] +): + local_scratch_var = pt.ScratchVar(pt.TealType.uint64) + local_abi_type = pt.abi.Uint64() + return pt.Seq( + pt.Pop(a.get() == pt.Len(b.get())), + local_scratch_var.store(pt.Int(1)), + local_abi_type.set(pt.Int(2)), + output.set(b"hello"), + ) + + +def example_subroutine_many_local_vars(): + local_abi_vars = [pt.abi.Uint64() for _ in range(200)] + return pt.Seq([v.set(pt.Int(i)) for i, v in enumerate(local_abi_vars)]) + + +@pytest.mark.parametrize( + "test_case", + [ + LocalVariableTestCase( + input_subroutine=example_subroutine_no_args_no_return, + input_subroutine_return_type=pt.TealType.none, + input_subroutine_abi_return=False, + expected_body_normal_evaluator=pt.Seq( + pt.ScratchVar().store(pt.Int(1)), + pt.abi.Uint64().set(pt.Int(2)), + ), + expected_body_fp_evaluator=pt.Seq( + Proto( + 0, + 0, + mem_layout=ProtoStackLayout( + arg_stack_types=[], + local_stack_types=[pt.TealType.uint64], + num_return_allocs=0, + ), + ), + pt.ScratchVar().store(pt.Int(1)), + FrameBury(pt.Int(2), 0), + ), + ), + LocalVariableTestCase( + input_subroutine=example_subroutine_no_args_uint64_return, + input_subroutine_return_type=pt.TealType.uint64, + input_subroutine_abi_return=False, + expected_body_normal_evaluator=pt.Seq( + pt.ScratchVar().store(pt.Int(1)), + pt.abi.Uint64().set(pt.Int(2)), + pt.Int(3), + ), + expected_body_fp_evaluator=pt.Seq( + Proto( + 0, + 1, + mem_layout=ProtoStackLayout( + arg_stack_types=[], + local_stack_types=[pt.TealType.uint64], + num_return_allocs=0, + ), + ), + pt.ScratchVar(pt.TealType.uint64).store(pt.Int(1)), + FrameBury(pt.Int(2), 0), + # overwrite 1st local variable with the return value + FrameBury(pt.Int(3), 0), + ), + ), + LocalVariableTestCase( + input_subroutine=example_subroutine_no_args_bytes_return, + input_subroutine_return_type=pt.TealType.bytes, + input_subroutine_abi_return=False, + expected_body_normal_evaluator=pt.Seq( + pt.ScratchVar().store(pt.Int(1)), + pt.abi.Uint64().set(pt.Int(2)), + pt.Bytes(b"abc"), + ), + expected_body_fp_evaluator=pt.Seq( + Proto( + 0, + 1, + mem_layout=ProtoStackLayout( + arg_stack_types=[], + local_stack_types=[pt.TealType.uint64], + num_return_allocs=0, + ), + ), + pt.ScratchVar(pt.TealType.uint64).store(pt.Int(1)), + FrameBury(pt.Int(2), 0), + # overwrite 1st local variable with the return value + FrameBury(pt.Bytes(b"abc"), 0), + ), + ), + LocalVariableTestCase( + input_subroutine=example_subroutine_no_args_abi_return, + input_subroutine_return_type=pt.TealType.none, + input_subroutine_abi_return=True, + expected_body_normal_evaluator=pt.Seq( + pt.ScratchVar().store(pt.Int(1)), + pt.abi.Uint64().set(pt.Int(2)), + (output_uint64 := pt.abi.Uint64()).set(pt.Int(3)), + output_uint64.get(), + ), + expected_body_fp_evaluator=pt.Seq( + Proto( + 0, + 1, + mem_layout=ProtoStackLayout( + arg_stack_types=[], + local_stack_types=[pt.TealType.uint64, pt.TealType.uint64], + num_return_allocs=1, + ), + ), + pt.ScratchVar(pt.TealType.uint64).store(pt.Int(1)), + FrameBury(pt.Int(2), 1), + FrameBury(pt.Int(3), 0), + ), + ), + LocalVariableTestCase( + input_subroutine=example_subroutine_expr_args_uint64_return, + input_subroutine_return_type=pt.TealType.uint64, + input_subroutine_abi_return=False, + expected_body_normal_evaluator=pt.Seq( + (arg2_expr := pt.ScratchVar()).slot.store(), + (arg1_expr := pt.ScratchVar()).slot.store(), + pt.Pop(arg1_expr.load() == pt.Len(arg2_expr.load())), + pt.ScratchVar().store(pt.Int(1)), + pt.abi.Uint64().set(pt.Int(2)), + pt.Int(3), + ), + expected_body_fp_evaluator=pt.Seq( + Proto( + 2, + 1, + mem_layout=ProtoStackLayout( + arg_stack_types=[pt.TealType.anytype, pt.TealType.anytype], + local_stack_types=[pt.TealType.uint64], + num_return_allocs=0, + ), + ), + pt.Pop(FrameDig(-2) == pt.Len(FrameDig(-1))), + pt.ScratchVar(pt.TealType.uint64).store(pt.Int(1)), + FrameBury(pt.Int(2), 0), + # overwrite 1st local variable with the return value + FrameBury(pt.Int(3), 0), + ), + ), + LocalVariableTestCase( + input_subroutine=example_subroutine_expr_args_bytes_return, + input_subroutine_return_type=pt.TealType.bytes, + input_subroutine_abi_return=False, + expected_body_normal_evaluator=pt.Seq( + (arg2_expr := pt.ScratchVar()).slot.store(), + (arg1_expr := pt.ScratchVar()).slot.store(), + pt.Pop(arg1_expr.load() == pt.Len(arg2_expr.load())), + pt.ScratchVar().store(pt.Int(1)), + pt.abi.Uint64().set(pt.Int(2)), + pt.Bytes(b"abc"), + ), + expected_body_fp_evaluator=pt.Seq( + Proto( + 2, + 1, + mem_layout=ProtoStackLayout( + arg_stack_types=[pt.TealType.anytype, pt.TealType.anytype], + local_stack_types=[pt.TealType.uint64], + num_return_allocs=0, + ), + ), + pt.Pop(FrameDig(-2) == pt.Len(FrameDig(-1))), + pt.ScratchVar(pt.TealType.uint64).store(pt.Int(1)), + FrameBury(pt.Int(2), 0), + # overwrite 1st local variable with the return value + FrameBury(pt.Bytes(b"abc"), 0), + ), + ), + LocalVariableTestCase( + input_subroutine=example_subroutine_expr_args_abi_return, + input_subroutine_return_type=pt.TealType.none, + input_subroutine_abi_return=True, + expected_body_normal_evaluator=pt.Seq( + (arg2_expr := pt.ScratchVar()).slot.store(), + (arg1_expr := pt.ScratchVar()).slot.store(), + pt.Pop(arg1_expr.load() == pt.Len(arg2_expr.load())), + pt.ScratchVar().store(pt.Int(1)), + pt.abi.Uint64().set(pt.Int(2)), + ( + output_static_bytes := pt.abi.make(pt.abi.StaticBytes[Literal[5]]) + ).set(b"hello"), + output_static_bytes.get(), + ), + expected_body_fp_evaluator=pt.Seq( + Proto( + 2, + 1, + mem_layout=ProtoStackLayout( + arg_stack_types=[pt.TealType.anytype, pt.TealType.anytype], + local_stack_types=[pt.TealType.bytes, pt.TealType.uint64], + num_return_allocs=1, + ), + ), + pt.Pop(FrameDig(-2) == pt.Len(FrameDig(-1))), + pt.ScratchVar(pt.TealType.uint64).store(pt.Int(1)), + FrameBury(pt.Int(2), 1), + FrameBury(pt.Bytes(b"hello"), 0), + ), + ), + LocalVariableTestCase( + input_subroutine=example_subroutine_abi_args_uint64_return, + input_subroutine_return_type=pt.TealType.uint64, + input_subroutine_abi_return=False, + expected_body_normal_evaluator=pt.Seq( + cast( + pt.ScratchVar, (arg_string := pt.abi.String())._stored_value + ).slot.store(), + cast( + pt.ScratchVar, (arg_uint8 := pt.abi.Uint8())._stored_value + ).slot.store(), + pt.Pop(arg_uint8.get() == pt.Len(arg_string.get())), + pt.ScratchVar().store(pt.Int(1)), + pt.abi.Uint64().set(pt.Int(2)), + pt.Int(3), + ), + expected_body_fp_evaluator=pt.Seq( + Proto( + 2, + 1, + mem_layout=ProtoStackLayout( + arg_stack_types=[pt.TealType.uint64, pt.TealType.bytes], + local_stack_types=[pt.TealType.uint64], + num_return_allocs=0, + ), + ), + pt.Pop(FrameDig(-2) == pt.Len(pt.Suffix(FrameDig(-1), pt.Int(2)))), + pt.ScratchVar(pt.TealType.uint64).store(pt.Int(1)), + FrameBury(pt.Int(2), 0), + # overwrite 1st local variable with the return value + FrameBury(pt.Int(3), 0), + ), + ), + LocalVariableTestCase( + input_subroutine=example_subroutine_abi_args_bytes_return, + input_subroutine_return_type=pt.TealType.bytes, + input_subroutine_abi_return=False, + expected_body_normal_evaluator=pt.Seq( + cast( + pt.ScratchVar, (arg_string := pt.abi.String())._stored_value + ).slot.store(), + cast( + pt.ScratchVar, (arg_uint8 := pt.abi.Uint8())._stored_value + ).slot.store(), + pt.Pop(arg_uint8.get() == pt.Len(arg_string.get())), + pt.ScratchVar().store(pt.Int(1)), + pt.abi.Uint64().set(pt.Int(2)), + pt.Bytes(b"abc"), + ), + expected_body_fp_evaluator=pt.Seq( + Proto( + 2, + 1, + mem_layout=ProtoStackLayout( + arg_stack_types=[pt.TealType.uint64, pt.TealType.bytes], + local_stack_types=[pt.TealType.uint64], + num_return_allocs=0, + ), + ), + pt.Pop(FrameDig(-2) == pt.Len(pt.Suffix(FrameDig(-1), pt.Int(2)))), + pt.ScratchVar(pt.TealType.uint64).store(pt.Int(1)), + FrameBury(pt.Int(2), 0), + # overwrite 1st local variable with the return value + FrameBury(pt.Bytes(b"abc"), 0), + ), + ), + LocalVariableTestCase( + input_subroutine=example_subroutine_abi_args_abi_return, + input_subroutine_return_type=pt.TealType.none, + input_subroutine_abi_return=True, + expected_body_normal_evaluator=pt.Seq( + cast( + pt.ScratchVar, (arg_string := pt.abi.String())._stored_value + ).slot.store(), + cast( + pt.ScratchVar, (arg_uint8 := pt.abi.Uint8())._stored_value + ).slot.store(), + pt.Pop(arg_uint8.get() == pt.Len(arg_string.get())), + pt.ScratchVar().store(pt.Int(1)), + pt.abi.Uint64().set(pt.Int(2)), + ( + output_static_bytes := pt.abi.make(pt.abi.StaticBytes[Literal[5]]) + ).set(b"hello"), + output_static_bytes.get(), + ), + expected_body_fp_evaluator=pt.Seq( + Proto( + 2, + 1, + mem_layout=ProtoStackLayout( + arg_stack_types=[pt.TealType.uint64, pt.TealType.bytes], + local_stack_types=[pt.TealType.bytes, pt.TealType.uint64], + num_return_allocs=1, + ), + ), + pt.Pop(FrameDig(-2) == pt.Len(pt.Suffix(FrameDig(-1), pt.Int(2)))), + pt.ScratchVar(pt.TealType.uint64).store(pt.Int(1)), + FrameBury(pt.Int(2), 1), + FrameBury(pt.Bytes(b"hello"), 0), + ), + ), + LocalVariableTestCase( + input_subroutine=example_subroutine_many_local_vars, + input_subroutine_return_type=pt.TealType.none, + input_subroutine_abi_return=False, + expected_body_normal_evaluator=pt.Seq( + [pt.ScratchVar().store(pt.Int(i)) for i in range(200)] + ), + expected_body_fp_evaluator=pt.Seq( + Proto( + 0, + 0, + mem_layout=ProtoStackLayout( + arg_stack_types=[], + local_stack_types=[pt.TealType.uint64] * 128, + num_return_allocs=0, + ), + ), + # 128 is the max number of frame pointer local+return vars + *[FrameBury(pt.Int(i), i) for i in range(128)], + *[pt.ScratchVar().store(pt.Int(i)) for i in range(128, 200)], + ), + ), + ], +) +def test_evaluate_subroutine_local_variables(test_case: LocalVariableTestCase): + definition = pt.SubroutineDefinition( + test_case.input_subroutine, + test_case.input_subroutine_return_type, + has_abi_output=test_case.input_subroutine_abi_return, + ) + + for evaluator, expected_body in ( + (SubroutineEval.normal_evaluator(), test_case.expected_body_normal_evaluator), + (SubroutineEval.fp_evaluator(), test_case.expected_body_fp_evaluator), + ): + declaration = evaluator(definition) + + evaluator_type = "fp" if evaluator.use_frame_pt else "normal" + failure_msg = f"assertion failed for {evaluator_type} evaluator" + + assert isinstance(declaration, pt.SubroutineDeclaration), failure_msg + assert declaration.subroutine is definition, failure_msg + + assert ( + declaration.type_of() is test_case.input_subroutine_return_type + ), failure_msg + assert declaration.has_return() is False, failure_msg + + options_v8.setSubroutine(definition) + + expected, _ = expected_body.__teal__(options_v8) + + actual, actual_end = declaration.__teal__(options_v8) + if declaration.deferred_expr is not None: + # This is a hacky way to include the deferred expression in the resulting IR. It's only + # valid if there are no retsub opcodes anywhere in the subroutine. + + for block in pt.TealBlock.Iterate(actual): + assert all( + op.op != pt.Op.retsub for op in block.ops + ), "retsub present in subroutine, test code to apply deferred expression is no longer valid" + + deferred, _ = declaration.deferred_expr.__teal__(options_v8) + actual_end.setNextBlock(deferred) + + options_v8.setSubroutine(None) + + expected.addIncoming() + expected = pt.TealBlock.NormalizeBlocks(expected) + + actual.addIncoming() + actual = pt.TealBlock.NormalizeBlocks(actual) + + with pt.TealComponent.Context.ignoreExprEquality(), pt.TealComponent.Context.ignoreScratchSlotEquality(): + assert actual == expected, failure_msg + + assert pt.TealBlock.MatchScratchSlotReferences( + pt.TealBlock.GetReferencedScratchSlots(actual), + pt.TealBlock.GetReferencedScratchSlots(expected), + ), failure_msg + + def test_docstring_parsing_with_different_format(): short_desc = "Example of a ABIReturnSubroutine with short description docstring." a_doc = "an abi Uint64 value" diff --git a/pyteal/compiler/compiler_test.py b/pyteal/compiler/compiler_test.py index 5ef4690e5..7031384c6 100644 --- a/pyteal/compiler/compiler_test.py +++ b/pyteal/compiler/compiler_test.py @@ -1714,7 +1714,7 @@ def deferredExample(value: pt.Expr) -> pt.Expr: assert actual_no_deferred == expected_no_deferred # manually add deferred expression to SubroutineDefinition - declaration = deferredExample.subroutine.get_declaration() + declaration = deferredExample.subroutine.get_declaration_by_option(False) declaration.deferred_expr = pt.Pop(pt.Bytes("deferred")) expected_deferred = """#pragma version 6 @@ -1786,7 +1786,7 @@ def empty() -> pt.Expr: assert actual_no_deferred == expected_no_deferred # manually add deferred expression to SubroutineDefinition - declaration = empty.subroutine.get_declaration() + declaration = empty.subroutine.get_declaration_by_option(False) declaration.deferred_expr = pt.Pop(pt.Bytes("deferred")) expected_deferred = """#pragma version 6 @@ -1837,7 +1837,7 @@ def bad() -> pt.Expr: program = pt.Seq(bad(), pt.Approve()) # manually add deferred expression to SubroutineDefinition - declaration = bad.subroutine.get_declaration() + declaration = bad.subroutine.get_declaration_by_option(False) declaration.deferred_expr = pt.Pop(pt.Bytes("deferred")) with pytest.raises( diff --git a/tests/integration/teal/roundtrip/app_roundtrip_()_v8.teal b/tests/integration/teal/roundtrip/app_roundtrip_()_v8.teal index d0ddb9ccf..961b19574 100644 --- a/tests/integration/teal/roundtrip/app_roundtrip_()_v8.teal +++ b/tests/integration/teal/roundtrip/app_roundtrip_()_v8.teal @@ -15,6 +15,10 @@ return tuplecomplement_0: proto 1 1 byte "" +int 0 +dupn 1 +byte "" +dupn 1 byte "" frame_bury 0 retsub @@ -23,16 +27,21 @@ retsub roundtripper_1: proto 1 1 byte "" +dupn 2 +int 0 +dupn 1 +byte "" +dupn 1 frame_dig -1 callsub tuplecomplement_0 -store 2 -load 2 +frame_bury 1 +frame_dig 1 callsub tuplecomplement_0 -store 3 +frame_bury 2 frame_dig -1 -load 2 +frame_dig 1 concat -load 3 +frame_dig 2 concat frame_bury 0 retsub \ No newline at end of file diff --git a/tests/integration/teal/roundtrip/app_roundtrip_(bool)[10]_v8.teal b/tests/integration/teal/roundtrip/app_roundtrip_(bool)[10]_v8.teal index 13296df67..cb265f8f7 100644 --- a/tests/integration/teal/roundtrip/app_roundtrip_(bool)[10]_v8.teal +++ b/tests/integration/teal/roundtrip/app_roundtrip_(bool)[10]_v8.teal @@ -15,6 +15,10 @@ return tuplecomplement_0: proto 1 1 byte "" +int 0 +dupn 3 +byte "" +dupn 1 frame_dig -1 int 0 getbit @@ -33,124 +37,129 @@ retsub arraycomplement_1: proto 1 1 byte "" +dupn 10 +int 0 +dupn 1 +byte "" +dupn 1 frame_dig -1 int 1 int 0 * int 1 extract3 -store 5 +frame_bury 1 frame_dig -1 int 1 int 1 * int 1 extract3 -store 6 +frame_bury 2 frame_dig -1 int 1 int 2 * int 1 extract3 -store 7 +frame_bury 3 frame_dig -1 int 1 int 3 * int 1 extract3 -store 8 +frame_bury 4 frame_dig -1 int 1 int 4 * int 1 extract3 -store 9 +frame_bury 5 frame_dig -1 int 1 int 5 * int 1 extract3 -store 10 +frame_bury 6 frame_dig -1 int 1 int 6 * int 1 extract3 -store 11 +frame_bury 7 frame_dig -1 int 1 int 7 * int 1 extract3 -store 12 +frame_bury 8 frame_dig -1 int 1 int 8 * int 1 extract3 -store 13 +frame_bury 9 frame_dig -1 int 1 int 9 * int 1 extract3 -store 14 -load 5 +frame_bury 10 +frame_dig 1 callsub tuplecomplement_0 -store 5 -load 6 +frame_bury 1 +frame_dig 2 callsub tuplecomplement_0 -store 6 -load 7 +frame_bury 2 +frame_dig 3 callsub tuplecomplement_0 -store 7 -load 8 +frame_bury 3 +frame_dig 4 callsub tuplecomplement_0 -store 8 -load 9 +frame_bury 4 +frame_dig 5 callsub tuplecomplement_0 -store 9 -load 10 +frame_bury 5 +frame_dig 6 callsub tuplecomplement_0 -store 10 -load 11 +frame_bury 6 +frame_dig 7 callsub tuplecomplement_0 -store 11 -load 12 +frame_bury 7 +frame_dig 8 callsub tuplecomplement_0 -store 12 -load 13 +frame_bury 8 +frame_dig 9 callsub tuplecomplement_0 -store 13 -load 14 +frame_bury 9 +frame_dig 10 callsub tuplecomplement_0 -store 14 -load 5 -load 6 +frame_bury 10 +frame_dig 1 +frame_dig 2 concat -load 7 +frame_dig 3 concat -load 8 +frame_dig 4 concat -load 9 +frame_dig 5 concat -load 10 +frame_dig 6 concat -load 11 +frame_dig 7 concat -load 12 +frame_dig 8 concat -load 13 +frame_dig 9 concat -load 14 +frame_dig 10 concat frame_bury 0 retsub @@ -159,16 +168,21 @@ retsub roundtripper_2: proto 1 1 byte "" +dupn 2 +int 0 +dupn 1 +byte "" +dupn 1 frame_dig -1 callsub arraycomplement_1 -store 3 -load 3 +frame_bury 1 +frame_dig 1 callsub arraycomplement_1 -store 4 +frame_bury 2 frame_dig -1 -load 3 +frame_dig 1 concat -load 4 +frame_dig 2 concat frame_bury 0 retsub diff --git a/tests/integration/teal/roundtrip/app_roundtrip_(bool)_v8.teal b/tests/integration/teal/roundtrip/app_roundtrip_(bool)_v8.teal index 72411884c..c8313ba4b 100644 --- a/tests/integration/teal/roundtrip/app_roundtrip_(bool)_v8.teal +++ b/tests/integration/teal/roundtrip/app_roundtrip_(bool)_v8.teal @@ -15,6 +15,10 @@ return tuplecomplement_0: proto 1 1 byte "" +int 0 +dupn 3 +byte "" +dupn 1 frame_dig -1 int 0 getbit @@ -33,16 +37,21 @@ retsub roundtripper_1: proto 1 1 byte "" +dupn 2 +int 0 +dupn 1 +byte "" +dupn 1 frame_dig -1 callsub tuplecomplement_0 -store 3 -load 3 +frame_bury 1 +frame_dig 1 callsub tuplecomplement_0 -store 4 +frame_bury 2 frame_dig -1 -load 3 +frame_dig 1 concat -load 4 +frame_dig 2 concat frame_bury 0 retsub diff --git a/tests/integration/teal/roundtrip/app_roundtrip_(bool,address,(uint64,bool),byte[10],bool[4],uint64)_v8.teal b/tests/integration/teal/roundtrip/app_roundtrip_(bool,address,(uint64,bool),byte[10],bool[4],uint64)_v8.teal index 1875b356a..a2d33a59e 100644 --- a/tests/integration/teal/roundtrip/app_roundtrip_(bool,address,(uint64,bool),byte[10],bool[4],uint64)_v8.teal +++ b/tests/integration/teal/roundtrip/app_roundtrip_(bool,address,(uint64,bool),byte[10],bool[4],uint64)_v8.teal @@ -15,6 +15,20 @@ return tuplecomplement_0: proto 1 1 byte "" +int 0 +dupn 6 +byte "" +dupn 1 +int 0 +dupn 97 +byte "" +dupn 3 +int 0 +dupn 5 +byte "" +dupn 3 +int 0 +dupn 5 frame_dig -1 int 0 getbit @@ -75,16 +89,21 @@ retsub roundtripper_1: proto 1 1 byte "" +dupn 4 +int 0 +dupn 1 +byte "" +dupn 1 frame_dig -1 callsub tuplecomplement_0 -store 8 -load 8 +frame_bury 2 +frame_dig 2 callsub tuplecomplement_0 -store 9 +frame_bury 4 frame_dig -1 -load 8 +frame_dig 2 concat -load 9 +frame_dig 4 concat frame_bury 0 retsub @@ -118,451 +137,455 @@ retsub arraycomplement_4: proto 1 1 byte "" +int 0 +dupn 97 +byte "" +dupn 1 frame_dig -1 int 1 int 0 * getbyte -store 12 +frame_bury 1 frame_dig -1 int 1 int 1 * getbyte -store 13 +frame_bury 2 frame_dig -1 int 1 int 2 * getbyte -store 14 +frame_bury 3 frame_dig -1 int 1 int 3 * getbyte -store 15 +frame_bury 4 frame_dig -1 int 1 int 4 * getbyte -store 16 +frame_bury 5 frame_dig -1 int 1 int 5 * getbyte -store 17 +frame_bury 6 frame_dig -1 int 1 int 6 * getbyte -store 18 +frame_bury 7 frame_dig -1 int 1 int 7 * getbyte -store 19 +frame_bury 8 frame_dig -1 int 1 int 8 * getbyte -store 20 +frame_bury 9 frame_dig -1 int 1 int 9 * getbyte -store 21 +frame_bury 10 frame_dig -1 int 1 int 10 * getbyte -store 22 +frame_bury 11 frame_dig -1 int 1 int 11 * getbyte -store 23 +frame_bury 12 frame_dig -1 int 1 int 12 * getbyte -store 24 +frame_bury 13 frame_dig -1 int 1 int 13 * getbyte -store 25 +frame_bury 14 frame_dig -1 int 1 int 14 * getbyte -store 26 +frame_bury 15 frame_dig -1 int 1 int 15 * getbyte -store 27 +frame_bury 16 frame_dig -1 int 1 int 16 * getbyte -store 28 +frame_bury 17 frame_dig -1 int 1 int 17 * getbyte -store 29 +frame_bury 18 frame_dig -1 int 1 int 18 * getbyte -store 30 +frame_bury 19 frame_dig -1 int 1 int 19 * getbyte -store 31 +frame_bury 20 frame_dig -1 int 1 int 20 * getbyte -store 32 +frame_bury 21 frame_dig -1 int 1 int 21 * getbyte -store 33 +frame_bury 22 frame_dig -1 int 1 int 22 * getbyte -store 34 +frame_bury 23 frame_dig -1 int 1 int 23 * getbyte -store 35 +frame_bury 24 frame_dig -1 int 1 int 24 * getbyte -store 36 +frame_bury 25 frame_dig -1 int 1 int 25 * getbyte -store 37 +frame_bury 26 frame_dig -1 int 1 int 26 * getbyte -store 38 +frame_bury 27 frame_dig -1 int 1 int 27 * getbyte -store 39 +frame_bury 28 frame_dig -1 int 1 int 28 * getbyte -store 40 +frame_bury 29 frame_dig -1 int 1 int 29 * getbyte -store 41 +frame_bury 30 frame_dig -1 int 1 int 30 * getbyte -store 42 +frame_bury 31 frame_dig -1 int 1 int 31 * getbyte -store 43 -load 12 +frame_bury 32 +frame_dig 1 callsub numericalcomp_3 -store 12 -load 13 +frame_bury 1 +frame_dig 2 callsub numericalcomp_3 -store 13 -load 14 +frame_bury 2 +frame_dig 3 callsub numericalcomp_3 -store 14 -load 15 +frame_bury 3 +frame_dig 4 callsub numericalcomp_3 -store 15 -load 16 +frame_bury 4 +frame_dig 5 callsub numericalcomp_3 -store 16 -load 17 +frame_bury 5 +frame_dig 6 callsub numericalcomp_3 -store 17 -load 18 +frame_bury 6 +frame_dig 7 callsub numericalcomp_3 -store 18 -load 19 +frame_bury 7 +frame_dig 8 callsub numericalcomp_3 -store 19 -load 20 +frame_bury 8 +frame_dig 9 callsub numericalcomp_3 -store 20 -load 21 +frame_bury 9 +frame_dig 10 callsub numericalcomp_3 -store 21 -load 22 +frame_bury 10 +frame_dig 11 callsub numericalcomp_3 -store 22 -load 23 +frame_bury 11 +frame_dig 12 callsub numericalcomp_3 -store 23 -load 24 +frame_bury 12 +frame_dig 13 callsub numericalcomp_3 -store 24 -load 25 +frame_bury 13 +frame_dig 14 callsub numericalcomp_3 -store 25 -load 26 +frame_bury 14 +frame_dig 15 callsub numericalcomp_3 -store 26 -load 27 +frame_bury 15 +frame_dig 16 callsub numericalcomp_3 -store 27 -load 28 +frame_bury 16 +frame_dig 17 callsub numericalcomp_3 -store 28 -load 29 +frame_bury 17 +frame_dig 18 callsub numericalcomp_3 -store 29 -load 30 +frame_bury 18 +frame_dig 19 callsub numericalcomp_3 -store 30 -load 31 +frame_bury 19 +frame_dig 20 callsub numericalcomp_3 -store 31 -load 32 +frame_bury 20 +frame_dig 21 callsub numericalcomp_3 -store 32 -load 33 +frame_bury 21 +frame_dig 22 callsub numericalcomp_3 -store 33 -load 34 +frame_bury 22 +frame_dig 23 callsub numericalcomp_3 -store 34 -load 35 +frame_bury 23 +frame_dig 24 callsub numericalcomp_3 -store 35 -load 36 +frame_bury 24 +frame_dig 25 callsub numericalcomp_3 -store 36 -load 37 +frame_bury 25 +frame_dig 26 callsub numericalcomp_3 -store 37 -load 38 +frame_bury 26 +frame_dig 27 callsub numericalcomp_3 -store 38 -load 39 +frame_bury 27 +frame_dig 28 callsub numericalcomp_3 -store 39 -load 40 +frame_bury 28 +frame_dig 29 callsub numericalcomp_3 -store 40 -load 41 +frame_bury 29 +frame_dig 30 callsub numericalcomp_3 -store 41 -load 42 +frame_bury 30 +frame_dig 31 callsub numericalcomp_3 -store 42 -load 43 +frame_bury 31 +frame_dig 32 callsub numericalcomp_3 -store 43 +frame_bury 32 byte 0x00 int 0 -load 12 +frame_dig 1 setbyte byte 0x00 int 0 -load 13 +frame_dig 2 setbyte concat byte 0x00 int 0 -load 14 +frame_dig 3 setbyte concat byte 0x00 int 0 -load 15 +frame_dig 4 setbyte concat byte 0x00 int 0 -load 16 +frame_dig 5 setbyte concat byte 0x00 int 0 -load 17 +frame_dig 6 setbyte concat byte 0x00 int 0 -load 18 +frame_dig 7 setbyte concat byte 0x00 int 0 -load 19 +frame_dig 8 setbyte concat byte 0x00 int 0 -load 20 +frame_dig 9 setbyte concat byte 0x00 int 0 -load 21 +frame_dig 10 setbyte concat byte 0x00 int 0 -load 22 +frame_dig 11 setbyte concat byte 0x00 int 0 -load 23 +frame_dig 12 setbyte concat byte 0x00 int 0 -load 24 +frame_dig 13 setbyte concat byte 0x00 int 0 -load 25 +frame_dig 14 setbyte concat byte 0x00 int 0 -load 26 +frame_dig 15 setbyte concat byte 0x00 int 0 -load 27 +frame_dig 16 setbyte concat byte 0x00 int 0 -load 28 +frame_dig 17 setbyte concat byte 0x00 int 0 -load 29 +frame_dig 18 setbyte concat byte 0x00 int 0 -load 30 +frame_dig 19 setbyte concat byte 0x00 int 0 -load 31 +frame_dig 20 setbyte concat byte 0x00 int 0 -load 32 +frame_dig 21 setbyte concat byte 0x00 int 0 -load 33 +frame_dig 22 setbyte concat byte 0x00 int 0 -load 34 +frame_dig 23 setbyte concat byte 0x00 int 0 -load 35 +frame_dig 24 setbyte concat byte 0x00 int 0 -load 36 +frame_dig 25 setbyte concat byte 0x00 int 0 -load 37 +frame_dig 26 setbyte concat byte 0x00 int 0 -load 38 +frame_dig 27 setbyte concat byte 0x00 int 0 -load 39 +frame_dig 28 setbyte concat byte 0x00 int 0 -load 40 +frame_dig 29 setbyte concat byte 0x00 int 0 -load 41 +frame_dig 30 setbyte concat byte 0x00 int 0 -load 42 +frame_dig 31 setbyte concat byte 0x00 int 0 -load 43 +frame_dig 32 setbyte concat frame_bury 0 @@ -572,25 +595,29 @@ retsub tuplecomplement_5: proto 1 1 byte "" +int 0 +dupn 5 +byte "" +dupn 1 frame_dig -1 int 0 extract_uint64 -store 10 +frame_bury 2 frame_dig -1 int 64 getbit -store 11 -load 10 +frame_bury 3 +frame_dig 2 callsub numericalcomp_11 -store 10 -load 11 +frame_bury 2 +frame_dig 3 callsub boolcomp_12 -store 11 -load 10 +frame_bury 3 +frame_dig 2 itob byte 0x00 int 0 -load 11 +frame_dig 3 setbit concat frame_bury 0 @@ -614,143 +641,147 @@ retsub arraycomplement_7: proto 1 1 byte "" +int 0 +dupn 11 +byte "" +dupn 1 frame_dig -1 int 1 int 0 * getbyte -store 44 +frame_bury 1 frame_dig -1 int 1 int 1 * getbyte -store 45 +frame_bury 2 frame_dig -1 int 1 int 2 * getbyte -store 46 +frame_bury 3 frame_dig -1 int 1 int 3 * getbyte -store 47 +frame_bury 4 frame_dig -1 int 1 int 4 * getbyte -store 48 +frame_bury 5 frame_dig -1 int 1 int 5 * getbyte -store 49 +frame_bury 6 frame_dig -1 int 1 int 6 * getbyte -store 50 +frame_bury 7 frame_dig -1 int 1 int 7 * getbyte -store 51 +frame_bury 8 frame_dig -1 int 1 int 8 * getbyte -store 52 +frame_bury 9 frame_dig -1 int 1 int 9 * getbyte -store 53 -load 44 +frame_bury 10 +frame_dig 1 callsub numericalcomp_6 -store 44 -load 45 +frame_bury 1 +frame_dig 2 callsub numericalcomp_6 -store 45 -load 46 +frame_bury 2 +frame_dig 3 callsub numericalcomp_6 -store 46 -load 47 +frame_bury 3 +frame_dig 4 callsub numericalcomp_6 -store 47 -load 48 +frame_bury 4 +frame_dig 5 callsub numericalcomp_6 -store 48 -load 49 +frame_bury 5 +frame_dig 6 callsub numericalcomp_6 -store 49 -load 50 +frame_bury 6 +frame_dig 7 callsub numericalcomp_6 -store 50 -load 51 +frame_bury 7 +frame_dig 8 callsub numericalcomp_6 -store 51 -load 52 +frame_bury 8 +frame_dig 9 callsub numericalcomp_6 -store 52 -load 53 +frame_bury 9 +frame_dig 10 callsub numericalcomp_6 -store 53 +frame_bury 10 byte 0x00 int 0 -load 44 +frame_dig 1 setbyte byte 0x00 int 0 -load 45 +frame_dig 2 setbyte concat byte 0x00 int 0 -load 46 +frame_dig 3 setbyte concat byte 0x00 int 0 -load 47 +frame_dig 4 setbyte concat byte 0x00 int 0 -load 48 +frame_dig 5 setbyte concat byte 0x00 int 0 -load 49 +frame_dig 6 setbyte concat byte 0x00 int 0 -load 50 +frame_dig 7 setbyte concat byte 0x00 int 0 -load 51 +frame_dig 8 setbyte concat byte 0x00 int 0 -load 52 +frame_dig 9 setbyte concat byte 0x00 int 0 -load 53 +frame_dig 10 setbyte concat frame_bury 0 @@ -771,46 +802,50 @@ retsub arraycomplement_9: proto 1 1 byte "" +int 0 +dupn 5 +byte "" +dupn 1 frame_dig -1 int 0 getbit -store 54 +frame_bury 1 frame_dig -1 int 1 getbit -store 55 +frame_bury 2 frame_dig -1 int 2 getbit -store 56 +frame_bury 3 frame_dig -1 int 3 getbit -store 57 -load 54 +frame_bury 4 +frame_dig 1 callsub boolcomp_8 -store 54 -load 55 +frame_bury 1 +frame_dig 2 callsub boolcomp_8 -store 55 -load 56 +frame_bury 2 +frame_dig 3 callsub boolcomp_8 -store 56 -load 57 +frame_bury 3 +frame_dig 4 callsub boolcomp_8 -store 57 +frame_bury 4 byte 0x00 int 0 -load 54 +frame_dig 1 setbit int 1 -load 55 +frame_dig 2 setbit int 2 -load 56 +frame_dig 3 setbit int 3 -load 57 +frame_dig 4 setbit frame_bury 0 retsub diff --git a/tests/integration/teal/roundtrip/app_roundtrip_(bool,byte)_v8.teal b/tests/integration/teal/roundtrip/app_roundtrip_(bool,byte)_v8.teal index c91fe2871..1bd77bc8b 100644 --- a/tests/integration/teal/roundtrip/app_roundtrip_(bool,byte)_v8.teal +++ b/tests/integration/teal/roundtrip/app_roundtrip_(bool,byte)_v8.teal @@ -15,6 +15,10 @@ return tuplecomplement_0: proto 1 1 byte "" +int 0 +dupn 5 +byte "" +dupn 1 frame_dig -1 int 0 getbit @@ -45,16 +49,21 @@ retsub roundtripper_1: proto 1 1 byte "" +dupn 2 +int 0 +dupn 1 +byte "" +dupn 1 frame_dig -1 callsub tuplecomplement_0 -store 4 -load 4 +frame_bury 1 +frame_dig 1 callsub tuplecomplement_0 -store 5 +frame_bury 2 frame_dig -1 -load 4 +frame_dig 1 concat -load 5 +frame_dig 2 concat frame_bury 0 retsub diff --git a/tests/integration/teal/roundtrip/app_roundtrip_(bool,byte,address,string)_v8.teal b/tests/integration/teal/roundtrip/app_roundtrip_(bool,byte,address,string)_v8.teal index dbb2b1b5e..e2a26e2d4 100644 --- a/tests/integration/teal/roundtrip/app_roundtrip_(bool,byte,address,string)_v8.teal +++ b/tests/integration/teal/roundtrip/app_roundtrip_(bool,byte,address,string)_v8.teal @@ -15,6 +15,22 @@ return tuplecomplement_0: proto 1 1 byte "" +int 0 +dupn 4 +byte "" +dupn 1 +int 0 +dupn 97 +byte "" +dupn 3 +int 0 +dupn 7 +byte "" +dupn 1 +int 0 +dupn 2 +byte "" +dupn 1 frame_dig -1 int 0 getbit @@ -58,16 +74,16 @@ concat load 2 concat load 3 -store 14 -load 14 -store 13 +frame_bury 124 +frame_dig 124 +frame_bury 123 int 36 -store 12 -load 12 +frame_bury 121 +frame_dig 121 itob extract 6 0 concat -load 13 +frame_dig 123 concat frame_bury 0 retsub @@ -76,64 +92,69 @@ retsub roundtripper_1: proto 1 1 byte "" +dupn 2 +int 0 +dupn 1 +byte "" +dupn 1 frame_dig -1 callsub tuplecomplement_0 -store 6 -load 6 +frame_bury 1 +frame_dig 1 callsub tuplecomplement_0 -store 7 +frame_bury 2 frame_dig -1 -store 11 -load 11 -store 10 +frame_bury 6 +frame_dig 6 +frame_bury 5 int 6 -store 8 -load 8 -load 11 +frame_bury 3 +frame_dig 3 +frame_dig 6 len + -store 9 -load 9 +frame_bury 4 +frame_dig 4 int 65536 < assert -load 8 +frame_dig 3 itob extract 6 0 -load 6 -store 11 -load 10 -load 11 -concat -store 10 -load 9 -store 8 -load 8 -load 11 +frame_dig 1 +frame_bury 6 +frame_dig 5 +frame_dig 6 +concat +frame_bury 5 +frame_dig 4 +frame_bury 3 +frame_dig 3 +frame_dig 6 len + -store 9 -load 9 +frame_bury 4 +frame_dig 4 int 65536 < assert -load 8 +frame_dig 3 itob extract 6 0 concat -load 7 -store 11 -load 10 -load 11 +frame_dig 2 +frame_bury 6 +frame_dig 5 +frame_dig 6 concat -store 10 -load 9 -store 8 -load 8 +frame_bury 5 +frame_dig 4 +frame_bury 3 +frame_dig 3 itob extract 6 0 concat -load 10 +frame_dig 5 concat frame_bury 0 retsub @@ -181,451 +202,455 @@ retsub arraycomplement_5: proto 1 1 byte "" +int 0 +dupn 97 +byte "" +dupn 1 frame_dig -1 int 1 int 0 * getbyte -store 15 +frame_bury 1 frame_dig -1 int 1 int 1 * getbyte -store 16 +frame_bury 2 frame_dig -1 int 1 int 2 * getbyte -store 17 +frame_bury 3 frame_dig -1 int 1 int 3 * getbyte -store 18 +frame_bury 4 frame_dig -1 int 1 int 4 * getbyte -store 19 +frame_bury 5 frame_dig -1 int 1 int 5 * getbyte -store 20 +frame_bury 6 frame_dig -1 int 1 int 6 * getbyte -store 21 +frame_bury 7 frame_dig -1 int 1 int 7 * getbyte -store 22 +frame_bury 8 frame_dig -1 int 1 int 8 * getbyte -store 23 +frame_bury 9 frame_dig -1 int 1 int 9 * getbyte -store 24 +frame_bury 10 frame_dig -1 int 1 int 10 * getbyte -store 25 +frame_bury 11 frame_dig -1 int 1 int 11 * getbyte -store 26 +frame_bury 12 frame_dig -1 int 1 int 12 * getbyte -store 27 +frame_bury 13 frame_dig -1 int 1 int 13 * getbyte -store 28 +frame_bury 14 frame_dig -1 int 1 int 14 * getbyte -store 29 +frame_bury 15 frame_dig -1 int 1 int 15 * getbyte -store 30 +frame_bury 16 frame_dig -1 int 1 int 16 * getbyte -store 31 +frame_bury 17 frame_dig -1 int 1 int 17 * getbyte -store 32 +frame_bury 18 frame_dig -1 int 1 int 18 * getbyte -store 33 +frame_bury 19 frame_dig -1 int 1 int 19 * getbyte -store 34 +frame_bury 20 frame_dig -1 int 1 int 20 * getbyte -store 35 +frame_bury 21 frame_dig -1 int 1 int 21 * getbyte -store 36 +frame_bury 22 frame_dig -1 int 1 int 22 * getbyte -store 37 +frame_bury 23 frame_dig -1 int 1 int 23 * getbyte -store 38 +frame_bury 24 frame_dig -1 int 1 int 24 * getbyte -store 39 +frame_bury 25 frame_dig -1 int 1 int 25 * getbyte -store 40 +frame_bury 26 frame_dig -1 int 1 int 26 * getbyte -store 41 +frame_bury 27 frame_dig -1 int 1 int 27 * getbyte -store 42 +frame_bury 28 frame_dig -1 int 1 int 28 * getbyte -store 43 +frame_bury 29 frame_dig -1 int 1 int 29 * getbyte -store 44 +frame_bury 30 frame_dig -1 int 1 int 30 * getbyte -store 45 +frame_bury 31 frame_dig -1 int 1 int 31 * getbyte -store 46 -load 15 +frame_bury 32 +frame_dig 1 callsub numericalcomp_4 -store 15 -load 16 +frame_bury 1 +frame_dig 2 callsub numericalcomp_4 -store 16 -load 17 +frame_bury 2 +frame_dig 3 callsub numericalcomp_4 -store 17 -load 18 +frame_bury 3 +frame_dig 4 callsub numericalcomp_4 -store 18 -load 19 +frame_bury 4 +frame_dig 5 callsub numericalcomp_4 -store 19 -load 20 +frame_bury 5 +frame_dig 6 callsub numericalcomp_4 -store 20 -load 21 +frame_bury 6 +frame_dig 7 callsub numericalcomp_4 -store 21 -load 22 +frame_bury 7 +frame_dig 8 callsub numericalcomp_4 -store 22 -load 23 +frame_bury 8 +frame_dig 9 callsub numericalcomp_4 -store 23 -load 24 +frame_bury 9 +frame_dig 10 callsub numericalcomp_4 -store 24 -load 25 +frame_bury 10 +frame_dig 11 callsub numericalcomp_4 -store 25 -load 26 +frame_bury 11 +frame_dig 12 callsub numericalcomp_4 -store 26 -load 27 +frame_bury 12 +frame_dig 13 callsub numericalcomp_4 -store 27 -load 28 +frame_bury 13 +frame_dig 14 callsub numericalcomp_4 -store 28 -load 29 +frame_bury 14 +frame_dig 15 callsub numericalcomp_4 -store 29 -load 30 +frame_bury 15 +frame_dig 16 callsub numericalcomp_4 -store 30 -load 31 +frame_bury 16 +frame_dig 17 callsub numericalcomp_4 -store 31 -load 32 +frame_bury 17 +frame_dig 18 callsub numericalcomp_4 -store 32 -load 33 +frame_bury 18 +frame_dig 19 callsub numericalcomp_4 -store 33 -load 34 +frame_bury 19 +frame_dig 20 callsub numericalcomp_4 -store 34 -load 35 +frame_bury 20 +frame_dig 21 callsub numericalcomp_4 -store 35 -load 36 +frame_bury 21 +frame_dig 22 callsub numericalcomp_4 -store 36 -load 37 +frame_bury 22 +frame_dig 23 callsub numericalcomp_4 -store 37 -load 38 +frame_bury 23 +frame_dig 24 callsub numericalcomp_4 -store 38 -load 39 +frame_bury 24 +frame_dig 25 callsub numericalcomp_4 -store 39 -load 40 +frame_bury 25 +frame_dig 26 callsub numericalcomp_4 -store 40 -load 41 +frame_bury 26 +frame_dig 27 callsub numericalcomp_4 -store 41 -load 42 +frame_bury 27 +frame_dig 28 callsub numericalcomp_4 -store 42 -load 43 +frame_bury 28 +frame_dig 29 callsub numericalcomp_4 -store 43 -load 44 +frame_bury 29 +frame_dig 30 callsub numericalcomp_4 -store 44 -load 45 +frame_bury 30 +frame_dig 31 callsub numericalcomp_4 -store 45 -load 46 +frame_bury 31 +frame_dig 32 callsub numericalcomp_4 -store 46 +frame_bury 32 byte 0x00 int 0 -load 15 +frame_dig 1 setbyte byte 0x00 int 0 -load 16 +frame_dig 2 setbyte concat byte 0x00 int 0 -load 17 +frame_dig 3 setbyte concat byte 0x00 int 0 -load 18 +frame_dig 4 setbyte concat byte 0x00 int 0 -load 19 +frame_dig 5 setbyte concat byte 0x00 int 0 -load 20 +frame_dig 6 setbyte concat byte 0x00 int 0 -load 21 +frame_dig 7 setbyte concat byte 0x00 int 0 -load 22 +frame_dig 8 setbyte concat byte 0x00 int 0 -load 23 +frame_dig 9 setbyte concat byte 0x00 int 0 -load 24 +frame_dig 10 setbyte concat byte 0x00 int 0 -load 25 +frame_dig 11 setbyte concat byte 0x00 int 0 -load 26 +frame_dig 12 setbyte concat byte 0x00 int 0 -load 27 +frame_dig 13 setbyte concat byte 0x00 int 0 -load 28 +frame_dig 14 setbyte concat byte 0x00 int 0 -load 29 +frame_dig 15 setbyte concat byte 0x00 int 0 -load 30 +frame_dig 16 setbyte concat byte 0x00 int 0 -load 31 +frame_dig 17 setbyte concat byte 0x00 int 0 -load 32 +frame_dig 18 setbyte concat byte 0x00 int 0 -load 33 +frame_dig 19 setbyte concat byte 0x00 int 0 -load 34 +frame_dig 20 setbyte concat byte 0x00 int 0 -load 35 +frame_dig 21 setbyte concat byte 0x00 int 0 -load 36 +frame_dig 22 setbyte concat byte 0x00 int 0 -load 37 +frame_dig 23 setbyte concat byte 0x00 int 0 -load 38 +frame_dig 24 setbyte concat byte 0x00 int 0 -load 39 +frame_dig 25 setbyte concat byte 0x00 int 0 -load 40 +frame_dig 26 setbyte concat byte 0x00 int 0 -load 41 +frame_dig 27 setbyte concat byte 0x00 int 0 -load 42 +frame_dig 28 setbyte concat byte 0x00 int 0 -load 43 +frame_dig 29 setbyte concat byte 0x00 int 0 -load 44 +frame_dig 30 setbyte concat byte 0x00 int 0 -load 45 +frame_dig 31 setbyte concat byte 0x00 int 0 -load 46 +frame_dig 32 setbyte concat frame_bury 0 @@ -635,6 +660,11 @@ retsub stringreverse_6: proto 1 1 byte "" +int 0 +dupn 7 +byte "" +dupn 1 +int 0 frame_dig -1 int 1 int 0 @@ -642,7 +672,7 @@ int 0 int 2 + getbyte -store 49 +frame_bury 3 frame_dig -1 int 1 int 1 @@ -650,7 +680,7 @@ int 1 int 2 + getbyte -store 48 +frame_bury 2 frame_dig -1 int 1 int 2 @@ -658,24 +688,24 @@ int 2 int 2 + getbyte -store 47 +frame_bury 1 int 3 -store 50 -load 50 +frame_bury 11 +frame_dig 11 itob extract 6 0 byte 0x00 int 0 -load 47 +frame_dig 1 setbyte byte 0x00 int 0 -load 48 +frame_dig 2 setbyte concat byte 0x00 int 0 -load 49 +frame_dig 3 setbyte concat concat diff --git a/tests/integration/teal/roundtrip/app_roundtrip_(bool,byte,address,string,(address,(uint32,string[],bool[2],(byte),uint8)[2],string,bool[]))[]_2_v8.teal b/tests/integration/teal/roundtrip/app_roundtrip_(bool,byte,address,string,(address,(uint32,string[],bool[2],(byte),uint8)[2],string,bool[]))[]_2_v8.teal index ac2ca105f..d22c5bea1 100644 --- a/tests/integration/teal/roundtrip/app_roundtrip_(bool,byte,address,string,(address,(uint32,string[],bool[2],(byte),uint8)[2],string,bool[]))[]_2_v8.teal +++ b/tests/integration/teal/roundtrip/app_roundtrip_(bool,byte,address,string,(address,(uint32,string[],bool[2],(byte),uint8)[2],string,bool[]))[]_2_v8.teal @@ -15,6 +15,25 @@ return tuplecomplement_0: proto 1 1 byte "" +int 0 +byte "" +dupn 3 +int 0 +dupn 3 +byte "" +dupn 1 +int 0 +dupn 97 +byte "" +dupn 3 +int 0 +dupn 7 +byte "" +dupn 1 +int 0 +byte "" +dupn 1 +int 0 frame_dig -1 int 0 getbit @@ -70,37 +89,37 @@ concat load 2 concat load 3 -store 29 -load 29 -store 28 +store 10 +load 10 +store 9 int 38 -store 26 -load 26 -load 29 +store 7 +load 7 +load 10 len + -store 27 -load 27 +store 8 +load 8 int 65536 < assert -load 26 +load 7 itob extract 6 0 concat load 4 -store 29 -load 28 -load 29 -concat -store 28 -load 27 -store 26 -load 26 +store 10 +load 9 +load 10 +concat +store 9 +load 8 +store 7 +load 7 itob extract 6 0 concat -load 28 +load 9 concat frame_bury 0 retsub @@ -109,6 +128,12 @@ retsub arraycomplement_1: proto 1 1 byte "" +dupn 2 +int 0 +dupn 3 +byte "" +dupn 1 +int 0 frame_dig -1 frame_dig -1 int 2 @@ -125,8 +150,8 @@ int 1 frame_dig -1 int 0 extract_uint16 -store 15 -load 15 +frame_bury 3 +frame_dig 3 == bnz arraycomplement_1_l5 frame_dig -1 @@ -142,7 +167,7 @@ int 2 + arraycomplement_1_l2: substring3 -store 13 +frame_bury 1 frame_dig -1 frame_dig -1 int 2 @@ -159,8 +184,8 @@ int 1 frame_dig -1 int 0 extract_uint16 -store 16 -load 16 +frame_bury 4 +frame_dig 4 == bnz arraycomplement_1_l4 frame_dig -1 @@ -185,49 +210,49 @@ len b arraycomplement_1_l2 arraycomplement_1_l6: substring3 -store 14 -load 13 +frame_bury 2 +frame_dig 1 callsub tuplecomplement_0 -store 13 -load 14 +frame_bury 1 +frame_dig 2 callsub tuplecomplement_0 -store 14 +frame_bury 2 int 2 -store 21 -load 21 +frame_bury 9 +frame_dig 9 itob extract 6 0 -load 13 -store 20 -load 20 -store 19 +frame_dig 1 +frame_bury 8 +frame_dig 8 +frame_bury 7 int 4 -store 17 -load 17 -load 20 +frame_bury 5 +frame_dig 5 +frame_dig 8 len + -store 18 -load 18 +frame_bury 6 +frame_dig 6 int 65536 < assert -load 17 +frame_dig 5 itob extract 6 0 -load 14 -store 20 -load 19 -load 20 -concat -store 19 -load 18 -store 17 -load 17 +frame_dig 2 +frame_bury 8 +frame_dig 7 +frame_dig 8 +concat +frame_bury 7 +frame_dig 6 +frame_bury 5 +frame_dig 5 itob extract 6 0 concat -load 19 +frame_dig 7 concat concat frame_bury 0 @@ -237,64 +262,69 @@ retsub roundtripper_2: proto 1 1 byte "" +dupn 2 +int 0 +dupn 1 +byte "" +dupn 1 frame_dig -1 callsub arraycomplement_1 -store 7 -load 7 +frame_bury 1 +frame_dig 1 callsub arraycomplement_1 -store 8 +frame_bury 2 frame_dig -1 -store 12 -load 12 -store 11 +frame_bury 6 +frame_dig 6 +frame_bury 5 int 6 -store 9 -load 9 -load 12 +frame_bury 3 +frame_dig 3 +frame_dig 6 len + -store 10 -load 10 +frame_bury 4 +frame_dig 4 int 65536 < assert -load 9 +frame_dig 3 itob extract 6 0 -load 7 -store 12 -load 11 -load 12 -concat -store 11 -load 10 -store 9 -load 9 -load 12 +frame_dig 1 +frame_bury 6 +frame_dig 5 +frame_dig 6 +concat +frame_bury 5 +frame_dig 4 +frame_bury 3 +frame_dig 3 +frame_dig 6 len + -store 10 -load 10 +frame_bury 4 +frame_dig 4 int 65536 < assert -load 9 +frame_dig 3 itob extract 6 0 concat -load 8 -store 12 -load 11 -load 12 +frame_dig 2 +frame_bury 6 +frame_dig 5 +frame_dig 6 concat -store 11 -load 10 -store 9 -load 9 +frame_bury 5 +frame_dig 4 +frame_bury 3 +frame_dig 3 itob extract 6 0 concat -load 11 +frame_dig 5 concat frame_bury 0 retsub @@ -342,451 +372,455 @@ retsub arraycomplement_6: proto 1 1 byte "" +int 0 +dupn 97 +byte "" +dupn 1 frame_dig -1 int 1 int 0 * getbyte -store 30 +frame_bury 1 frame_dig -1 int 1 int 1 * getbyte -store 31 +frame_bury 2 frame_dig -1 int 1 int 2 * getbyte -store 32 +frame_bury 3 frame_dig -1 int 1 int 3 * getbyte -store 33 +frame_bury 4 frame_dig -1 int 1 int 4 * getbyte -store 34 +frame_bury 5 frame_dig -1 int 1 int 5 * getbyte -store 35 +frame_bury 6 frame_dig -1 int 1 int 6 * getbyte -store 36 +frame_bury 7 frame_dig -1 int 1 int 7 * getbyte -store 37 +frame_bury 8 frame_dig -1 int 1 int 8 * getbyte -store 38 +frame_bury 9 frame_dig -1 int 1 int 9 * getbyte -store 39 +frame_bury 10 frame_dig -1 int 1 int 10 * getbyte -store 40 +frame_bury 11 frame_dig -1 int 1 int 11 * getbyte -store 41 +frame_bury 12 frame_dig -1 int 1 int 12 * getbyte -store 42 +frame_bury 13 frame_dig -1 int 1 int 13 * getbyte -store 43 +frame_bury 14 frame_dig -1 int 1 int 14 * getbyte -store 44 +frame_bury 15 frame_dig -1 int 1 int 15 * getbyte -store 45 +frame_bury 16 frame_dig -1 int 1 int 16 * getbyte -store 46 +frame_bury 17 frame_dig -1 int 1 int 17 * getbyte -store 47 +frame_bury 18 frame_dig -1 int 1 int 18 * getbyte -store 48 +frame_bury 19 frame_dig -1 int 1 int 19 * getbyte -store 49 +frame_bury 20 frame_dig -1 int 1 int 20 * getbyte -store 50 +frame_bury 21 frame_dig -1 int 1 int 21 * getbyte -store 51 +frame_bury 22 frame_dig -1 int 1 int 22 * getbyte -store 52 +frame_bury 23 frame_dig -1 int 1 int 23 * getbyte -store 53 +frame_bury 24 frame_dig -1 int 1 int 24 * getbyte -store 54 +frame_bury 25 frame_dig -1 int 1 int 25 * getbyte -store 55 +frame_bury 26 frame_dig -1 int 1 int 26 * getbyte -store 56 +frame_bury 27 frame_dig -1 int 1 int 27 * getbyte -store 57 +frame_bury 28 frame_dig -1 int 1 int 28 * getbyte -store 58 +frame_bury 29 frame_dig -1 int 1 int 29 * getbyte -store 59 +frame_bury 30 frame_dig -1 int 1 int 30 * getbyte -store 60 +frame_bury 31 frame_dig -1 int 1 int 31 * getbyte -store 61 -load 30 +frame_bury 32 +frame_dig 1 callsub numericalcomp_5 -store 30 -load 31 +frame_bury 1 +frame_dig 2 callsub numericalcomp_5 -store 31 -load 32 +frame_bury 2 +frame_dig 3 callsub numericalcomp_5 -store 32 -load 33 +frame_bury 3 +frame_dig 4 callsub numericalcomp_5 -store 33 -load 34 +frame_bury 4 +frame_dig 5 callsub numericalcomp_5 -store 34 -load 35 +frame_bury 5 +frame_dig 6 callsub numericalcomp_5 -store 35 -load 36 +frame_bury 6 +frame_dig 7 callsub numericalcomp_5 -store 36 -load 37 +frame_bury 7 +frame_dig 8 callsub numericalcomp_5 -store 37 -load 38 +frame_bury 8 +frame_dig 9 callsub numericalcomp_5 -store 38 -load 39 +frame_bury 9 +frame_dig 10 callsub numericalcomp_5 -store 39 -load 40 +frame_bury 10 +frame_dig 11 callsub numericalcomp_5 -store 40 -load 41 +frame_bury 11 +frame_dig 12 callsub numericalcomp_5 -store 41 -load 42 +frame_bury 12 +frame_dig 13 callsub numericalcomp_5 -store 42 -load 43 +frame_bury 13 +frame_dig 14 callsub numericalcomp_5 -store 43 -load 44 +frame_bury 14 +frame_dig 15 callsub numericalcomp_5 -store 44 -load 45 +frame_bury 15 +frame_dig 16 callsub numericalcomp_5 -store 45 -load 46 +frame_bury 16 +frame_dig 17 callsub numericalcomp_5 -store 46 -load 47 +frame_bury 17 +frame_dig 18 callsub numericalcomp_5 -store 47 -load 48 +frame_bury 18 +frame_dig 19 callsub numericalcomp_5 -store 48 -load 49 +frame_bury 19 +frame_dig 20 callsub numericalcomp_5 -store 49 -load 50 +frame_bury 20 +frame_dig 21 callsub numericalcomp_5 -store 50 -load 51 +frame_bury 21 +frame_dig 22 callsub numericalcomp_5 -store 51 -load 52 +frame_bury 22 +frame_dig 23 callsub numericalcomp_5 -store 52 -load 53 +frame_bury 23 +frame_dig 24 callsub numericalcomp_5 -store 53 -load 54 +frame_bury 24 +frame_dig 25 callsub numericalcomp_5 -store 54 -load 55 +frame_bury 25 +frame_dig 26 callsub numericalcomp_5 -store 55 -load 56 +frame_bury 26 +frame_dig 27 callsub numericalcomp_5 -store 56 -load 57 +frame_bury 27 +frame_dig 28 callsub numericalcomp_5 -store 57 -load 58 +frame_bury 28 +frame_dig 29 callsub numericalcomp_5 -store 58 -load 59 +frame_bury 29 +frame_dig 30 callsub numericalcomp_5 -store 59 -load 60 +frame_bury 30 +frame_dig 31 callsub numericalcomp_5 -store 60 -load 61 +frame_bury 31 +frame_dig 32 callsub numericalcomp_5 -store 61 +frame_bury 32 byte 0x00 int 0 -load 30 +frame_dig 1 setbyte byte 0x00 int 0 -load 31 +frame_dig 2 setbyte concat byte 0x00 int 0 -load 32 +frame_dig 3 setbyte concat byte 0x00 int 0 -load 33 +frame_dig 4 setbyte concat byte 0x00 int 0 -load 34 +frame_dig 5 setbyte concat byte 0x00 int 0 -load 35 +frame_dig 6 setbyte concat byte 0x00 int 0 -load 36 +frame_dig 7 setbyte concat byte 0x00 int 0 -load 37 +frame_dig 8 setbyte concat byte 0x00 int 0 -load 38 +frame_dig 9 setbyte concat byte 0x00 int 0 -load 39 +frame_dig 10 setbyte concat byte 0x00 int 0 -load 40 +frame_dig 11 setbyte concat byte 0x00 int 0 -load 41 +frame_dig 12 setbyte concat byte 0x00 int 0 -load 42 +frame_dig 13 setbyte concat byte 0x00 int 0 -load 43 +frame_dig 14 setbyte concat byte 0x00 int 0 -load 44 +frame_dig 15 setbyte concat byte 0x00 int 0 -load 45 +frame_dig 16 setbyte concat byte 0x00 int 0 -load 46 +frame_dig 17 setbyte concat byte 0x00 int 0 -load 47 +frame_dig 18 setbyte concat byte 0x00 int 0 -load 48 +frame_dig 19 setbyte concat byte 0x00 int 0 -load 49 +frame_dig 20 setbyte concat byte 0x00 int 0 -load 50 +frame_dig 21 setbyte concat byte 0x00 int 0 -load 51 +frame_dig 22 setbyte concat byte 0x00 int 0 -load 52 +frame_dig 23 setbyte concat byte 0x00 int 0 -load 53 +frame_dig 24 setbyte concat byte 0x00 int 0 -load 54 +frame_dig 25 setbyte concat byte 0x00 int 0 -load 55 +frame_dig 26 setbyte concat byte 0x00 int 0 -load 56 +frame_dig 27 setbyte concat byte 0x00 int 0 -load 57 +frame_dig 28 setbyte concat byte 0x00 int 0 -load 58 +frame_dig 29 setbyte concat byte 0x00 int 0 -load 59 +frame_dig 30 setbyte concat byte 0x00 int 0 -load 60 +frame_dig 31 setbyte concat byte 0x00 int 0 -load 61 +frame_dig 32 setbyte concat frame_bury 0 @@ -796,6 +830,11 @@ retsub stringreverse_7: proto 1 1 byte "" +int 0 +dupn 7 +byte "" +dupn 1 +int 0 frame_dig -1 int 1 int 0 @@ -803,7 +842,7 @@ int 0 int 2 + getbyte -store 64 +frame_bury 3 frame_dig -1 int 1 int 1 @@ -811,7 +850,7 @@ int 1 int 2 + getbyte -store 63 +frame_bury 2 frame_dig -1 int 1 int 2 @@ -819,24 +858,24 @@ int 2 int 2 + getbyte -store 62 +frame_bury 1 int 3 -store 65 -load 65 +frame_bury 11 +frame_dig 11 itob extract 6 0 byte 0x00 int 0 -load 62 +frame_dig 1 setbyte byte 0x00 int 0 -load 63 +frame_dig 2 setbyte concat byte 0x00 int 0 -load 64 +frame_dig 3 setbyte concat concat @@ -847,9 +886,27 @@ retsub tuplecomplement_8: proto 1 1 byte "" +int 0 +byte "" +int 0 +byte "" +dupn 2 +int 0 +dupn 1 +byte "" +dupn 1 +int 0 +dupn 97 +byte "" +dupn 8 +int 0 +dupn 3 +byte "" +dupn 4 +int 0 frame_dig -1 extract 0 32 -store 22 +frame_bury 2 frame_dig -1 frame_dig -1 int 32 @@ -858,7 +915,7 @@ frame_dig -1 int 34 extract_uint16 substring3 -store 23 +frame_bury 3 frame_dig -1 frame_dig -1 int 34 @@ -867,7 +924,7 @@ frame_dig -1 int 36 extract_uint16 substring3 -store 24 +frame_bury 4 frame_dig -1 frame_dig -1 int 36 @@ -875,73 +932,73 @@ extract_uint16 dig 1 len substring3 -store 25 -load 22 +frame_bury 5 +frame_dig 2 callsub arraycomplement_10 -store 22 -load 23 +frame_bury 2 +frame_dig 3 callsub arraycomplement_12 -store 23 -load 24 +frame_bury 3 +frame_dig 4 callsub stringreverse_13 -store 24 -load 25 +frame_bury 4 +frame_dig 5 callsub arraycomplement_15 -store 25 -load 22 -load 23 -store 74 -load 74 -store 73 +frame_bury 5 +frame_dig 2 +frame_dig 3 +store 14 +load 14 +store 13 int 38 -store 71 -load 71 -load 74 +store 11 +load 11 +load 14 len + -store 72 -load 72 +store 12 +load 12 int 65536 < assert -load 71 +load 11 itob extract 6 0 concat -load 24 -store 74 -load 73 -load 74 +frame_dig 4 +store 14 +load 13 +load 14 concat -store 73 -load 72 -store 71 -load 71 -load 74 +store 13 +load 12 +store 11 +load 11 +load 14 len + -store 72 -load 72 +store 12 +load 12 int 65536 < assert -load 71 +load 11 itob extract 6 0 concat -load 25 -store 74 -load 73 -load 74 +frame_dig 5 +store 14 +load 13 +load 14 concat -store 73 -load 72 -store 71 -load 71 +store 13 +load 12 +store 11 +load 11 itob extract 6 0 concat -load 73 +load 13 concat frame_bury 0 retsub @@ -964,451 +1021,455 @@ retsub arraycomplement_10: proto 1 1 byte "" +int 0 +dupn 97 +byte "" +dupn 1 frame_dig -1 int 1 int 0 * getbyte -store 75 +frame_bury 1 frame_dig -1 int 1 int 1 * getbyte -store 76 +frame_bury 2 frame_dig -1 int 1 int 2 * getbyte -store 77 +frame_bury 3 frame_dig -1 int 1 int 3 * getbyte -store 78 +frame_bury 4 frame_dig -1 int 1 int 4 * getbyte -store 79 +frame_bury 5 frame_dig -1 int 1 int 5 * getbyte -store 80 +frame_bury 6 frame_dig -1 int 1 int 6 * getbyte -store 81 +frame_bury 7 frame_dig -1 int 1 int 7 * getbyte -store 82 +frame_bury 8 frame_dig -1 int 1 int 8 * getbyte -store 83 +frame_bury 9 frame_dig -1 int 1 int 9 * getbyte -store 84 +frame_bury 10 frame_dig -1 int 1 int 10 * getbyte -store 85 +frame_bury 11 frame_dig -1 int 1 int 11 * getbyte -store 86 +frame_bury 12 frame_dig -1 int 1 int 12 * getbyte -store 87 +frame_bury 13 frame_dig -1 int 1 int 13 * getbyte -store 88 +frame_bury 14 frame_dig -1 int 1 int 14 * getbyte -store 89 +frame_bury 15 frame_dig -1 int 1 int 15 * getbyte -store 90 +frame_bury 16 frame_dig -1 int 1 int 16 * getbyte -store 91 +frame_bury 17 frame_dig -1 int 1 int 17 * getbyte -store 92 +frame_bury 18 frame_dig -1 int 1 int 18 * getbyte -store 93 +frame_bury 19 frame_dig -1 int 1 int 19 * getbyte -store 94 +frame_bury 20 frame_dig -1 int 1 int 20 * getbyte -store 95 +frame_bury 21 frame_dig -1 int 1 int 21 * getbyte -store 96 +frame_bury 22 frame_dig -1 int 1 int 22 * getbyte -store 97 +frame_bury 23 frame_dig -1 int 1 int 23 * getbyte -store 98 +frame_bury 24 frame_dig -1 int 1 int 24 * getbyte -store 99 +frame_bury 25 frame_dig -1 int 1 int 25 * getbyte -store 100 +frame_bury 26 frame_dig -1 int 1 int 26 * getbyte -store 101 +frame_bury 27 frame_dig -1 int 1 int 27 * getbyte -store 102 +frame_bury 28 frame_dig -1 int 1 int 28 * getbyte -store 103 +frame_bury 29 frame_dig -1 int 1 int 29 * getbyte -store 104 +frame_bury 30 frame_dig -1 int 1 int 30 * getbyte -store 105 +frame_bury 31 frame_dig -1 int 1 int 31 * getbyte -store 106 -load 75 +frame_bury 32 +frame_dig 1 callsub numericalcomp_9 -store 75 -load 76 +frame_bury 1 +frame_dig 2 callsub numericalcomp_9 -store 76 -load 77 +frame_bury 2 +frame_dig 3 callsub numericalcomp_9 -store 77 -load 78 +frame_bury 3 +frame_dig 4 callsub numericalcomp_9 -store 78 -load 79 +frame_bury 4 +frame_dig 5 callsub numericalcomp_9 -store 79 -load 80 +frame_bury 5 +frame_dig 6 callsub numericalcomp_9 -store 80 -load 81 +frame_bury 6 +frame_dig 7 callsub numericalcomp_9 -store 81 -load 82 +frame_bury 7 +frame_dig 8 callsub numericalcomp_9 -store 82 -load 83 +frame_bury 8 +frame_dig 9 callsub numericalcomp_9 -store 83 -load 84 +frame_bury 9 +frame_dig 10 callsub numericalcomp_9 -store 84 -load 85 +frame_bury 10 +frame_dig 11 callsub numericalcomp_9 -store 85 -load 86 +frame_bury 11 +frame_dig 12 callsub numericalcomp_9 -store 86 -load 87 +frame_bury 12 +frame_dig 13 callsub numericalcomp_9 -store 87 -load 88 +frame_bury 13 +frame_dig 14 callsub numericalcomp_9 -store 88 -load 89 +frame_bury 14 +frame_dig 15 callsub numericalcomp_9 -store 89 -load 90 +frame_bury 15 +frame_dig 16 callsub numericalcomp_9 -store 90 -load 91 +frame_bury 16 +frame_dig 17 callsub numericalcomp_9 -store 91 -load 92 +frame_bury 17 +frame_dig 18 callsub numericalcomp_9 -store 92 -load 93 +frame_bury 18 +frame_dig 19 callsub numericalcomp_9 -store 93 -load 94 +frame_bury 19 +frame_dig 20 callsub numericalcomp_9 -store 94 -load 95 +frame_bury 20 +frame_dig 21 callsub numericalcomp_9 -store 95 -load 96 +frame_bury 21 +frame_dig 22 callsub numericalcomp_9 -store 96 -load 97 +frame_bury 22 +frame_dig 23 callsub numericalcomp_9 -store 97 -load 98 +frame_bury 23 +frame_dig 24 callsub numericalcomp_9 -store 98 -load 99 +frame_bury 24 +frame_dig 25 callsub numericalcomp_9 -store 99 -load 100 +frame_bury 25 +frame_dig 26 callsub numericalcomp_9 -store 100 -load 101 +frame_bury 26 +frame_dig 27 callsub numericalcomp_9 -store 101 -load 102 +frame_bury 27 +frame_dig 28 callsub numericalcomp_9 -store 102 -load 103 +frame_bury 28 +frame_dig 29 callsub numericalcomp_9 -store 103 -load 104 +frame_bury 29 +frame_dig 30 callsub numericalcomp_9 -store 104 -load 105 +frame_bury 30 +frame_dig 31 callsub numericalcomp_9 -store 105 -load 106 +frame_bury 31 +frame_dig 32 callsub numericalcomp_9 -store 106 +frame_bury 32 byte 0x00 int 0 -load 75 +frame_dig 1 setbyte byte 0x00 int 0 -load 76 +frame_dig 2 setbyte concat byte 0x00 int 0 -load 77 +frame_dig 3 setbyte concat byte 0x00 int 0 -load 78 +frame_dig 4 setbyte concat byte 0x00 int 0 -load 79 +frame_dig 5 setbyte concat byte 0x00 int 0 -load 80 +frame_dig 6 setbyte concat byte 0x00 int 0 -load 81 +frame_dig 7 setbyte concat byte 0x00 int 0 -load 82 +frame_dig 8 setbyte concat byte 0x00 int 0 -load 83 +frame_dig 9 setbyte concat byte 0x00 int 0 -load 84 +frame_dig 10 setbyte concat byte 0x00 int 0 -load 85 +frame_dig 11 setbyte concat byte 0x00 int 0 -load 86 +frame_dig 12 setbyte concat byte 0x00 int 0 -load 87 +frame_dig 13 setbyte concat byte 0x00 int 0 -load 88 +frame_dig 14 setbyte concat byte 0x00 int 0 -load 89 +frame_dig 15 setbyte concat byte 0x00 int 0 -load 90 +frame_dig 16 setbyte concat byte 0x00 int 0 -load 91 +frame_dig 17 setbyte concat byte 0x00 int 0 -load 92 +frame_dig 18 setbyte concat byte 0x00 int 0 -load 93 +frame_dig 19 setbyte concat byte 0x00 int 0 -load 94 +frame_dig 20 setbyte concat byte 0x00 int 0 -load 95 +frame_dig 21 setbyte concat byte 0x00 int 0 -load 96 +frame_dig 22 setbyte concat byte 0x00 int 0 -load 97 +frame_dig 23 setbyte concat byte 0x00 int 0 -load 98 +frame_dig 24 setbyte concat byte 0x00 int 0 -load 99 +frame_dig 25 setbyte concat byte 0x00 int 0 -load 100 +frame_dig 26 setbyte concat byte 0x00 int 0 -load 101 +frame_dig 27 setbyte concat byte 0x00 int 0 -load 102 +frame_dig 28 setbyte concat byte 0x00 int 0 -load 103 +frame_dig 29 setbyte concat byte 0x00 int 0 -load 104 +frame_dig 30 setbyte concat byte 0x00 int 0 -load 105 +frame_dig 31 setbyte concat byte 0x00 int 0 -load 106 +frame_dig 32 setbyte concat frame_bury 0 @@ -1418,10 +1479,56 @@ retsub tuplecomplement_11: proto 1 1 byte "" +dupn 1 +int 0 +dupn 3 +byte "" +dupn 4 +int 0 +dupn 2 +byte "" +dupn 1 +int 0 +dupn 7 +byte "" +dupn 1 +int 0 +byte "" +dupn 1 +int 0 +dupn 7 +byte "" +dupn 1 +int 0 +byte "" +dupn 1 +int 0 +dupn 7 +byte "" +dupn 1 +int 0 +dupn 2 +byte "" +dupn 1 +int 0 +byte "" +dupn 1 +int 0 +dupn 7 +byte "" +dupn 3 +int 0 +dupn 3 +byte "" +dupn 1 +int 0 +dupn 3 +byte "" +dupn 1 frame_dig -1 int 0 extract_uint32 -store 66 +frame_bury 3 frame_dig -1 frame_dig -1 int 4 @@ -1429,55 +1536,55 @@ extract_uint16 dig 1 len substring3 -store 67 +frame_bury 4 frame_dig -1 extract 6 1 -store 68 +frame_bury 5 frame_dig -1 extract 7 1 -store 69 +frame_bury 6 frame_dig -1 int 8 getbyte -store 70 -load 66 +frame_bury 7 +frame_dig 3 callsub numericalcomp_16 -store 66 -load 67 +frame_bury 3 +frame_dig 4 callsub arraycomplement_18 -store 67 -load 68 +frame_bury 4 +frame_dig 5 callsub arraycomplement_20 -store 68 -load 69 +frame_bury 5 +frame_dig 6 callsub tuplecomplement_21 -store 69 -load 70 +frame_bury 6 +frame_dig 7 callsub numericalcomp_22 -store 70 -load 66 +frame_bury 7 +frame_dig 3 itob extract 4 0 -load 67 -store 116 -load 116 -store 115 +frame_dig 4 +frame_bury 83 +frame_dig 83 +frame_bury 82 int 9 -store 114 -load 114 +frame_bury 80 +frame_dig 80 itob extract 6 0 concat -load 68 +frame_dig 5 concat -load 69 +frame_dig 6 concat byte 0x00 int 0 -load 70 +frame_dig 7 setbyte concat -load 115 +frame_dig 82 concat frame_bury 0 retsub @@ -1486,6 +1593,11 @@ retsub arraycomplement_12: proto 1 1 byte "" +dupn 2 +int 0 +dupn 1 +byte "" +dupn 1 frame_dig -1 frame_dig -1 int 2 @@ -1507,7 +1619,7 @@ int 2 extract_uint16 arraycomplement_12_l2: substring3 -store 107 +frame_bury 1 frame_dig -1 frame_dig -1 int 2 @@ -1538,44 +1650,44 @@ len b arraycomplement_12_l2 arraycomplement_12_l6: substring3 -store 108 -load 107 +frame_bury 2 +frame_dig 1 callsub tuplecomplement_11 -store 107 -load 108 +frame_bury 1 +frame_dig 2 callsub tuplecomplement_11 -store 108 -load 107 -store 112 -load 112 -store 111 +frame_bury 2 +frame_dig 1 +frame_bury 6 +frame_dig 6 +frame_bury 5 int 4 -store 109 -load 109 -load 112 +frame_bury 3 +frame_dig 3 +frame_dig 6 len + -store 110 -load 110 +frame_bury 4 +frame_dig 4 int 65536 < assert -load 109 +frame_dig 3 itob extract 6 0 -load 108 -store 112 -load 111 -load 112 -concat -store 111 -load 110 -store 109 -load 109 +frame_dig 2 +frame_bury 6 +frame_dig 5 +frame_dig 6 +concat +frame_bury 5 +frame_dig 4 +frame_bury 3 +frame_dig 3 itob extract 6 0 concat -load 111 +frame_dig 5 concat frame_bury 0 retsub @@ -1584,6 +1696,11 @@ retsub stringreverse_13: proto 1 1 byte "" +int 0 +dupn 7 +byte "" +dupn 1 +int 0 frame_dig -1 int 1 int 0 @@ -1591,7 +1708,7 @@ int 0 int 2 + getbyte -store 136 +frame_bury 3 frame_dig -1 int 1 int 1 @@ -1599,7 +1716,7 @@ int 1 int 2 + getbyte -store 135 +frame_bury 2 frame_dig -1 int 1 int 2 @@ -1607,24 +1724,24 @@ int 2 int 2 + getbyte -store 134 +frame_bury 1 int 3 -store 137 -load 137 +frame_bury 11 +frame_dig 11 itob extract 6 0 byte 0x00 int 0 -load 134 +frame_dig 1 setbyte byte 0x00 int 0 -load 135 +frame_dig 2 setbyte concat byte 0x00 int 0 -load 136 +frame_dig 3 setbyte concat concat @@ -1646,47 +1763,52 @@ retsub arraycomplement_15: proto 1 1 byte "" +int 0 +dupn 4 +byte "" +dupn 1 +int 0 frame_dig -1 int 0 int 16 + getbit -store 138 +frame_bury 1 frame_dig -1 int 1 int 16 + getbit -store 139 +frame_bury 2 frame_dig -1 int 2 int 16 + getbit -store 140 -load 138 +frame_bury 3 +frame_dig 1 callsub boolcomp_14 -store 138 -load 139 +frame_bury 1 +frame_dig 2 callsub boolcomp_14 -store 139 -load 140 +frame_bury 2 +frame_dig 3 callsub boolcomp_14 -store 140 +frame_bury 3 int 3 -store 141 -load 141 +frame_bury 8 +frame_dig 8 itob extract 6 0 byte 0x00 int 0 -load 138 +frame_dig 1 setbit int 1 -load 139 +frame_dig 2 setbit int 2 -load 140 +frame_dig 3 setbit concat frame_bury 0 @@ -1710,6 +1832,11 @@ retsub stringreverse_17: proto 1 1 byte "" +int 0 +dupn 7 +byte "" +dupn 1 +int 0 frame_dig -1 int 1 int 0 @@ -1717,7 +1844,7 @@ int 0 int 2 + getbyte -store 130 +frame_bury 3 frame_dig -1 int 1 int 1 @@ -1725,7 +1852,7 @@ int 1 int 2 + getbyte -store 129 +frame_bury 2 frame_dig -1 int 1 int 2 @@ -1733,24 +1860,24 @@ int 2 int 2 + getbyte -store 128 +frame_bury 1 int 3 -store 131 -load 131 +frame_bury 11 +frame_dig 11 itob extract 6 0 byte 0x00 int 0 -load 128 +frame_dig 1 setbyte byte 0x00 int 0 -load 129 +frame_dig 2 setbyte concat byte 0x00 int 0 -load 130 +frame_dig 3 setbyte concat concat @@ -1761,6 +1888,34 @@ retsub arraycomplement_18: proto 1 1 byte "" +dupn 3 +int 0 +dupn 2 +byte "" +dupn 1 +int 0 +dupn 7 +byte "" +dupn 1 +int 0 +byte "" +dupn 1 +int 0 +dupn 7 +byte "" +dupn 1 +int 0 +byte "" +dupn 1 +int 0 +dupn 7 +byte "" +dupn 1 +int 0 +dupn 2 +byte "" +dupn 1 +int 0 frame_dig -1 frame_dig -1 int 2 @@ -1777,8 +1932,8 @@ int 1 frame_dig -1 int 0 extract_uint16 -store 120 -load 120 +frame_bury 4 +frame_dig 4 == bnz arraycomplement_18_l8 frame_dig -1 @@ -1794,7 +1949,7 @@ int 2 + arraycomplement_18_l2: substring3 -store 117 +frame_bury 1 frame_dig -1 frame_dig -1 int 2 @@ -1811,8 +1966,8 @@ int 1 frame_dig -1 int 0 extract_uint16 -store 121 -load 121 +frame_bury 5 +frame_dig 5 == bnz arraycomplement_18_l7 frame_dig -1 @@ -1828,7 +1983,7 @@ int 2 + arraycomplement_18_l4: substring3 -store 118 +frame_bury 2 frame_dig -1 frame_dig -1 int 2 @@ -1845,8 +2000,8 @@ int 1 frame_dig -1 int 0 extract_uint16 -store 122 -load 122 +frame_bury 6 +frame_dig 6 == bnz arraycomplement_18_l6 frame_dig -1 @@ -1875,73 +2030,73 @@ len b arraycomplement_18_l2 arraycomplement_18_l9: substring3 -store 119 -load 117 +frame_bury 3 +frame_dig 1 callsub stringreverse_17 -store 117 -load 118 +frame_bury 1 +frame_dig 2 callsub stringreverse_17 -store 118 -load 119 +frame_bury 2 +frame_dig 3 callsub stringreverse_17 -store 119 +frame_bury 3 int 3 -store 127 -load 127 +frame_bury 50 +frame_dig 50 itob extract 6 0 -load 117 -store 126 -load 126 -store 125 +frame_dig 1 +frame_bury 49 +frame_dig 49 +frame_bury 48 int 6 -store 123 -load 123 -load 126 +frame_bury 46 +frame_dig 46 +frame_dig 49 len + -store 124 -load 124 +frame_bury 47 +frame_dig 47 int 65536 < assert -load 123 +frame_dig 46 itob extract 6 0 -load 118 -store 126 -load 125 -load 126 -concat -store 125 -load 124 -store 123 -load 123 -load 126 +frame_dig 2 +frame_bury 49 +frame_dig 48 +frame_dig 49 +concat +frame_bury 48 +frame_dig 47 +frame_bury 46 +frame_dig 46 +frame_dig 49 len + -store 124 -load 124 +frame_bury 47 +frame_dig 47 int 65536 < assert -load 123 +frame_dig 46 itob extract 6 0 concat -load 119 -store 126 -load 125 -load 126 +frame_dig 3 +frame_bury 49 +frame_dig 48 +frame_dig 49 concat -store 125 -load 124 -store 123 -load 123 +frame_bury 48 +frame_dig 47 +frame_bury 46 +frame_dig 46 itob extract 6 0 concat -load 125 +frame_dig 48 concat concat frame_bury 0 @@ -1962,26 +2117,30 @@ retsub arraycomplement_20: proto 1 1 byte "" +int 0 +dupn 7 +byte "" +dupn 1 frame_dig -1 int 0 getbit -store 132 +frame_bury 1 frame_dig -1 int 1 getbit -store 133 -load 132 +frame_bury 2 +frame_dig 1 callsub boolcomp_19 -store 132 -load 133 +frame_bury 1 +frame_dig 2 callsub boolcomp_19 -store 133 +frame_bury 2 byte 0x00 int 0 -load 132 +frame_dig 1 setbit int 1 -load 133 +frame_dig 2 setbit frame_bury 0 retsub @@ -1990,16 +2149,20 @@ retsub tuplecomplement_21: proto 1 1 byte "" +int 0 +dupn 3 +byte "" +dupn 1 frame_dig -1 int 0 getbyte -store 113 -load 113 +frame_bury 3 +frame_dig 3 callsub numericalcomp_23 -store 113 +frame_bury 3 byte 0x00 int 0 -load 113 +frame_dig 3 setbyte frame_bury 0 retsub diff --git a/tests/integration/teal/roundtrip/app_roundtrip_(bool,byte,address,string,uint64)_v8.teal b/tests/integration/teal/roundtrip/app_roundtrip_(bool,byte,address,string,uint64)_v8.teal index ac3980f9e..83280db32 100644 --- a/tests/integration/teal/roundtrip/app_roundtrip_(bool,byte,address,string,uint64)_v8.teal +++ b/tests/integration/teal/roundtrip/app_roundtrip_(bool,byte,address,string,uint64)_v8.teal @@ -15,6 +15,22 @@ return tuplecomplement_0: proto 1 1 byte "" +int 0 +dupn 4 +byte "" +dupn 1 +int 0 +dupn 97 +byte "" +dupn 3 +int 0 +dupn 7 +byte "" +dupn 1 +int 0 +dupn 4 +byte "" +dupn 1 frame_dig -1 int 0 getbit @@ -65,19 +81,19 @@ concat load 2 concat load 3 -store 15 -load 15 -store 14 +frame_bury 126 +frame_dig 126 +frame_bury 125 int 44 -store 13 -load 13 +frame_bury 123 +frame_dig 123 itob extract 6 0 concat load 4 itob concat -load 14 +frame_dig 125 concat frame_bury 0 retsub @@ -86,64 +102,69 @@ retsub roundtripper_1: proto 1 1 byte "" +dupn 2 +int 0 +dupn 1 +byte "" +dupn 1 frame_dig -1 callsub tuplecomplement_0 -store 7 -load 7 +frame_bury 1 +frame_dig 1 callsub tuplecomplement_0 -store 8 +frame_bury 2 frame_dig -1 -store 12 -load 12 -store 11 +frame_bury 6 +frame_dig 6 +frame_bury 5 int 6 -store 9 -load 9 -load 12 +frame_bury 3 +frame_dig 3 +frame_dig 6 len + -store 10 -load 10 +frame_bury 4 +frame_dig 4 int 65536 < assert -load 9 +frame_dig 3 itob extract 6 0 -load 7 -store 12 -load 11 -load 12 -concat -store 11 -load 10 -store 9 -load 9 -load 12 +frame_dig 1 +frame_bury 6 +frame_dig 5 +frame_dig 6 +concat +frame_bury 5 +frame_dig 4 +frame_bury 3 +frame_dig 3 +frame_dig 6 len + -store 10 -load 10 +frame_bury 4 +frame_dig 4 int 65536 < assert -load 9 +frame_dig 3 itob extract 6 0 concat -load 8 -store 12 -load 11 -load 12 +frame_dig 2 +frame_bury 6 +frame_dig 5 +frame_dig 6 concat -store 11 -load 10 -store 9 -load 9 +frame_bury 5 +frame_dig 4 +frame_bury 3 +frame_dig 3 itob extract 6 0 concat -load 11 +frame_dig 5 concat frame_bury 0 retsub @@ -191,451 +212,455 @@ retsub arraycomplement_5: proto 1 1 byte "" +int 0 +dupn 97 +byte "" +dupn 1 frame_dig -1 int 1 int 0 * getbyte -store 16 +frame_bury 1 frame_dig -1 int 1 int 1 * getbyte -store 17 +frame_bury 2 frame_dig -1 int 1 int 2 * getbyte -store 18 +frame_bury 3 frame_dig -1 int 1 int 3 * getbyte -store 19 +frame_bury 4 frame_dig -1 int 1 int 4 * getbyte -store 20 +frame_bury 5 frame_dig -1 int 1 int 5 * getbyte -store 21 +frame_bury 6 frame_dig -1 int 1 int 6 * getbyte -store 22 +frame_bury 7 frame_dig -1 int 1 int 7 * getbyte -store 23 +frame_bury 8 frame_dig -1 int 1 int 8 * getbyte -store 24 +frame_bury 9 frame_dig -1 int 1 int 9 * getbyte -store 25 +frame_bury 10 frame_dig -1 int 1 int 10 * getbyte -store 26 +frame_bury 11 frame_dig -1 int 1 int 11 * getbyte -store 27 +frame_bury 12 frame_dig -1 int 1 int 12 * getbyte -store 28 +frame_bury 13 frame_dig -1 int 1 int 13 * getbyte -store 29 +frame_bury 14 frame_dig -1 int 1 int 14 * getbyte -store 30 +frame_bury 15 frame_dig -1 int 1 int 15 * getbyte -store 31 +frame_bury 16 frame_dig -1 int 1 int 16 * getbyte -store 32 +frame_bury 17 frame_dig -1 int 1 int 17 * getbyte -store 33 +frame_bury 18 frame_dig -1 int 1 int 18 * getbyte -store 34 +frame_bury 19 frame_dig -1 int 1 int 19 * getbyte -store 35 +frame_bury 20 frame_dig -1 int 1 int 20 * getbyte -store 36 +frame_bury 21 frame_dig -1 int 1 int 21 * getbyte -store 37 +frame_bury 22 frame_dig -1 int 1 int 22 * getbyte -store 38 +frame_bury 23 frame_dig -1 int 1 int 23 * getbyte -store 39 +frame_bury 24 frame_dig -1 int 1 int 24 * getbyte -store 40 +frame_bury 25 frame_dig -1 int 1 int 25 * getbyte -store 41 +frame_bury 26 frame_dig -1 int 1 int 26 * getbyte -store 42 +frame_bury 27 frame_dig -1 int 1 int 27 * getbyte -store 43 +frame_bury 28 frame_dig -1 int 1 int 28 * getbyte -store 44 +frame_bury 29 frame_dig -1 int 1 int 29 * getbyte -store 45 +frame_bury 30 frame_dig -1 int 1 int 30 * getbyte -store 46 +frame_bury 31 frame_dig -1 int 1 int 31 * getbyte -store 47 -load 16 +frame_bury 32 +frame_dig 1 callsub numericalcomp_4 -store 16 -load 17 +frame_bury 1 +frame_dig 2 callsub numericalcomp_4 -store 17 -load 18 +frame_bury 2 +frame_dig 3 callsub numericalcomp_4 -store 18 -load 19 +frame_bury 3 +frame_dig 4 callsub numericalcomp_4 -store 19 -load 20 +frame_bury 4 +frame_dig 5 callsub numericalcomp_4 -store 20 -load 21 +frame_bury 5 +frame_dig 6 callsub numericalcomp_4 -store 21 -load 22 +frame_bury 6 +frame_dig 7 callsub numericalcomp_4 -store 22 -load 23 +frame_bury 7 +frame_dig 8 callsub numericalcomp_4 -store 23 -load 24 +frame_bury 8 +frame_dig 9 callsub numericalcomp_4 -store 24 -load 25 +frame_bury 9 +frame_dig 10 callsub numericalcomp_4 -store 25 -load 26 +frame_bury 10 +frame_dig 11 callsub numericalcomp_4 -store 26 -load 27 +frame_bury 11 +frame_dig 12 callsub numericalcomp_4 -store 27 -load 28 +frame_bury 12 +frame_dig 13 callsub numericalcomp_4 -store 28 -load 29 +frame_bury 13 +frame_dig 14 callsub numericalcomp_4 -store 29 -load 30 +frame_bury 14 +frame_dig 15 callsub numericalcomp_4 -store 30 -load 31 +frame_bury 15 +frame_dig 16 callsub numericalcomp_4 -store 31 -load 32 +frame_bury 16 +frame_dig 17 callsub numericalcomp_4 -store 32 -load 33 +frame_bury 17 +frame_dig 18 callsub numericalcomp_4 -store 33 -load 34 +frame_bury 18 +frame_dig 19 callsub numericalcomp_4 -store 34 -load 35 +frame_bury 19 +frame_dig 20 callsub numericalcomp_4 -store 35 -load 36 +frame_bury 20 +frame_dig 21 callsub numericalcomp_4 -store 36 -load 37 +frame_bury 21 +frame_dig 22 callsub numericalcomp_4 -store 37 -load 38 +frame_bury 22 +frame_dig 23 callsub numericalcomp_4 -store 38 -load 39 +frame_bury 23 +frame_dig 24 callsub numericalcomp_4 -store 39 -load 40 +frame_bury 24 +frame_dig 25 callsub numericalcomp_4 -store 40 -load 41 +frame_bury 25 +frame_dig 26 callsub numericalcomp_4 -store 41 -load 42 +frame_bury 26 +frame_dig 27 callsub numericalcomp_4 -store 42 -load 43 +frame_bury 27 +frame_dig 28 callsub numericalcomp_4 -store 43 -load 44 +frame_bury 28 +frame_dig 29 callsub numericalcomp_4 -store 44 -load 45 +frame_bury 29 +frame_dig 30 callsub numericalcomp_4 -store 45 -load 46 +frame_bury 30 +frame_dig 31 callsub numericalcomp_4 -store 46 -load 47 +frame_bury 31 +frame_dig 32 callsub numericalcomp_4 -store 47 +frame_bury 32 byte 0x00 int 0 -load 16 +frame_dig 1 setbyte byte 0x00 int 0 -load 17 +frame_dig 2 setbyte concat byte 0x00 int 0 -load 18 +frame_dig 3 setbyte concat byte 0x00 int 0 -load 19 +frame_dig 4 setbyte concat byte 0x00 int 0 -load 20 +frame_dig 5 setbyte concat byte 0x00 int 0 -load 21 +frame_dig 6 setbyte concat byte 0x00 int 0 -load 22 +frame_dig 7 setbyte concat byte 0x00 int 0 -load 23 +frame_dig 8 setbyte concat byte 0x00 int 0 -load 24 +frame_dig 9 setbyte concat byte 0x00 int 0 -load 25 +frame_dig 10 setbyte concat byte 0x00 int 0 -load 26 +frame_dig 11 setbyte concat byte 0x00 int 0 -load 27 +frame_dig 12 setbyte concat byte 0x00 int 0 -load 28 +frame_dig 13 setbyte concat byte 0x00 int 0 -load 29 +frame_dig 14 setbyte concat byte 0x00 int 0 -load 30 +frame_dig 15 setbyte concat byte 0x00 int 0 -load 31 +frame_dig 16 setbyte concat byte 0x00 int 0 -load 32 +frame_dig 17 setbyte concat byte 0x00 int 0 -load 33 +frame_dig 18 setbyte concat byte 0x00 int 0 -load 34 +frame_dig 19 setbyte concat byte 0x00 int 0 -load 35 +frame_dig 20 setbyte concat byte 0x00 int 0 -load 36 +frame_dig 21 setbyte concat byte 0x00 int 0 -load 37 +frame_dig 22 setbyte concat byte 0x00 int 0 -load 38 +frame_dig 23 setbyte concat byte 0x00 int 0 -load 39 +frame_dig 24 setbyte concat byte 0x00 int 0 -load 40 +frame_dig 25 setbyte concat byte 0x00 int 0 -load 41 +frame_dig 26 setbyte concat byte 0x00 int 0 -load 42 +frame_dig 27 setbyte concat byte 0x00 int 0 -load 43 +frame_dig 28 setbyte concat byte 0x00 int 0 -load 44 +frame_dig 29 setbyte concat byte 0x00 int 0 -load 45 +frame_dig 30 setbyte concat byte 0x00 int 0 -load 46 +frame_dig 31 setbyte concat byte 0x00 int 0 -load 47 +frame_dig 32 setbyte concat frame_bury 0 @@ -645,6 +670,11 @@ retsub stringreverse_6: proto 1 1 byte "" +int 0 +dupn 7 +byte "" +dupn 1 +int 0 frame_dig -1 int 1 int 0 @@ -652,7 +682,7 @@ int 0 int 2 + getbyte -store 50 +frame_bury 3 frame_dig -1 int 1 int 1 @@ -660,7 +690,7 @@ int 1 int 2 + getbyte -store 49 +frame_bury 2 frame_dig -1 int 1 int 2 @@ -668,24 +698,24 @@ int 2 int 2 + getbyte -store 48 +frame_bury 1 int 3 -store 51 -load 51 +frame_bury 11 +frame_dig 11 itob extract 6 0 byte 0x00 int 0 -load 48 +frame_dig 1 setbyte byte 0x00 int 0 -load 49 +frame_dig 2 setbyte concat byte 0x00 int 0 -load 50 +frame_dig 3 setbyte concat concat diff --git a/tests/integration/teal/roundtrip/app_roundtrip_(bool,uint64,uint32)_v8.teal b/tests/integration/teal/roundtrip/app_roundtrip_(bool,uint64,uint32)_v8.teal index 8f04b8ad0..a7d3a0874 100644 --- a/tests/integration/teal/roundtrip/app_roundtrip_(bool,uint64,uint32)_v8.teal +++ b/tests/integration/teal/roundtrip/app_roundtrip_(bool,uint64,uint32)_v8.teal @@ -15,6 +15,10 @@ return tuplecomplement_0: proto 1 1 byte "" +int 0 +dupn 7 +byte "" +dupn 1 frame_dig -1 int 0 getbit @@ -54,16 +58,21 @@ retsub roundtripper_1: proto 1 1 byte "" +dupn 2 +int 0 +dupn 1 +byte "" +dupn 1 frame_dig -1 callsub tuplecomplement_0 -store 5 -load 5 +frame_bury 1 +frame_dig 1 callsub tuplecomplement_0 -store 6 +frame_bury 2 frame_dig -1 -load 5 +frame_dig 1 concat -load 6 +frame_dig 2 concat frame_bury 0 retsub diff --git a/tests/integration/teal/roundtrip/app_roundtrip_(byte)_v8.teal b/tests/integration/teal/roundtrip/app_roundtrip_(byte)_v8.teal index 4a8d567ff..10bed04e6 100644 --- a/tests/integration/teal/roundtrip/app_roundtrip_(byte)_v8.teal +++ b/tests/integration/teal/roundtrip/app_roundtrip_(byte)_v8.teal @@ -15,6 +15,10 @@ return tuplecomplement_0: proto 1 1 byte "" +int 0 +dupn 3 +byte "" +dupn 1 frame_dig -1 int 0 getbyte @@ -33,16 +37,21 @@ retsub roundtripper_1: proto 1 1 byte "" +dupn 2 +int 0 +dupn 1 +byte "" +dupn 1 frame_dig -1 callsub tuplecomplement_0 -store 3 -load 3 +frame_bury 1 +frame_dig 1 callsub tuplecomplement_0 -store 4 +frame_bury 2 frame_dig -1 -load 3 +frame_dig 1 concat -load 4 +frame_dig 2 concat frame_bury 0 retsub diff --git a/tests/integration/teal/roundtrip/app_roundtrip_(byte,bool,uint64)_v8.teal b/tests/integration/teal/roundtrip/app_roundtrip_(byte,bool,uint64)_v8.teal index a5fb0355f..35d4ad2b6 100644 --- a/tests/integration/teal/roundtrip/app_roundtrip_(byte,bool,uint64)_v8.teal +++ b/tests/integration/teal/roundtrip/app_roundtrip_(byte,bool,uint64)_v8.teal @@ -15,6 +15,10 @@ return tuplecomplement_0: proto 1 1 byte "" +int 0 +dupn 7 +byte "" +dupn 1 frame_dig -1 int 0 getbyte @@ -55,16 +59,21 @@ retsub roundtripper_1: proto 1 1 byte "" +dupn 2 +int 0 +dupn 1 +byte "" +dupn 1 frame_dig -1 callsub tuplecomplement_0 -store 5 -load 5 +frame_bury 1 +frame_dig 1 callsub tuplecomplement_0 -store 6 +frame_bury 2 frame_dig -1 -load 5 +frame_dig 1 concat -load 6 +frame_dig 2 concat frame_bury 0 retsub diff --git a/tests/integration/teal/roundtrip/app_roundtrip_(byte[4],(bool,bool),uint64,address)[]_7_v8.teal b/tests/integration/teal/roundtrip/app_roundtrip_(byte[4],(bool,bool),uint64,address)[]_7_v8.teal index 064b29fc8..71231c6e4 100644 --- a/tests/integration/teal/roundtrip/app_roundtrip_(byte[4],(bool,bool),uint64,address)[]_7_v8.teal +++ b/tests/integration/teal/roundtrip/app_roundtrip_(byte[4],(bool,bool),uint64,address)[]_7_v8.teal @@ -15,6 +15,24 @@ return tuplecomplement_0: proto 1 1 byte "" +int 0 +dupn 3 +byte "" +dupn 1 +int 0 +dupn 13 +byte "" +dupn 3 +int 0 +dupn 5 +byte "" +dupn 1 +int 0 +dupn 1 +byte "" +dupn 1 +int 0 +dupn 90 frame_dig -1 extract 0 4 store 0 @@ -55,6 +73,12 @@ retsub arraycomplement_1: proto 1 1 byte "" +dupn 7 +int 0 +dupn 8 +byte "" +dupn 1 +int 0 frame_dig -1 int 45 int 0 @@ -63,7 +87,7 @@ int 2 + int 45 extract3 -store 12 +frame_bury 1 frame_dig -1 int 45 int 1 @@ -72,7 +96,7 @@ int 2 + int 45 extract3 -store 13 +frame_bury 2 frame_dig -1 int 45 int 2 @@ -81,7 +105,7 @@ int 2 + int 45 extract3 -store 14 +frame_bury 3 frame_dig -1 int 45 int 3 @@ -90,7 +114,7 @@ int 2 + int 45 extract3 -store 15 +frame_bury 4 frame_dig -1 int 45 int 4 @@ -99,7 +123,7 @@ int 2 + int 45 extract3 -store 16 +frame_bury 5 frame_dig -1 int 45 int 5 @@ -108,7 +132,7 @@ int 2 + int 45 extract3 -store 17 +frame_bury 6 frame_dig -1 int 45 int 6 @@ -117,45 +141,45 @@ int 2 + int 45 extract3 -store 18 -load 12 +frame_bury 7 +frame_dig 1 callsub tuplecomplement_0 -store 12 -load 13 +frame_bury 1 +frame_dig 2 callsub tuplecomplement_0 -store 13 -load 14 +frame_bury 2 +frame_dig 3 callsub tuplecomplement_0 -store 14 -load 15 +frame_bury 3 +frame_dig 4 callsub tuplecomplement_0 -store 15 -load 16 +frame_bury 4 +frame_dig 5 callsub tuplecomplement_0 -store 16 -load 17 +frame_bury 5 +frame_dig 6 callsub tuplecomplement_0 -store 17 -load 18 +frame_bury 6 +frame_dig 7 callsub tuplecomplement_0 -store 18 +frame_bury 7 int 7 -store 19 -load 19 +frame_bury 19 +frame_dig 19 itob extract 6 0 -load 12 -load 13 +frame_dig 1 +frame_dig 2 concat -load 14 +frame_dig 3 concat -load 15 +frame_dig 4 concat -load 16 +frame_dig 5 concat -load 17 +frame_dig 6 concat -load 18 +frame_dig 7 concat concat frame_bury 0 @@ -165,64 +189,69 @@ retsub roundtripper_2: proto 1 1 byte "" +dupn 2 +int 0 +dupn 1 +byte "" +dupn 1 frame_dig -1 callsub arraycomplement_1 -store 6 -load 6 +frame_bury 1 +frame_dig 1 callsub arraycomplement_1 -store 7 +frame_bury 2 frame_dig -1 -store 11 -load 11 -store 10 +frame_bury 6 +frame_dig 6 +frame_bury 5 int 6 -store 8 -load 8 -load 11 +frame_bury 3 +frame_dig 3 +frame_dig 6 len + -store 9 -load 9 +frame_bury 4 +frame_dig 4 int 65536 < assert -load 8 +frame_dig 3 itob extract 6 0 -load 6 -store 11 -load 10 -load 11 -concat -store 10 -load 9 -store 8 -load 8 -load 11 +frame_dig 1 +frame_bury 6 +frame_dig 5 +frame_dig 6 +concat +frame_bury 5 +frame_dig 4 +frame_bury 3 +frame_dig 3 +frame_dig 6 len + -store 9 -load 9 +frame_bury 4 +frame_dig 4 int 65536 < assert -load 8 +frame_dig 3 itob extract 6 0 concat -load 7 -store 11 -load 10 -load 11 +frame_dig 2 +frame_bury 6 +frame_dig 5 +frame_dig 6 concat -store 10 -load 9 -store 8 -load 8 +frame_bury 5 +frame_dig 4 +frame_bury 3 +frame_dig 3 itob extract 6 0 concat -load 10 +frame_dig 5 concat frame_bury 0 retsub @@ -245,59 +274,63 @@ retsub arraycomplement_4: proto 1 1 byte "" +int 0 +dupn 13 +byte "" +dupn 1 frame_dig -1 int 1 int 0 * getbyte -store 22 +frame_bury 1 frame_dig -1 int 1 int 1 * getbyte -store 23 +frame_bury 2 frame_dig -1 int 1 int 2 * getbyte -store 24 +frame_bury 3 frame_dig -1 int 1 int 3 * getbyte -store 25 -load 22 +frame_bury 4 +frame_dig 1 callsub numericalcomp_3 -store 22 -load 23 +frame_bury 1 +frame_dig 2 callsub numericalcomp_3 -store 23 -load 24 +frame_bury 2 +frame_dig 3 callsub numericalcomp_3 -store 24 -load 25 +frame_bury 3 +frame_dig 4 callsub numericalcomp_3 -store 25 +frame_bury 4 byte 0x00 int 0 -load 22 +frame_dig 1 setbyte byte 0x00 int 0 -load 23 +frame_dig 2 setbyte concat byte 0x00 int 0 -load 24 +frame_dig 3 setbyte concat byte 0x00 int 0 -load 25 +frame_dig 4 setbyte concat frame_bury 0 @@ -307,26 +340,30 @@ retsub tuplecomplement_5: proto 1 1 byte "" +int 0 +dupn 5 +byte "" +dupn 1 frame_dig -1 int 0 getbit -store 20 +frame_bury 2 frame_dig -1 int 1 getbit -store 21 -load 20 +frame_bury 3 +frame_dig 2 callsub boolcomp_9 -store 20 -load 21 +frame_bury 2 +frame_dig 3 callsub boolcomp_10 -store 21 +frame_bury 3 byte 0x00 int 0 -load 20 +frame_dig 2 setbit int 1 -load 21 +frame_dig 3 setbit frame_bury 0 retsub @@ -359,451 +396,455 @@ retsub arraycomplement_8: proto 1 1 byte "" +int 0 +dupn 33 +byte "" +dupn 1 frame_dig -1 int 1 int 0 * getbyte -store 26 +frame_bury 1 frame_dig -1 int 1 int 1 * getbyte -store 27 +frame_bury 2 frame_dig -1 int 1 int 2 * getbyte -store 28 +frame_bury 3 frame_dig -1 int 1 int 3 * getbyte -store 29 +frame_bury 4 frame_dig -1 int 1 int 4 * getbyte -store 30 +frame_bury 5 frame_dig -1 int 1 int 5 * getbyte -store 31 +frame_bury 6 frame_dig -1 int 1 int 6 * getbyte -store 32 +frame_bury 7 frame_dig -1 int 1 int 7 * getbyte -store 33 +frame_bury 8 frame_dig -1 int 1 int 8 * getbyte -store 34 +frame_bury 9 frame_dig -1 int 1 int 9 * getbyte -store 35 +frame_bury 10 frame_dig -1 int 1 int 10 * getbyte -store 36 +frame_bury 11 frame_dig -1 int 1 int 11 * getbyte -store 37 +frame_bury 12 frame_dig -1 int 1 int 12 * getbyte -store 38 +frame_bury 13 frame_dig -1 int 1 int 13 * getbyte -store 39 +frame_bury 14 frame_dig -1 int 1 int 14 * getbyte -store 40 +frame_bury 15 frame_dig -1 int 1 int 15 * getbyte -store 41 +frame_bury 16 frame_dig -1 int 1 int 16 * getbyte -store 42 +frame_bury 17 frame_dig -1 int 1 int 17 * getbyte -store 43 +frame_bury 18 frame_dig -1 int 1 int 18 * getbyte -store 44 +frame_bury 19 frame_dig -1 int 1 int 19 * getbyte -store 45 +frame_bury 20 frame_dig -1 int 1 int 20 * getbyte -store 46 +frame_bury 21 frame_dig -1 int 1 int 21 * getbyte -store 47 +frame_bury 22 frame_dig -1 int 1 int 22 * getbyte -store 48 +frame_bury 23 frame_dig -1 int 1 int 23 * getbyte -store 49 +frame_bury 24 frame_dig -1 int 1 int 24 * getbyte -store 50 +frame_bury 25 frame_dig -1 int 1 int 25 * getbyte -store 51 +frame_bury 26 frame_dig -1 int 1 int 26 * getbyte -store 52 +frame_bury 27 frame_dig -1 int 1 int 27 * getbyte -store 53 +frame_bury 28 frame_dig -1 int 1 int 28 * getbyte -store 54 +frame_bury 29 frame_dig -1 int 1 int 29 * getbyte -store 55 +frame_bury 30 frame_dig -1 int 1 int 30 * getbyte -store 56 +frame_bury 31 frame_dig -1 int 1 int 31 * getbyte -store 57 -load 26 +frame_bury 32 +frame_dig 1 callsub numericalcomp_7 -store 26 -load 27 +frame_bury 1 +frame_dig 2 callsub numericalcomp_7 -store 27 -load 28 +frame_bury 2 +frame_dig 3 callsub numericalcomp_7 -store 28 -load 29 +frame_bury 3 +frame_dig 4 callsub numericalcomp_7 -store 29 -load 30 +frame_bury 4 +frame_dig 5 callsub numericalcomp_7 -store 30 -load 31 +frame_bury 5 +frame_dig 6 callsub numericalcomp_7 -store 31 -load 32 +frame_bury 6 +frame_dig 7 callsub numericalcomp_7 -store 32 -load 33 +frame_bury 7 +frame_dig 8 callsub numericalcomp_7 -store 33 -load 34 +frame_bury 8 +frame_dig 9 callsub numericalcomp_7 -store 34 -load 35 +frame_bury 9 +frame_dig 10 callsub numericalcomp_7 -store 35 -load 36 +frame_bury 10 +frame_dig 11 callsub numericalcomp_7 -store 36 -load 37 +frame_bury 11 +frame_dig 12 callsub numericalcomp_7 -store 37 -load 38 +frame_bury 12 +frame_dig 13 callsub numericalcomp_7 -store 38 -load 39 +frame_bury 13 +frame_dig 14 callsub numericalcomp_7 -store 39 -load 40 +frame_bury 14 +frame_dig 15 callsub numericalcomp_7 -store 40 -load 41 +frame_bury 15 +frame_dig 16 callsub numericalcomp_7 -store 41 -load 42 +frame_bury 16 +frame_dig 17 callsub numericalcomp_7 -store 42 -load 43 +frame_bury 17 +frame_dig 18 callsub numericalcomp_7 -store 43 -load 44 +frame_bury 18 +frame_dig 19 callsub numericalcomp_7 -store 44 -load 45 +frame_bury 19 +frame_dig 20 callsub numericalcomp_7 -store 45 -load 46 +frame_bury 20 +frame_dig 21 callsub numericalcomp_7 -store 46 -load 47 +frame_bury 21 +frame_dig 22 callsub numericalcomp_7 -store 47 -load 48 +frame_bury 22 +frame_dig 23 callsub numericalcomp_7 -store 48 -load 49 +frame_bury 23 +frame_dig 24 callsub numericalcomp_7 -store 49 -load 50 +frame_bury 24 +frame_dig 25 callsub numericalcomp_7 -store 50 -load 51 +frame_bury 25 +frame_dig 26 callsub numericalcomp_7 -store 51 -load 52 +frame_bury 26 +frame_dig 27 callsub numericalcomp_7 -store 52 -load 53 +frame_bury 27 +frame_dig 28 callsub numericalcomp_7 -store 53 -load 54 +frame_bury 28 +frame_dig 29 callsub numericalcomp_7 -store 54 -load 55 +frame_bury 29 +frame_dig 30 callsub numericalcomp_7 -store 55 -load 56 +frame_bury 30 +frame_dig 31 callsub numericalcomp_7 -store 56 -load 57 +frame_bury 31 +frame_dig 32 callsub numericalcomp_7 -store 57 +frame_bury 32 byte 0x00 int 0 -load 26 +frame_dig 1 setbyte byte 0x00 int 0 -load 27 +frame_dig 2 setbyte concat byte 0x00 int 0 -load 28 +frame_dig 3 setbyte concat byte 0x00 int 0 -load 29 +frame_dig 4 setbyte concat byte 0x00 int 0 -load 30 +frame_dig 5 setbyte concat byte 0x00 int 0 -load 31 +frame_dig 6 setbyte concat byte 0x00 int 0 -load 32 +frame_dig 7 setbyte concat byte 0x00 int 0 -load 33 +frame_dig 8 setbyte concat byte 0x00 int 0 -load 34 +frame_dig 9 setbyte concat byte 0x00 int 0 -load 35 +frame_dig 10 setbyte concat byte 0x00 int 0 -load 36 +frame_dig 11 setbyte concat byte 0x00 int 0 -load 37 +frame_dig 12 setbyte concat byte 0x00 int 0 -load 38 +frame_dig 13 setbyte concat byte 0x00 int 0 -load 39 +frame_dig 14 setbyte concat byte 0x00 int 0 -load 40 +frame_dig 15 setbyte concat byte 0x00 int 0 -load 41 +frame_dig 16 setbyte concat byte 0x00 int 0 -load 42 +frame_dig 17 setbyte concat byte 0x00 int 0 -load 43 +frame_dig 18 setbyte concat byte 0x00 int 0 -load 44 +frame_dig 19 setbyte concat byte 0x00 int 0 -load 45 +frame_dig 20 setbyte concat byte 0x00 int 0 -load 46 +frame_dig 21 setbyte concat byte 0x00 int 0 -load 47 +frame_dig 22 setbyte concat byte 0x00 int 0 -load 48 +frame_dig 23 setbyte concat byte 0x00 int 0 -load 49 +frame_dig 24 setbyte concat byte 0x00 int 0 -load 50 +frame_dig 25 setbyte concat byte 0x00 int 0 -load 51 +frame_dig 26 setbyte concat byte 0x00 int 0 -load 52 +frame_dig 27 setbyte concat byte 0x00 int 0 -load 53 +frame_dig 28 setbyte concat byte 0x00 int 0 -load 54 +frame_dig 29 setbyte concat byte 0x00 int 0 -load 55 +frame_dig 30 setbyte concat byte 0x00 int 0 -load 56 +frame_dig 31 setbyte concat byte 0x00 int 0 -load 57 +frame_dig 32 setbyte concat frame_bury 0 diff --git a/tests/integration/teal/roundtrip/app_roundtrip_(uint16)_v8.teal b/tests/integration/teal/roundtrip/app_roundtrip_(uint16)_v8.teal index 3a683e4cf..c349cd533 100644 --- a/tests/integration/teal/roundtrip/app_roundtrip_(uint16)_v8.teal +++ b/tests/integration/teal/roundtrip/app_roundtrip_(uint16)_v8.teal @@ -15,6 +15,10 @@ return tuplecomplement_0: proto 1 1 byte "" +int 0 +dupn 3 +byte "" +dupn 1 frame_dig -1 int 0 extract_uint16 @@ -32,16 +36,21 @@ retsub roundtripper_1: proto 1 1 byte "" +dupn 2 +int 0 +dupn 1 +byte "" +dupn 1 frame_dig -1 callsub tuplecomplement_0 -store 3 -load 3 +frame_bury 1 +frame_dig 1 callsub tuplecomplement_0 -store 4 +frame_bury 2 frame_dig -1 -load 3 +frame_dig 1 concat -load 4 +frame_dig 2 concat frame_bury 0 retsub diff --git a/tests/integration/teal/roundtrip/app_roundtrip_(uint16,uint8,byte)_v8.teal b/tests/integration/teal/roundtrip/app_roundtrip_(uint16,uint8,byte)_v8.teal index 47ddf0b4c..90f8f675e 100644 --- a/tests/integration/teal/roundtrip/app_roundtrip_(uint16,uint8,byte)_v8.teal +++ b/tests/integration/teal/roundtrip/app_roundtrip_(uint16,uint8,byte)_v8.teal @@ -15,6 +15,10 @@ return tuplecomplement_0: proto 1 1 byte "" +int 0 +dupn 7 +byte "" +dupn 1 frame_dig -1 int 0 extract_uint16 @@ -56,16 +60,21 @@ retsub roundtripper_1: proto 1 1 byte "" +dupn 2 +int 0 +dupn 1 +byte "" +dupn 1 frame_dig -1 callsub tuplecomplement_0 -store 5 -load 5 +frame_bury 1 +frame_dig 1 callsub tuplecomplement_0 -store 6 +frame_bury 2 frame_dig -1 -load 5 +frame_dig 1 concat -load 6 +frame_dig 2 concat frame_bury 0 retsub diff --git a/tests/integration/teal/roundtrip/app_roundtrip_(uint32)_v8.teal b/tests/integration/teal/roundtrip/app_roundtrip_(uint32)_v8.teal index a4b6b04a2..f7a6e1064 100644 --- a/tests/integration/teal/roundtrip/app_roundtrip_(uint32)_v8.teal +++ b/tests/integration/teal/roundtrip/app_roundtrip_(uint32)_v8.teal @@ -15,6 +15,10 @@ return tuplecomplement_0: proto 1 1 byte "" +int 0 +dupn 3 +byte "" +dupn 1 frame_dig -1 int 0 extract_uint32 @@ -32,16 +36,21 @@ retsub roundtripper_1: proto 1 1 byte "" +dupn 2 +int 0 +dupn 1 +byte "" +dupn 1 frame_dig -1 callsub tuplecomplement_0 -store 3 -load 3 +frame_bury 1 +frame_dig 1 callsub tuplecomplement_0 -store 4 +frame_bury 2 frame_dig -1 -load 3 +frame_dig 1 concat -load 4 +frame_dig 2 concat frame_bury 0 retsub diff --git a/tests/integration/teal/roundtrip/app_roundtrip_(uint32,uint16,uint8)_v8.teal b/tests/integration/teal/roundtrip/app_roundtrip_(uint32,uint16,uint8)_v8.teal index 8a165cddc..993e3f595 100644 --- a/tests/integration/teal/roundtrip/app_roundtrip_(uint32,uint16,uint8)_v8.teal +++ b/tests/integration/teal/roundtrip/app_roundtrip_(uint32,uint16,uint8)_v8.teal @@ -15,6 +15,10 @@ return tuplecomplement_0: proto 1 1 byte "" +int 0 +dupn 7 +byte "" +dupn 1 frame_dig -1 int 0 extract_uint32 @@ -55,16 +59,21 @@ retsub roundtripper_1: proto 1 1 byte "" +dupn 2 +int 0 +dupn 1 +byte "" +dupn 1 frame_dig -1 callsub tuplecomplement_0 -store 5 -load 5 +frame_bury 1 +frame_dig 1 callsub tuplecomplement_0 -store 6 +frame_bury 2 frame_dig -1 -load 5 +frame_dig 1 concat -load 6 +frame_dig 2 concat frame_bury 0 retsub diff --git a/tests/integration/teal/roundtrip/app_roundtrip_(uint64)_v8.teal b/tests/integration/teal/roundtrip/app_roundtrip_(uint64)_v8.teal index 5ba9c63c6..de7a29801 100644 --- a/tests/integration/teal/roundtrip/app_roundtrip_(uint64)_v8.teal +++ b/tests/integration/teal/roundtrip/app_roundtrip_(uint64)_v8.teal @@ -15,6 +15,10 @@ return tuplecomplement_0: proto 1 1 byte "" +int 0 +dupn 3 +byte "" +dupn 1 frame_dig -1 btoi store 0 @@ -30,16 +34,21 @@ retsub roundtripper_1: proto 1 1 byte "" +dupn 2 +int 0 +dupn 1 +byte "" +dupn 1 frame_dig -1 callsub tuplecomplement_0 -store 3 -load 3 +frame_bury 1 +frame_dig 1 callsub tuplecomplement_0 -store 4 +frame_bury 2 frame_dig -1 -load 3 +frame_dig 1 concat -load 4 +frame_dig 2 concat frame_bury 0 retsub diff --git a/tests/integration/teal/roundtrip/app_roundtrip_(uint64,uint32,uint16)_v8.teal b/tests/integration/teal/roundtrip/app_roundtrip_(uint64,uint32,uint16)_v8.teal index 33a5fb36c..057133312 100644 --- a/tests/integration/teal/roundtrip/app_roundtrip_(uint64,uint32,uint16)_v8.teal +++ b/tests/integration/teal/roundtrip/app_roundtrip_(uint64,uint32,uint16)_v8.teal @@ -15,6 +15,10 @@ return tuplecomplement_0: proto 1 1 byte "" +int 0 +dupn 7 +byte "" +dupn 1 frame_dig -1 int 0 extract_uint64 @@ -53,16 +57,21 @@ retsub roundtripper_1: proto 1 1 byte "" +dupn 2 +int 0 +dupn 1 +byte "" +dupn 1 frame_dig -1 callsub tuplecomplement_0 -store 5 -load 5 +frame_bury 1 +frame_dig 1 callsub tuplecomplement_0 -store 6 +frame_bury 2 frame_dig -1 -load 5 +frame_dig 1 concat -load 6 +frame_dig 2 concat frame_bury 0 retsub diff --git a/tests/integration/teal/roundtrip/app_roundtrip_(uint8)_v8.teal b/tests/integration/teal/roundtrip/app_roundtrip_(uint8)_v8.teal index 4a8d567ff..10bed04e6 100644 --- a/tests/integration/teal/roundtrip/app_roundtrip_(uint8)_v8.teal +++ b/tests/integration/teal/roundtrip/app_roundtrip_(uint8)_v8.teal @@ -15,6 +15,10 @@ return tuplecomplement_0: proto 1 1 byte "" +int 0 +dupn 3 +byte "" +dupn 1 frame_dig -1 int 0 getbyte @@ -33,16 +37,21 @@ retsub roundtripper_1: proto 1 1 byte "" +dupn 2 +int 0 +dupn 1 +byte "" +dupn 1 frame_dig -1 callsub tuplecomplement_0 -store 3 -load 3 +frame_bury 1 +frame_dig 1 callsub tuplecomplement_0 -store 4 +frame_bury 2 frame_dig -1 -load 3 +frame_dig 1 concat -load 4 +frame_dig 2 concat frame_bury 0 retsub diff --git a/tests/integration/teal/roundtrip/app_roundtrip_(uint8,byte,bool)_v8.teal b/tests/integration/teal/roundtrip/app_roundtrip_(uint8,byte,bool)_v8.teal index 853a8b269..78eab7698 100644 --- a/tests/integration/teal/roundtrip/app_roundtrip_(uint8,byte,bool)_v8.teal +++ b/tests/integration/teal/roundtrip/app_roundtrip_(uint8,byte,bool)_v8.teal @@ -15,6 +15,10 @@ return tuplecomplement_0: proto 1 1 byte "" +int 0 +dupn 7 +byte "" +dupn 1 frame_dig -1 int 0 getbyte @@ -57,16 +61,21 @@ retsub roundtripper_1: proto 1 1 byte "" +dupn 2 +int 0 +dupn 1 +byte "" +dupn 1 frame_dig -1 callsub tuplecomplement_0 -store 5 -load 5 +frame_bury 1 +frame_dig 1 callsub tuplecomplement_0 -store 6 +frame_bury 2 frame_dig -1 -load 5 +frame_dig 1 concat -load 6 +frame_dig 2 concat frame_bury 0 retsub diff --git a/tests/integration/teal/roundtrip/app_roundtrip_address[]_10_v8.teal b/tests/integration/teal/roundtrip/app_roundtrip_address[]_10_v8.teal index d58d71f84..38f372107 100644 --- a/tests/integration/teal/roundtrip/app_roundtrip_address[]_10_v8.teal +++ b/tests/integration/teal/roundtrip/app_roundtrip_address[]_10_v8.teal @@ -29,451 +29,455 @@ retsub arraycomplement_1: proto 1 1 byte "" +int 0 +dupn 33 +byte "" +dupn 1 frame_dig -1 int 1 int 0 * getbyte -store 19 +frame_bury 1 frame_dig -1 int 1 int 1 * getbyte -store 20 +frame_bury 2 frame_dig -1 int 1 int 2 * getbyte -store 21 +frame_bury 3 frame_dig -1 int 1 int 3 * getbyte -store 22 +frame_bury 4 frame_dig -1 int 1 int 4 * getbyte -store 23 +frame_bury 5 frame_dig -1 int 1 int 5 * getbyte -store 24 +frame_bury 6 frame_dig -1 int 1 int 6 * getbyte -store 25 +frame_bury 7 frame_dig -1 int 1 int 7 * getbyte -store 26 +frame_bury 8 frame_dig -1 int 1 int 8 * getbyte -store 27 +frame_bury 9 frame_dig -1 int 1 int 9 * getbyte -store 28 +frame_bury 10 frame_dig -1 int 1 int 10 * getbyte -store 29 +frame_bury 11 frame_dig -1 int 1 int 11 * getbyte -store 30 +frame_bury 12 frame_dig -1 int 1 int 12 * getbyte -store 31 +frame_bury 13 frame_dig -1 int 1 int 13 * getbyte -store 32 +frame_bury 14 frame_dig -1 int 1 int 14 * getbyte -store 33 +frame_bury 15 frame_dig -1 int 1 int 15 * getbyte -store 34 +frame_bury 16 frame_dig -1 int 1 int 16 * getbyte -store 35 +frame_bury 17 frame_dig -1 int 1 int 17 * getbyte -store 36 +frame_bury 18 frame_dig -1 int 1 int 18 * getbyte -store 37 +frame_bury 19 frame_dig -1 int 1 int 19 * getbyte -store 38 +frame_bury 20 frame_dig -1 int 1 int 20 * getbyte -store 39 +frame_bury 21 frame_dig -1 int 1 int 21 * getbyte -store 40 +frame_bury 22 frame_dig -1 int 1 int 22 * getbyte -store 41 +frame_bury 23 frame_dig -1 int 1 int 23 * getbyte -store 42 +frame_bury 24 frame_dig -1 int 1 int 24 * getbyte -store 43 +frame_bury 25 frame_dig -1 int 1 int 25 * getbyte -store 44 +frame_bury 26 frame_dig -1 int 1 int 26 * getbyte -store 45 +frame_bury 27 frame_dig -1 int 1 int 27 * getbyte -store 46 +frame_bury 28 frame_dig -1 int 1 int 28 * getbyte -store 47 +frame_bury 29 frame_dig -1 int 1 int 29 * getbyte -store 48 +frame_bury 30 frame_dig -1 int 1 int 30 * getbyte -store 49 +frame_bury 31 frame_dig -1 int 1 int 31 * getbyte -store 50 -load 19 +frame_bury 32 +frame_dig 1 callsub numericalcomp_0 -store 19 -load 20 +frame_bury 1 +frame_dig 2 callsub numericalcomp_0 -store 20 -load 21 +frame_bury 2 +frame_dig 3 callsub numericalcomp_0 -store 21 -load 22 +frame_bury 3 +frame_dig 4 callsub numericalcomp_0 -store 22 -load 23 +frame_bury 4 +frame_dig 5 callsub numericalcomp_0 -store 23 -load 24 +frame_bury 5 +frame_dig 6 callsub numericalcomp_0 -store 24 -load 25 +frame_bury 6 +frame_dig 7 callsub numericalcomp_0 -store 25 -load 26 +frame_bury 7 +frame_dig 8 callsub numericalcomp_0 -store 26 -load 27 +frame_bury 8 +frame_dig 9 callsub numericalcomp_0 -store 27 -load 28 +frame_bury 9 +frame_dig 10 callsub numericalcomp_0 -store 28 -load 29 +frame_bury 10 +frame_dig 11 callsub numericalcomp_0 -store 29 -load 30 +frame_bury 11 +frame_dig 12 callsub numericalcomp_0 -store 30 -load 31 +frame_bury 12 +frame_dig 13 callsub numericalcomp_0 -store 31 -load 32 +frame_bury 13 +frame_dig 14 callsub numericalcomp_0 -store 32 -load 33 +frame_bury 14 +frame_dig 15 callsub numericalcomp_0 -store 33 -load 34 +frame_bury 15 +frame_dig 16 callsub numericalcomp_0 -store 34 -load 35 +frame_bury 16 +frame_dig 17 callsub numericalcomp_0 -store 35 -load 36 +frame_bury 17 +frame_dig 18 callsub numericalcomp_0 -store 36 -load 37 +frame_bury 18 +frame_dig 19 callsub numericalcomp_0 -store 37 -load 38 +frame_bury 19 +frame_dig 20 callsub numericalcomp_0 -store 38 -load 39 +frame_bury 20 +frame_dig 21 callsub numericalcomp_0 -store 39 -load 40 +frame_bury 21 +frame_dig 22 callsub numericalcomp_0 -store 40 -load 41 +frame_bury 22 +frame_dig 23 callsub numericalcomp_0 -store 41 -load 42 +frame_bury 23 +frame_dig 24 callsub numericalcomp_0 -store 42 -load 43 +frame_bury 24 +frame_dig 25 callsub numericalcomp_0 -store 43 -load 44 +frame_bury 25 +frame_dig 26 callsub numericalcomp_0 -store 44 -load 45 +frame_bury 26 +frame_dig 27 callsub numericalcomp_0 -store 45 -load 46 +frame_bury 27 +frame_dig 28 callsub numericalcomp_0 -store 46 -load 47 +frame_bury 28 +frame_dig 29 callsub numericalcomp_0 -store 47 -load 48 +frame_bury 29 +frame_dig 30 callsub numericalcomp_0 -store 48 -load 49 +frame_bury 30 +frame_dig 31 callsub numericalcomp_0 -store 49 -load 50 +frame_bury 31 +frame_dig 32 callsub numericalcomp_0 -store 50 +frame_bury 32 byte 0x00 int 0 -load 19 +frame_dig 1 setbyte byte 0x00 int 0 -load 20 +frame_dig 2 setbyte concat byte 0x00 int 0 -load 21 +frame_dig 3 setbyte concat byte 0x00 int 0 -load 22 +frame_dig 4 setbyte concat byte 0x00 int 0 -load 23 +frame_dig 5 setbyte concat byte 0x00 int 0 -load 24 +frame_dig 6 setbyte concat byte 0x00 int 0 -load 25 +frame_dig 7 setbyte concat byte 0x00 int 0 -load 26 +frame_dig 8 setbyte concat byte 0x00 int 0 -load 27 +frame_dig 9 setbyte concat byte 0x00 int 0 -load 28 +frame_dig 10 setbyte concat byte 0x00 int 0 -load 29 +frame_dig 11 setbyte concat byte 0x00 int 0 -load 30 +frame_dig 12 setbyte concat byte 0x00 int 0 -load 31 +frame_dig 13 setbyte concat byte 0x00 int 0 -load 32 +frame_dig 14 setbyte concat byte 0x00 int 0 -load 33 +frame_dig 15 setbyte concat byte 0x00 int 0 -load 34 +frame_dig 16 setbyte concat byte 0x00 int 0 -load 35 +frame_dig 17 setbyte concat byte 0x00 int 0 -load 36 +frame_dig 18 setbyte concat byte 0x00 int 0 -load 37 +frame_dig 19 setbyte concat byte 0x00 int 0 -load 38 +frame_dig 20 setbyte concat byte 0x00 int 0 -load 39 +frame_dig 21 setbyte concat byte 0x00 int 0 -load 40 +frame_dig 22 setbyte concat byte 0x00 int 0 -load 41 +frame_dig 23 setbyte concat byte 0x00 int 0 -load 42 +frame_dig 24 setbyte concat byte 0x00 int 0 -load 43 +frame_dig 25 setbyte concat byte 0x00 int 0 -load 44 +frame_dig 26 setbyte concat byte 0x00 int 0 -load 45 +frame_dig 27 setbyte concat byte 0x00 int 0 -load 46 +frame_dig 28 setbyte concat byte 0x00 int 0 -load 47 +frame_dig 29 setbyte concat byte 0x00 int 0 -load 48 +frame_dig 30 setbyte concat byte 0x00 int 0 -load 49 +frame_dig 31 setbyte concat byte 0x00 int 0 -load 50 +frame_dig 32 setbyte concat frame_bury 0 @@ -483,6 +487,12 @@ retsub arraycomplement_2: proto 1 1 byte "" +dupn 10 +int 0 +dupn 11 +byte "" +dupn 1 +int 0 frame_dig -1 int 32 int 0 @@ -491,7 +501,7 @@ int 2 + int 32 extract3 -store 8 +frame_bury 1 frame_dig -1 int 32 int 1 @@ -500,7 +510,7 @@ int 2 + int 32 extract3 -store 9 +frame_bury 2 frame_dig -1 int 32 int 2 @@ -509,7 +519,7 @@ int 2 + int 32 extract3 -store 10 +frame_bury 3 frame_dig -1 int 32 int 3 @@ -518,7 +528,7 @@ int 2 + int 32 extract3 -store 11 +frame_bury 4 frame_dig -1 int 32 int 4 @@ -527,7 +537,7 @@ int 2 + int 32 extract3 -store 12 +frame_bury 5 frame_dig -1 int 32 int 5 @@ -536,7 +546,7 @@ int 2 + int 32 extract3 -store 13 +frame_bury 6 frame_dig -1 int 32 int 6 @@ -545,7 +555,7 @@ int 2 + int 32 extract3 -store 14 +frame_bury 7 frame_dig -1 int 32 int 7 @@ -554,7 +564,7 @@ int 2 + int 32 extract3 -store 15 +frame_bury 8 frame_dig -1 int 32 int 8 @@ -563,7 +573,7 @@ int 2 + int 32 extract3 -store 16 +frame_bury 9 frame_dig -1 int 32 int 9 @@ -572,60 +582,60 @@ int 2 + int 32 extract3 -store 17 -load 8 +frame_bury 10 +frame_dig 1 callsub arraycomplement_1 -store 8 -load 9 +frame_bury 1 +frame_dig 2 callsub arraycomplement_1 -store 9 -load 10 +frame_bury 2 +frame_dig 3 callsub arraycomplement_1 -store 10 -load 11 +frame_bury 3 +frame_dig 4 callsub arraycomplement_1 -store 11 -load 12 +frame_bury 4 +frame_dig 5 callsub arraycomplement_1 -store 12 -load 13 +frame_bury 5 +frame_dig 6 callsub arraycomplement_1 -store 13 -load 14 +frame_bury 6 +frame_dig 7 callsub arraycomplement_1 -store 14 -load 15 +frame_bury 7 +frame_dig 8 callsub arraycomplement_1 -store 15 -load 16 +frame_bury 8 +frame_dig 9 callsub arraycomplement_1 -store 16 -load 17 +frame_bury 9 +frame_dig 10 callsub arraycomplement_1 -store 17 +frame_bury 10 int 10 -store 18 -load 18 +frame_bury 25 +frame_dig 25 itob extract 6 0 -load 8 -load 9 +frame_dig 1 +frame_dig 2 concat -load 10 +frame_dig 3 concat -load 11 +frame_dig 4 concat -load 12 +frame_dig 5 concat -load 13 +frame_dig 6 concat -load 14 +frame_dig 7 concat -load 15 +frame_dig 8 concat -load 16 +frame_dig 9 concat -load 17 +frame_dig 10 concat concat frame_bury 0 @@ -635,64 +645,69 @@ retsub roundtripper_3: proto 1 1 byte "" +dupn 2 +int 0 +dupn 1 +byte "" +dupn 1 frame_dig -1 callsub arraycomplement_2 -store 2 -load 2 +frame_bury 1 +frame_dig 1 callsub arraycomplement_2 -store 3 +frame_bury 2 frame_dig -1 -store 7 -load 7 -store 6 +frame_bury 6 +frame_dig 6 +frame_bury 5 int 6 -store 4 -load 4 -load 7 +frame_bury 3 +frame_dig 3 +frame_dig 6 len + -store 5 -load 5 +frame_bury 4 +frame_dig 4 int 65536 < assert -load 4 +frame_dig 3 itob extract 6 0 -load 2 -store 7 -load 6 -load 7 -concat -store 6 -load 5 -store 4 -load 4 -load 7 +frame_dig 1 +frame_bury 6 +frame_dig 5 +frame_dig 6 +concat +frame_bury 5 +frame_dig 4 +frame_bury 3 +frame_dig 3 +frame_dig 6 len + -store 5 -load 5 +frame_bury 4 +frame_dig 4 int 65536 < assert -load 4 +frame_dig 3 itob extract 6 0 concat -load 3 -store 7 -load 6 -load 7 +frame_dig 2 +frame_bury 6 +frame_dig 5 +frame_dig 6 concat -store 6 -load 5 -store 4 -load 4 +frame_bury 5 +frame_dig 4 +frame_bury 3 +frame_dig 3 itob extract 6 0 concat -load 6 +frame_dig 5 concat frame_bury 0 retsub \ No newline at end of file diff --git a/tests/integration/teal/roundtrip/app_roundtrip_address_v8.teal b/tests/integration/teal/roundtrip/app_roundtrip_address_v8.teal index 0ebe72b72..820a4e327 100644 --- a/tests/integration/teal/roundtrip/app_roundtrip_address_v8.teal +++ b/tests/integration/teal/roundtrip/app_roundtrip_address_v8.teal @@ -29,451 +29,455 @@ retsub arraycomplement_1: proto 1 1 byte "" +int 0 +dupn 33 +byte "" +dupn 1 frame_dig -1 int 1 int 0 * getbyte -store 4 +frame_bury 1 frame_dig -1 int 1 int 1 * getbyte -store 5 +frame_bury 2 frame_dig -1 int 1 int 2 * getbyte -store 6 +frame_bury 3 frame_dig -1 int 1 int 3 * getbyte -store 7 +frame_bury 4 frame_dig -1 int 1 int 4 * getbyte -store 8 +frame_bury 5 frame_dig -1 int 1 int 5 * getbyte -store 9 +frame_bury 6 frame_dig -1 int 1 int 6 * getbyte -store 10 +frame_bury 7 frame_dig -1 int 1 int 7 * getbyte -store 11 +frame_bury 8 frame_dig -1 int 1 int 8 * getbyte -store 12 +frame_bury 9 frame_dig -1 int 1 int 9 * getbyte -store 13 +frame_bury 10 frame_dig -1 int 1 int 10 * getbyte -store 14 +frame_bury 11 frame_dig -1 int 1 int 11 * getbyte -store 15 +frame_bury 12 frame_dig -1 int 1 int 12 * getbyte -store 16 +frame_bury 13 frame_dig -1 int 1 int 13 * getbyte -store 17 +frame_bury 14 frame_dig -1 int 1 int 14 * getbyte -store 18 +frame_bury 15 frame_dig -1 int 1 int 15 * getbyte -store 19 +frame_bury 16 frame_dig -1 int 1 int 16 * getbyte -store 20 +frame_bury 17 frame_dig -1 int 1 int 17 * getbyte -store 21 +frame_bury 18 frame_dig -1 int 1 int 18 * getbyte -store 22 +frame_bury 19 frame_dig -1 int 1 int 19 * getbyte -store 23 +frame_bury 20 frame_dig -1 int 1 int 20 * getbyte -store 24 +frame_bury 21 frame_dig -1 int 1 int 21 * getbyte -store 25 +frame_bury 22 frame_dig -1 int 1 int 22 * getbyte -store 26 +frame_bury 23 frame_dig -1 int 1 int 23 * getbyte -store 27 +frame_bury 24 frame_dig -1 int 1 int 24 * getbyte -store 28 +frame_bury 25 frame_dig -1 int 1 int 25 * getbyte -store 29 +frame_bury 26 frame_dig -1 int 1 int 26 * getbyte -store 30 +frame_bury 27 frame_dig -1 int 1 int 27 * getbyte -store 31 +frame_bury 28 frame_dig -1 int 1 int 28 * getbyte -store 32 +frame_bury 29 frame_dig -1 int 1 int 29 * getbyte -store 33 +frame_bury 30 frame_dig -1 int 1 int 30 * getbyte -store 34 +frame_bury 31 frame_dig -1 int 1 int 31 * getbyte -store 35 -load 4 +frame_bury 32 +frame_dig 1 callsub numericalcomp_0 -store 4 -load 5 +frame_bury 1 +frame_dig 2 callsub numericalcomp_0 -store 5 -load 6 +frame_bury 2 +frame_dig 3 callsub numericalcomp_0 -store 6 -load 7 +frame_bury 3 +frame_dig 4 callsub numericalcomp_0 -store 7 -load 8 +frame_bury 4 +frame_dig 5 callsub numericalcomp_0 -store 8 -load 9 +frame_bury 5 +frame_dig 6 callsub numericalcomp_0 -store 9 -load 10 +frame_bury 6 +frame_dig 7 callsub numericalcomp_0 -store 10 -load 11 +frame_bury 7 +frame_dig 8 callsub numericalcomp_0 -store 11 -load 12 +frame_bury 8 +frame_dig 9 callsub numericalcomp_0 -store 12 -load 13 +frame_bury 9 +frame_dig 10 callsub numericalcomp_0 -store 13 -load 14 +frame_bury 10 +frame_dig 11 callsub numericalcomp_0 -store 14 -load 15 +frame_bury 11 +frame_dig 12 callsub numericalcomp_0 -store 15 -load 16 +frame_bury 12 +frame_dig 13 callsub numericalcomp_0 -store 16 -load 17 +frame_bury 13 +frame_dig 14 callsub numericalcomp_0 -store 17 -load 18 +frame_bury 14 +frame_dig 15 callsub numericalcomp_0 -store 18 -load 19 +frame_bury 15 +frame_dig 16 callsub numericalcomp_0 -store 19 -load 20 +frame_bury 16 +frame_dig 17 callsub numericalcomp_0 -store 20 -load 21 +frame_bury 17 +frame_dig 18 callsub numericalcomp_0 -store 21 -load 22 +frame_bury 18 +frame_dig 19 callsub numericalcomp_0 -store 22 -load 23 +frame_bury 19 +frame_dig 20 callsub numericalcomp_0 -store 23 -load 24 +frame_bury 20 +frame_dig 21 callsub numericalcomp_0 -store 24 -load 25 +frame_bury 21 +frame_dig 22 callsub numericalcomp_0 -store 25 -load 26 +frame_bury 22 +frame_dig 23 callsub numericalcomp_0 -store 26 -load 27 +frame_bury 23 +frame_dig 24 callsub numericalcomp_0 -store 27 -load 28 +frame_bury 24 +frame_dig 25 callsub numericalcomp_0 -store 28 -load 29 +frame_bury 25 +frame_dig 26 callsub numericalcomp_0 -store 29 -load 30 +frame_bury 26 +frame_dig 27 callsub numericalcomp_0 -store 30 -load 31 +frame_bury 27 +frame_dig 28 callsub numericalcomp_0 -store 31 -load 32 +frame_bury 28 +frame_dig 29 callsub numericalcomp_0 -store 32 -load 33 +frame_bury 29 +frame_dig 30 callsub numericalcomp_0 -store 33 -load 34 +frame_bury 30 +frame_dig 31 callsub numericalcomp_0 -store 34 -load 35 +frame_bury 31 +frame_dig 32 callsub numericalcomp_0 -store 35 +frame_bury 32 byte 0x00 int 0 -load 4 +frame_dig 1 setbyte byte 0x00 int 0 -load 5 +frame_dig 2 setbyte concat byte 0x00 int 0 -load 6 +frame_dig 3 setbyte concat byte 0x00 int 0 -load 7 +frame_dig 4 setbyte concat byte 0x00 int 0 -load 8 +frame_dig 5 setbyte concat byte 0x00 int 0 -load 9 +frame_dig 6 setbyte concat byte 0x00 int 0 -load 10 +frame_dig 7 setbyte concat byte 0x00 int 0 -load 11 +frame_dig 8 setbyte concat byte 0x00 int 0 -load 12 +frame_dig 9 setbyte concat byte 0x00 int 0 -load 13 +frame_dig 10 setbyte concat byte 0x00 int 0 -load 14 +frame_dig 11 setbyte concat byte 0x00 int 0 -load 15 +frame_dig 12 setbyte concat byte 0x00 int 0 -load 16 +frame_dig 13 setbyte concat byte 0x00 int 0 -load 17 +frame_dig 14 setbyte concat byte 0x00 int 0 -load 18 +frame_dig 15 setbyte concat byte 0x00 int 0 -load 19 +frame_dig 16 setbyte concat byte 0x00 int 0 -load 20 +frame_dig 17 setbyte concat byte 0x00 int 0 -load 21 +frame_dig 18 setbyte concat byte 0x00 int 0 -load 22 +frame_dig 19 setbyte concat byte 0x00 int 0 -load 23 +frame_dig 20 setbyte concat byte 0x00 int 0 -load 24 +frame_dig 21 setbyte concat byte 0x00 int 0 -load 25 +frame_dig 22 setbyte concat byte 0x00 int 0 -load 26 +frame_dig 23 setbyte concat byte 0x00 int 0 -load 27 +frame_dig 24 setbyte concat byte 0x00 int 0 -load 28 +frame_dig 25 setbyte concat byte 0x00 int 0 -load 29 +frame_dig 26 setbyte concat byte 0x00 int 0 -load 30 +frame_dig 27 setbyte concat byte 0x00 int 0 -load 31 +frame_dig 28 setbyte concat byte 0x00 int 0 -load 32 +frame_dig 29 setbyte concat byte 0x00 int 0 -load 33 +frame_dig 30 setbyte concat byte 0x00 int 0 -load 34 +frame_dig 31 setbyte concat byte 0x00 int 0 -load 35 +frame_dig 32 setbyte concat frame_bury 0 @@ -483,16 +487,21 @@ retsub roundtripper_2: proto 1 1 byte "" +dupn 2 +int 0 +dupn 1 +byte "" +dupn 1 frame_dig -1 callsub arraycomplement_1 -store 2 -load 2 +frame_bury 1 +frame_dig 1 callsub arraycomplement_1 -store 3 +frame_bury 2 frame_dig -1 -load 2 +frame_dig 1 concat -load 3 +frame_dig 2 concat frame_bury 0 retsub \ No newline at end of file diff --git a/tests/integration/teal/roundtrip/app_roundtrip_bool[1]_v8.teal b/tests/integration/teal/roundtrip/app_roundtrip_bool[1]_v8.teal index 3458bde41..ad8b78779 100644 --- a/tests/integration/teal/roundtrip/app_roundtrip_bool[1]_v8.teal +++ b/tests/integration/teal/roundtrip/app_roundtrip_bool[1]_v8.teal @@ -26,16 +26,20 @@ retsub arraycomplement_1: proto 1 1 byte "" +int 0 +dupn 2 +byte "" +dupn 1 frame_dig -1 int 0 getbit -store 4 -load 4 +frame_bury 1 +frame_dig 1 callsub boolcomp_0 -store 4 +frame_bury 1 byte 0x00 int 0 -load 4 +frame_dig 1 setbit frame_bury 0 retsub @@ -44,16 +48,21 @@ retsub roundtripper_2: proto 1 1 byte "" +dupn 2 +int 0 +dupn 1 +byte "" +dupn 1 frame_dig -1 callsub arraycomplement_1 -store 2 -load 2 +frame_bury 1 +frame_dig 1 callsub arraycomplement_1 -store 3 +frame_bury 2 frame_dig -1 -load 2 +frame_dig 1 concat -load 3 +frame_dig 2 concat frame_bury 0 retsub \ No newline at end of file diff --git a/tests/integration/teal/roundtrip/app_roundtrip_bool[3][]_11_v8.teal b/tests/integration/teal/roundtrip/app_roundtrip_bool[3][]_11_v8.teal index 64bd1f049..33aee47c4 100644 --- a/tests/integration/teal/roundtrip/app_roundtrip_bool[3][]_11_v8.teal +++ b/tests/integration/teal/roundtrip/app_roundtrip_bool[3][]_11_v8.teal @@ -26,36 +26,40 @@ retsub arraycomplement_1: proto 1 1 byte "" +int 0 +dupn 4 +byte "" +dupn 1 frame_dig -1 int 0 getbit -store 20 +frame_bury 1 frame_dig -1 int 1 getbit -store 21 +frame_bury 2 frame_dig -1 int 2 getbit -store 22 -load 20 +frame_bury 3 +frame_dig 1 callsub boolcomp_0 -store 20 -load 21 +frame_bury 1 +frame_dig 2 callsub boolcomp_0 -store 21 -load 22 +frame_bury 2 +frame_dig 3 callsub boolcomp_0 -store 22 +frame_bury 3 byte 0x00 int 0 -load 20 +frame_dig 1 setbit int 1 -load 21 +frame_dig 2 setbit int 2 -load 22 +frame_dig 3 setbit frame_bury 0 retsub @@ -64,6 +68,12 @@ retsub arraycomplement_2: proto 1 1 byte "" +dupn 11 +int 0 +dupn 12 +byte "" +dupn 1 +int 0 frame_dig -1 int 1 int 0 @@ -72,7 +82,7 @@ int 2 + int 1 extract3 -store 8 +frame_bury 1 frame_dig -1 int 1 int 1 @@ -81,7 +91,7 @@ int 2 + int 1 extract3 -store 9 +frame_bury 2 frame_dig -1 int 1 int 2 @@ -90,7 +100,7 @@ int 2 + int 1 extract3 -store 10 +frame_bury 3 frame_dig -1 int 1 int 3 @@ -99,7 +109,7 @@ int 2 + int 1 extract3 -store 11 +frame_bury 4 frame_dig -1 int 1 int 4 @@ -108,7 +118,7 @@ int 2 + int 1 extract3 -store 12 +frame_bury 5 frame_dig -1 int 1 int 5 @@ -117,7 +127,7 @@ int 2 + int 1 extract3 -store 13 +frame_bury 6 frame_dig -1 int 1 int 6 @@ -126,7 +136,7 @@ int 2 + int 1 extract3 -store 14 +frame_bury 7 frame_dig -1 int 1 int 7 @@ -135,7 +145,7 @@ int 2 + int 1 extract3 -store 15 +frame_bury 8 frame_dig -1 int 1 int 8 @@ -144,7 +154,7 @@ int 2 + int 1 extract3 -store 16 +frame_bury 9 frame_dig -1 int 1 int 9 @@ -153,7 +163,7 @@ int 2 + int 1 extract3 -store 17 +frame_bury 10 frame_dig -1 int 1 int 10 @@ -162,65 +172,65 @@ int 2 + int 1 extract3 -store 18 -load 8 +frame_bury 11 +frame_dig 1 callsub arraycomplement_1 -store 8 -load 9 +frame_bury 1 +frame_dig 2 callsub arraycomplement_1 -store 9 -load 10 +frame_bury 2 +frame_dig 3 callsub arraycomplement_1 -store 10 -load 11 +frame_bury 3 +frame_dig 4 callsub arraycomplement_1 -store 11 -load 12 +frame_bury 4 +frame_dig 5 callsub arraycomplement_1 -store 12 -load 13 +frame_bury 5 +frame_dig 6 callsub arraycomplement_1 -store 13 -load 14 +frame_bury 6 +frame_dig 7 callsub arraycomplement_1 -store 14 -load 15 +frame_bury 7 +frame_dig 8 callsub arraycomplement_1 -store 15 -load 16 +frame_bury 8 +frame_dig 9 callsub arraycomplement_1 -store 16 -load 17 +frame_bury 9 +frame_dig 10 callsub arraycomplement_1 -store 17 -load 18 +frame_bury 10 +frame_dig 11 callsub arraycomplement_1 -store 18 +frame_bury 11 int 11 -store 19 -load 19 +frame_bury 27 +frame_dig 27 itob extract 6 0 -load 8 -load 9 +frame_dig 1 +frame_dig 2 concat -load 10 +frame_dig 3 concat -load 11 +frame_dig 4 concat -load 12 +frame_dig 5 concat -load 13 +frame_dig 6 concat -load 14 +frame_dig 7 concat -load 15 +frame_dig 8 concat -load 16 +frame_dig 9 concat -load 17 +frame_dig 10 concat -load 18 +frame_dig 11 concat concat frame_bury 0 @@ -230,64 +240,69 @@ retsub roundtripper_3: proto 1 1 byte "" +dupn 2 +int 0 +dupn 1 +byte "" +dupn 1 frame_dig -1 callsub arraycomplement_2 -store 2 -load 2 +frame_bury 1 +frame_dig 1 callsub arraycomplement_2 -store 3 +frame_bury 2 frame_dig -1 -store 7 -load 7 -store 6 +frame_bury 6 +frame_dig 6 +frame_bury 5 int 6 -store 4 -load 4 -load 7 +frame_bury 3 +frame_dig 3 +frame_dig 6 len + -store 5 -load 5 +frame_bury 4 +frame_dig 4 int 65536 < assert -load 4 +frame_dig 3 itob extract 6 0 -load 2 -store 7 -load 6 -load 7 +frame_dig 1 +frame_bury 6 +frame_dig 5 +frame_dig 6 concat -store 6 -load 5 -store 4 -load 4 -load 7 +frame_bury 5 +frame_dig 4 +frame_bury 3 +frame_dig 3 +frame_dig 6 len + -store 5 -load 5 +frame_bury 4 +frame_dig 4 int 65536 < assert -load 4 +frame_dig 3 itob extract 6 0 concat -load 3 -store 7 -load 6 -load 7 +frame_dig 2 +frame_bury 6 +frame_dig 5 +frame_dig 6 concat -store 6 -load 5 -store 4 -load 4 +frame_bury 5 +frame_dig 4 +frame_bury 3 +frame_dig 3 itob extract 6 0 concat -load 6 +frame_dig 5 concat frame_bury 0 retsub \ No newline at end of file diff --git a/tests/integration/teal/roundtrip/app_roundtrip_bool[42]_v8.teal b/tests/integration/teal/roundtrip/app_roundtrip_bool[42]_v8.teal index a215df488..ef566eefb 100644 --- a/tests/integration/teal/roundtrip/app_roundtrip_bool[42]_v8.teal +++ b/tests/integration/teal/roundtrip/app_roundtrip_bool[42]_v8.teal @@ -26,426 +26,430 @@ retsub arraycomplement_1: proto 1 1 byte "" +int 0 +dupn 43 +byte "" +dupn 1 frame_dig -1 int 0 getbit -store 4 +frame_bury 1 frame_dig -1 int 1 getbit -store 5 +frame_bury 2 frame_dig -1 int 2 getbit -store 6 +frame_bury 3 frame_dig -1 int 3 getbit -store 7 +frame_bury 4 frame_dig -1 int 4 getbit -store 8 +frame_bury 5 frame_dig -1 int 5 getbit -store 9 +frame_bury 6 frame_dig -1 int 6 getbit -store 10 +frame_bury 7 frame_dig -1 int 7 getbit -store 11 +frame_bury 8 frame_dig -1 int 8 getbit -store 12 +frame_bury 9 frame_dig -1 int 9 getbit -store 13 +frame_bury 10 frame_dig -1 int 10 getbit -store 14 +frame_bury 11 frame_dig -1 int 11 getbit -store 15 +frame_bury 12 frame_dig -1 int 12 getbit -store 16 +frame_bury 13 frame_dig -1 int 13 getbit -store 17 +frame_bury 14 frame_dig -1 int 14 getbit -store 18 +frame_bury 15 frame_dig -1 int 15 getbit -store 19 +frame_bury 16 frame_dig -1 int 16 getbit -store 20 +frame_bury 17 frame_dig -1 int 17 getbit -store 21 +frame_bury 18 frame_dig -1 int 18 getbit -store 22 +frame_bury 19 frame_dig -1 int 19 getbit -store 23 +frame_bury 20 frame_dig -1 int 20 getbit -store 24 +frame_bury 21 frame_dig -1 int 21 getbit -store 25 +frame_bury 22 frame_dig -1 int 22 getbit -store 26 +frame_bury 23 frame_dig -1 int 23 getbit -store 27 +frame_bury 24 frame_dig -1 int 24 getbit -store 28 +frame_bury 25 frame_dig -1 int 25 getbit -store 29 +frame_bury 26 frame_dig -1 int 26 getbit -store 30 +frame_bury 27 frame_dig -1 int 27 getbit -store 31 +frame_bury 28 frame_dig -1 int 28 getbit -store 32 +frame_bury 29 frame_dig -1 int 29 getbit -store 33 +frame_bury 30 frame_dig -1 int 30 getbit -store 34 +frame_bury 31 frame_dig -1 int 31 getbit -store 35 +frame_bury 32 frame_dig -1 int 32 getbit -store 36 +frame_bury 33 frame_dig -1 int 33 getbit -store 37 +frame_bury 34 frame_dig -1 int 34 getbit -store 38 +frame_bury 35 frame_dig -1 int 35 getbit -store 39 +frame_bury 36 frame_dig -1 int 36 getbit -store 40 +frame_bury 37 frame_dig -1 int 37 getbit -store 41 +frame_bury 38 frame_dig -1 int 38 getbit -store 42 +frame_bury 39 frame_dig -1 int 39 getbit -store 43 +frame_bury 40 frame_dig -1 int 40 getbit -store 44 +frame_bury 41 frame_dig -1 int 41 getbit -store 45 -load 4 +frame_bury 42 +frame_dig 1 callsub boolcomp_0 -store 4 -load 5 +frame_bury 1 +frame_dig 2 callsub boolcomp_0 -store 5 -load 6 +frame_bury 2 +frame_dig 3 callsub boolcomp_0 -store 6 -load 7 +frame_bury 3 +frame_dig 4 callsub boolcomp_0 -store 7 -load 8 +frame_bury 4 +frame_dig 5 callsub boolcomp_0 -store 8 -load 9 +frame_bury 5 +frame_dig 6 callsub boolcomp_0 -store 9 -load 10 +frame_bury 6 +frame_dig 7 callsub boolcomp_0 -store 10 -load 11 +frame_bury 7 +frame_dig 8 callsub boolcomp_0 -store 11 -load 12 +frame_bury 8 +frame_dig 9 callsub boolcomp_0 -store 12 -load 13 +frame_bury 9 +frame_dig 10 callsub boolcomp_0 -store 13 -load 14 +frame_bury 10 +frame_dig 11 callsub boolcomp_0 -store 14 -load 15 +frame_bury 11 +frame_dig 12 callsub boolcomp_0 -store 15 -load 16 +frame_bury 12 +frame_dig 13 callsub boolcomp_0 -store 16 -load 17 +frame_bury 13 +frame_dig 14 callsub boolcomp_0 -store 17 -load 18 +frame_bury 14 +frame_dig 15 callsub boolcomp_0 -store 18 -load 19 +frame_bury 15 +frame_dig 16 callsub boolcomp_0 -store 19 -load 20 +frame_bury 16 +frame_dig 17 callsub boolcomp_0 -store 20 -load 21 +frame_bury 17 +frame_dig 18 callsub boolcomp_0 -store 21 -load 22 +frame_bury 18 +frame_dig 19 callsub boolcomp_0 -store 22 -load 23 +frame_bury 19 +frame_dig 20 callsub boolcomp_0 -store 23 -load 24 +frame_bury 20 +frame_dig 21 callsub boolcomp_0 -store 24 -load 25 +frame_bury 21 +frame_dig 22 callsub boolcomp_0 -store 25 -load 26 +frame_bury 22 +frame_dig 23 callsub boolcomp_0 -store 26 -load 27 +frame_bury 23 +frame_dig 24 callsub boolcomp_0 -store 27 -load 28 +frame_bury 24 +frame_dig 25 callsub boolcomp_0 -store 28 -load 29 +frame_bury 25 +frame_dig 26 callsub boolcomp_0 -store 29 -load 30 +frame_bury 26 +frame_dig 27 callsub boolcomp_0 -store 30 -load 31 +frame_bury 27 +frame_dig 28 callsub boolcomp_0 -store 31 -load 32 +frame_bury 28 +frame_dig 29 callsub boolcomp_0 -store 32 -load 33 +frame_bury 29 +frame_dig 30 callsub boolcomp_0 -store 33 -load 34 +frame_bury 30 +frame_dig 31 callsub boolcomp_0 -store 34 -load 35 +frame_bury 31 +frame_dig 32 callsub boolcomp_0 -store 35 -load 36 +frame_bury 32 +frame_dig 33 callsub boolcomp_0 -store 36 -load 37 +frame_bury 33 +frame_dig 34 callsub boolcomp_0 -store 37 -load 38 +frame_bury 34 +frame_dig 35 callsub boolcomp_0 -store 38 -load 39 +frame_bury 35 +frame_dig 36 callsub boolcomp_0 -store 39 -load 40 +frame_bury 36 +frame_dig 37 callsub boolcomp_0 -store 40 -load 41 +frame_bury 37 +frame_dig 38 callsub boolcomp_0 -store 41 -load 42 +frame_bury 38 +frame_dig 39 callsub boolcomp_0 -store 42 -load 43 +frame_bury 39 +frame_dig 40 callsub boolcomp_0 -store 43 -load 44 +frame_bury 40 +frame_dig 41 callsub boolcomp_0 -store 44 -load 45 +frame_bury 41 +frame_dig 42 callsub boolcomp_0 -store 45 +frame_bury 42 byte 0x000000000000 int 0 -load 4 +frame_dig 1 setbit int 1 -load 5 +frame_dig 2 setbit int 2 -load 6 +frame_dig 3 setbit int 3 -load 7 +frame_dig 4 setbit int 4 -load 8 +frame_dig 5 setbit int 5 -load 9 +frame_dig 6 setbit int 6 -load 10 +frame_dig 7 setbit int 7 -load 11 +frame_dig 8 setbit int 8 -load 12 +frame_dig 9 setbit int 9 -load 13 +frame_dig 10 setbit int 10 -load 14 +frame_dig 11 setbit int 11 -load 15 +frame_dig 12 setbit int 12 -load 16 +frame_dig 13 setbit int 13 -load 17 +frame_dig 14 setbit int 14 -load 18 +frame_dig 15 setbit int 15 -load 19 +frame_dig 16 setbit int 16 -load 20 +frame_dig 17 setbit int 17 -load 21 +frame_dig 18 setbit int 18 -load 22 +frame_dig 19 setbit int 19 -load 23 +frame_dig 20 setbit int 20 -load 24 +frame_dig 21 setbit int 21 -load 25 +frame_dig 22 setbit int 22 -load 26 +frame_dig 23 setbit int 23 -load 27 +frame_dig 24 setbit int 24 -load 28 +frame_dig 25 setbit int 25 -load 29 +frame_dig 26 setbit int 26 -load 30 +frame_dig 27 setbit int 27 -load 31 +frame_dig 28 setbit int 28 -load 32 +frame_dig 29 setbit int 29 -load 33 +frame_dig 30 setbit int 30 -load 34 +frame_dig 31 setbit int 31 -load 35 +frame_dig 32 setbit int 32 -load 36 +frame_dig 33 setbit int 33 -load 37 +frame_dig 34 setbit int 34 -load 38 +frame_dig 35 setbit int 35 -load 39 +frame_dig 36 setbit int 36 -load 40 +frame_dig 37 setbit int 37 -load 41 +frame_dig 38 setbit int 38 -load 42 +frame_dig 39 setbit int 39 -load 43 +frame_dig 40 setbit int 40 -load 44 +frame_dig 41 setbit int 41 -load 45 +frame_dig 42 setbit frame_bury 0 retsub @@ -454,16 +458,21 @@ retsub roundtripper_2: proto 1 1 byte "" +dupn 2 +int 0 +dupn 1 +byte "" +dupn 1 frame_dig -1 callsub arraycomplement_1 -store 2 -load 2 +frame_bury 1 +frame_dig 1 callsub arraycomplement_1 -store 3 +frame_bury 2 frame_dig -1 -load 2 +frame_dig 1 concat -load 3 +frame_dig 2 concat frame_bury 0 retsub \ No newline at end of file diff --git a/tests/integration/teal/roundtrip/app_roundtrip_bool[]_0_v8.teal b/tests/integration/teal/roundtrip/app_roundtrip_bool[]_0_v8.teal index 87f935c92..8a24971dd 100644 --- a/tests/integration/teal/roundtrip/app_roundtrip_bool[]_0_v8.teal +++ b/tests/integration/teal/roundtrip/app_roundtrip_bool[]_0_v8.teal @@ -16,8 +16,13 @@ arraycomplement_0: proto 1 1 byte "" int 0 -store 8 -load 8 +dupn 1 +byte "" +dupn 1 +int 0 +int 0 +frame_bury 5 +frame_dig 5 itob extract 6 0 byte "" @@ -29,64 +34,69 @@ retsub roundtripper_1: proto 1 1 byte "" +dupn 2 +int 0 +dupn 1 +byte "" +dupn 1 frame_dig -1 callsub arraycomplement_0 -store 2 -load 2 +frame_bury 1 +frame_dig 1 callsub arraycomplement_0 -store 3 +frame_bury 2 frame_dig -1 -store 7 -load 7 -store 6 +frame_bury 6 +frame_dig 6 +frame_bury 5 int 6 -store 4 -load 4 -load 7 +frame_bury 3 +frame_dig 3 +frame_dig 6 len + -store 5 -load 5 +frame_bury 4 +frame_dig 4 int 65536 < assert -load 4 +frame_dig 3 itob extract 6 0 -load 2 -store 7 -load 6 -load 7 +frame_dig 1 +frame_bury 6 +frame_dig 5 +frame_dig 6 concat -store 6 -load 5 -store 4 -load 4 -load 7 +frame_bury 5 +frame_dig 4 +frame_bury 3 +frame_dig 3 +frame_dig 6 len + -store 5 -load 5 +frame_bury 4 +frame_dig 4 int 65536 < assert -load 4 +frame_dig 3 itob extract 6 0 concat -load 3 -store 7 -load 6 -load 7 +frame_dig 2 +frame_bury 6 +frame_dig 5 +frame_dig 6 concat -store 6 -load 5 -store 4 -load 4 +frame_bury 5 +frame_dig 4 +frame_bury 3 +frame_dig 3 itob extract 6 0 concat -load 6 +frame_dig 5 concat frame_bury 0 retsub \ No newline at end of file diff --git a/tests/integration/teal/roundtrip/app_roundtrip_bool[]_1_v8.teal b/tests/integration/teal/roundtrip/app_roundtrip_bool[]_1_v8.teal index 9b403483f..f5dd24669 100644 --- a/tests/integration/teal/roundtrip/app_roundtrip_bool[]_1_v8.teal +++ b/tests/integration/teal/roundtrip/app_roundtrip_bool[]_1_v8.teal @@ -26,23 +26,28 @@ retsub arraycomplement_1: proto 1 1 byte "" +int 0 +dupn 2 +byte "" +dupn 1 +int 0 frame_dig -1 int 0 int 16 + getbit -store 8 -load 8 +frame_bury 1 +frame_dig 1 callsub boolcomp_0 -store 8 +frame_bury 1 int 1 -store 9 -load 9 +frame_bury 6 +frame_dig 6 itob extract 6 0 byte 0x00 int 0 -load 8 +frame_dig 1 setbit concat frame_bury 0 @@ -52,64 +57,69 @@ retsub roundtripper_2: proto 1 1 byte "" +dupn 2 +int 0 +dupn 1 +byte "" +dupn 1 frame_dig -1 callsub arraycomplement_1 -store 2 -load 2 +frame_bury 1 +frame_dig 1 callsub arraycomplement_1 -store 3 +frame_bury 2 frame_dig -1 -store 7 -load 7 -store 6 +frame_bury 6 +frame_dig 6 +frame_bury 5 int 6 -store 4 -load 4 -load 7 +frame_bury 3 +frame_dig 3 +frame_dig 6 len + -store 5 -load 5 +frame_bury 4 +frame_dig 4 int 65536 < assert -load 4 +frame_dig 3 itob extract 6 0 -load 2 -store 7 -load 6 -load 7 +frame_dig 1 +frame_bury 6 +frame_dig 5 +frame_dig 6 concat -store 6 -load 5 -store 4 -load 4 -load 7 +frame_bury 5 +frame_dig 4 +frame_bury 3 +frame_dig 3 +frame_dig 6 len + -store 5 -load 5 +frame_bury 4 +frame_dig 4 int 65536 < assert -load 4 +frame_dig 3 itob extract 6 0 concat -load 3 -store 7 -load 6 -load 7 +frame_dig 2 +frame_bury 6 +frame_dig 5 +frame_dig 6 concat -store 6 -load 5 -store 4 -load 4 +frame_bury 5 +frame_dig 4 +frame_bury 3 +frame_dig 3 itob extract 6 0 concat -load 6 +frame_dig 5 concat frame_bury 0 retsub \ No newline at end of file diff --git a/tests/integration/teal/roundtrip/app_roundtrip_bool[]_42_v8.teal b/tests/integration/teal/roundtrip/app_roundtrip_bool[]_42_v8.teal index a2a6821c4..bafacd668 100644 --- a/tests/integration/teal/roundtrip/app_roundtrip_bool[]_42_v8.teal +++ b/tests/integration/teal/roundtrip/app_roundtrip_bool[]_42_v8.teal @@ -26,515 +26,520 @@ retsub arraycomplement_1: proto 1 1 byte "" +int 0 +dupn 43 +byte "" +dupn 1 +int 0 frame_dig -1 int 0 int 16 + getbit -store 8 +frame_bury 1 frame_dig -1 int 1 int 16 + getbit -store 9 +frame_bury 2 frame_dig -1 int 2 int 16 + getbit -store 10 +frame_bury 3 frame_dig -1 int 3 int 16 + getbit -store 11 +frame_bury 4 frame_dig -1 int 4 int 16 + getbit -store 12 +frame_bury 5 frame_dig -1 int 5 int 16 + getbit -store 13 +frame_bury 6 frame_dig -1 int 6 int 16 + getbit -store 14 +frame_bury 7 frame_dig -1 int 7 int 16 + getbit -store 15 +frame_bury 8 frame_dig -1 int 8 int 16 + getbit -store 16 +frame_bury 9 frame_dig -1 int 9 int 16 + getbit -store 17 +frame_bury 10 frame_dig -1 int 10 int 16 + getbit -store 18 +frame_bury 11 frame_dig -1 int 11 int 16 + getbit -store 19 +frame_bury 12 frame_dig -1 int 12 int 16 + getbit -store 20 +frame_bury 13 frame_dig -1 int 13 int 16 + getbit -store 21 +frame_bury 14 frame_dig -1 int 14 int 16 + getbit -store 22 +frame_bury 15 frame_dig -1 int 15 int 16 + getbit -store 23 +frame_bury 16 frame_dig -1 int 16 int 16 + getbit -store 24 +frame_bury 17 frame_dig -1 int 17 int 16 + getbit -store 25 +frame_bury 18 frame_dig -1 int 18 int 16 + getbit -store 26 +frame_bury 19 frame_dig -1 int 19 int 16 + getbit -store 27 +frame_bury 20 frame_dig -1 int 20 int 16 + getbit -store 28 +frame_bury 21 frame_dig -1 int 21 int 16 + getbit -store 29 +frame_bury 22 frame_dig -1 int 22 int 16 + getbit -store 30 +frame_bury 23 frame_dig -1 int 23 int 16 + getbit -store 31 +frame_bury 24 frame_dig -1 int 24 int 16 + getbit -store 32 +frame_bury 25 frame_dig -1 int 25 int 16 + getbit -store 33 +frame_bury 26 frame_dig -1 int 26 int 16 + getbit -store 34 +frame_bury 27 frame_dig -1 int 27 int 16 + getbit -store 35 +frame_bury 28 frame_dig -1 int 28 int 16 + getbit -store 36 +frame_bury 29 frame_dig -1 int 29 int 16 + getbit -store 37 +frame_bury 30 frame_dig -1 int 30 int 16 + getbit -store 38 +frame_bury 31 frame_dig -1 int 31 int 16 + getbit -store 39 +frame_bury 32 frame_dig -1 int 32 int 16 + getbit -store 40 +frame_bury 33 frame_dig -1 int 33 int 16 + getbit -store 41 +frame_bury 34 frame_dig -1 int 34 int 16 + getbit -store 42 +frame_bury 35 frame_dig -1 int 35 int 16 + getbit -store 43 +frame_bury 36 frame_dig -1 int 36 int 16 + getbit -store 44 +frame_bury 37 frame_dig -1 int 37 int 16 + getbit -store 45 +frame_bury 38 frame_dig -1 int 38 int 16 + getbit -store 46 +frame_bury 39 frame_dig -1 int 39 int 16 + getbit -store 47 +frame_bury 40 frame_dig -1 int 40 int 16 + getbit -store 48 +frame_bury 41 frame_dig -1 int 41 int 16 + getbit -store 49 -load 8 +frame_bury 42 +frame_dig 1 callsub boolcomp_0 -store 8 -load 9 +frame_bury 1 +frame_dig 2 callsub boolcomp_0 -store 9 -load 10 +frame_bury 2 +frame_dig 3 callsub boolcomp_0 -store 10 -load 11 +frame_bury 3 +frame_dig 4 callsub boolcomp_0 -store 11 -load 12 +frame_bury 4 +frame_dig 5 callsub boolcomp_0 -store 12 -load 13 +frame_bury 5 +frame_dig 6 callsub boolcomp_0 -store 13 -load 14 +frame_bury 6 +frame_dig 7 callsub boolcomp_0 -store 14 -load 15 +frame_bury 7 +frame_dig 8 callsub boolcomp_0 -store 15 -load 16 +frame_bury 8 +frame_dig 9 callsub boolcomp_0 -store 16 -load 17 +frame_bury 9 +frame_dig 10 callsub boolcomp_0 -store 17 -load 18 +frame_bury 10 +frame_dig 11 callsub boolcomp_0 -store 18 -load 19 +frame_bury 11 +frame_dig 12 callsub boolcomp_0 -store 19 -load 20 +frame_bury 12 +frame_dig 13 callsub boolcomp_0 -store 20 -load 21 +frame_bury 13 +frame_dig 14 callsub boolcomp_0 -store 21 -load 22 +frame_bury 14 +frame_dig 15 callsub boolcomp_0 -store 22 -load 23 +frame_bury 15 +frame_dig 16 callsub boolcomp_0 -store 23 -load 24 +frame_bury 16 +frame_dig 17 callsub boolcomp_0 -store 24 -load 25 +frame_bury 17 +frame_dig 18 callsub boolcomp_0 -store 25 -load 26 +frame_bury 18 +frame_dig 19 callsub boolcomp_0 -store 26 -load 27 +frame_bury 19 +frame_dig 20 callsub boolcomp_0 -store 27 -load 28 +frame_bury 20 +frame_dig 21 callsub boolcomp_0 -store 28 -load 29 +frame_bury 21 +frame_dig 22 callsub boolcomp_0 -store 29 -load 30 +frame_bury 22 +frame_dig 23 callsub boolcomp_0 -store 30 -load 31 +frame_bury 23 +frame_dig 24 callsub boolcomp_0 -store 31 -load 32 +frame_bury 24 +frame_dig 25 callsub boolcomp_0 -store 32 -load 33 +frame_bury 25 +frame_dig 26 callsub boolcomp_0 -store 33 -load 34 +frame_bury 26 +frame_dig 27 callsub boolcomp_0 -store 34 -load 35 +frame_bury 27 +frame_dig 28 callsub boolcomp_0 -store 35 -load 36 +frame_bury 28 +frame_dig 29 callsub boolcomp_0 -store 36 -load 37 +frame_bury 29 +frame_dig 30 callsub boolcomp_0 -store 37 -load 38 +frame_bury 30 +frame_dig 31 callsub boolcomp_0 -store 38 -load 39 +frame_bury 31 +frame_dig 32 callsub boolcomp_0 -store 39 -load 40 +frame_bury 32 +frame_dig 33 callsub boolcomp_0 -store 40 -load 41 +frame_bury 33 +frame_dig 34 callsub boolcomp_0 -store 41 -load 42 +frame_bury 34 +frame_dig 35 callsub boolcomp_0 -store 42 -load 43 +frame_bury 35 +frame_dig 36 callsub boolcomp_0 -store 43 -load 44 +frame_bury 36 +frame_dig 37 callsub boolcomp_0 -store 44 -load 45 +frame_bury 37 +frame_dig 38 callsub boolcomp_0 -store 45 -load 46 +frame_bury 38 +frame_dig 39 callsub boolcomp_0 -store 46 -load 47 +frame_bury 39 +frame_dig 40 callsub boolcomp_0 -store 47 -load 48 +frame_bury 40 +frame_dig 41 callsub boolcomp_0 -store 48 -load 49 +frame_bury 41 +frame_dig 42 callsub boolcomp_0 -store 49 +frame_bury 42 int 42 -store 50 -load 50 +frame_bury 47 +frame_dig 47 itob extract 6 0 byte 0x000000000000 int 0 -load 8 +frame_dig 1 setbit int 1 -load 9 +frame_dig 2 setbit int 2 -load 10 +frame_dig 3 setbit int 3 -load 11 +frame_dig 4 setbit int 4 -load 12 +frame_dig 5 setbit int 5 -load 13 +frame_dig 6 setbit int 6 -load 14 +frame_dig 7 setbit int 7 -load 15 +frame_dig 8 setbit int 8 -load 16 +frame_dig 9 setbit int 9 -load 17 +frame_dig 10 setbit int 10 -load 18 +frame_dig 11 setbit int 11 -load 19 +frame_dig 12 setbit int 12 -load 20 +frame_dig 13 setbit int 13 -load 21 +frame_dig 14 setbit int 14 -load 22 +frame_dig 15 setbit int 15 -load 23 +frame_dig 16 setbit int 16 -load 24 +frame_dig 17 setbit int 17 -load 25 +frame_dig 18 setbit int 18 -load 26 +frame_dig 19 setbit int 19 -load 27 +frame_dig 20 setbit int 20 -load 28 +frame_dig 21 setbit int 21 -load 29 +frame_dig 22 setbit int 22 -load 30 +frame_dig 23 setbit int 23 -load 31 +frame_dig 24 setbit int 24 -load 32 +frame_dig 25 setbit int 25 -load 33 +frame_dig 26 setbit int 26 -load 34 +frame_dig 27 setbit int 27 -load 35 +frame_dig 28 setbit int 28 -load 36 +frame_dig 29 setbit int 29 -load 37 +frame_dig 30 setbit int 30 -load 38 +frame_dig 31 setbit int 31 -load 39 +frame_dig 32 setbit int 32 -load 40 +frame_dig 33 setbit int 33 -load 41 +frame_dig 34 setbit int 34 -load 42 +frame_dig 35 setbit int 35 -load 43 +frame_dig 36 setbit int 36 -load 44 +frame_dig 37 setbit int 37 -load 45 +frame_dig 38 setbit int 38 -load 46 +frame_dig 39 setbit int 39 -load 47 +frame_dig 40 setbit int 40 -load 48 +frame_dig 41 setbit int 41 -load 49 +frame_dig 42 setbit concat frame_bury 0 @@ -544,64 +549,69 @@ retsub roundtripper_2: proto 1 1 byte "" +dupn 2 +int 0 +dupn 1 +byte "" +dupn 1 frame_dig -1 callsub arraycomplement_1 -store 2 -load 2 +frame_bury 1 +frame_dig 1 callsub arraycomplement_1 -store 3 +frame_bury 2 frame_dig -1 -store 7 -load 7 -store 6 +frame_bury 6 +frame_dig 6 +frame_bury 5 int 6 -store 4 -load 4 -load 7 +frame_bury 3 +frame_dig 3 +frame_dig 6 len + -store 5 -load 5 +frame_bury 4 +frame_dig 4 int 65536 < assert -load 4 +frame_dig 3 itob extract 6 0 -load 2 -store 7 -load 6 -load 7 +frame_dig 1 +frame_bury 6 +frame_dig 5 +frame_dig 6 concat -store 6 -load 5 -store 4 -load 4 -load 7 +frame_bury 5 +frame_dig 4 +frame_bury 3 +frame_dig 3 +frame_dig 6 len + -store 5 -load 5 +frame_bury 4 +frame_dig 4 int 65536 < assert -load 4 +frame_dig 3 itob extract 6 0 concat -load 3 -store 7 -load 6 -load 7 +frame_dig 2 +frame_bury 6 +frame_dig 5 +frame_dig 6 concat -store 6 -load 5 -store 4 -load 4 +frame_bury 5 +frame_dig 4 +frame_bury 3 +frame_dig 3 itob extract 6 0 concat -load 6 +frame_dig 5 concat frame_bury 0 retsub \ No newline at end of file diff --git a/tests/integration/teal/roundtrip/app_roundtrip_bool_v8.teal b/tests/integration/teal/roundtrip/app_roundtrip_bool_v8.teal index 5e08ac3d2..b3b85fd76 100644 --- a/tests/integration/teal/roundtrip/app_roundtrip_bool_v8.teal +++ b/tests/integration/teal/roundtrip/app_roundtrip_bool_v8.teal @@ -30,21 +30,25 @@ retsub roundtripper_1: proto 1 1 byte "" +int 0 +dupn 3 +byte "" +dupn 1 frame_dig -1 callsub boolcomp_0 -store 2 -load 2 +frame_bury 1 +frame_dig 1 callsub boolcomp_0 -store 3 +frame_bury 2 byte 0x00 int 0 frame_dig -1 setbit int 1 -load 2 +frame_dig 1 setbit int 2 -load 3 +frame_dig 2 setbit frame_bury 0 retsub \ No newline at end of file diff --git a/tests/integration/teal/roundtrip/app_roundtrip_byte[16]_v8.teal b/tests/integration/teal/roundtrip/app_roundtrip_byte[16]_v8.teal index 86fa73f5a..e61f765e3 100644 --- a/tests/integration/teal/roundtrip/app_roundtrip_byte[16]_v8.teal +++ b/tests/integration/teal/roundtrip/app_roundtrip_byte[16]_v8.teal @@ -29,227 +29,231 @@ retsub arraycomplement_1: proto 1 1 byte "" +int 0 +dupn 17 +byte "" +dupn 1 frame_dig -1 int 1 int 0 * getbyte -store 4 +frame_bury 1 frame_dig -1 int 1 int 1 * getbyte -store 5 +frame_bury 2 frame_dig -1 int 1 int 2 * getbyte -store 6 +frame_bury 3 frame_dig -1 int 1 int 3 * getbyte -store 7 +frame_bury 4 frame_dig -1 int 1 int 4 * getbyte -store 8 +frame_bury 5 frame_dig -1 int 1 int 5 * getbyte -store 9 +frame_bury 6 frame_dig -1 int 1 int 6 * getbyte -store 10 +frame_bury 7 frame_dig -1 int 1 int 7 * getbyte -store 11 +frame_bury 8 frame_dig -1 int 1 int 8 * getbyte -store 12 +frame_bury 9 frame_dig -1 int 1 int 9 * getbyte -store 13 +frame_bury 10 frame_dig -1 int 1 int 10 * getbyte -store 14 +frame_bury 11 frame_dig -1 int 1 int 11 * getbyte -store 15 +frame_bury 12 frame_dig -1 int 1 int 12 * getbyte -store 16 +frame_bury 13 frame_dig -1 int 1 int 13 * getbyte -store 17 +frame_bury 14 frame_dig -1 int 1 int 14 * getbyte -store 18 +frame_bury 15 frame_dig -1 int 1 int 15 * getbyte -store 19 -load 4 +frame_bury 16 +frame_dig 1 callsub numericalcomp_0 -store 4 -load 5 +frame_bury 1 +frame_dig 2 callsub numericalcomp_0 -store 5 -load 6 +frame_bury 2 +frame_dig 3 callsub numericalcomp_0 -store 6 -load 7 +frame_bury 3 +frame_dig 4 callsub numericalcomp_0 -store 7 -load 8 +frame_bury 4 +frame_dig 5 callsub numericalcomp_0 -store 8 -load 9 +frame_bury 5 +frame_dig 6 callsub numericalcomp_0 -store 9 -load 10 +frame_bury 6 +frame_dig 7 callsub numericalcomp_0 -store 10 -load 11 +frame_bury 7 +frame_dig 8 callsub numericalcomp_0 -store 11 -load 12 +frame_bury 8 +frame_dig 9 callsub numericalcomp_0 -store 12 -load 13 +frame_bury 9 +frame_dig 10 callsub numericalcomp_0 -store 13 -load 14 +frame_bury 10 +frame_dig 11 callsub numericalcomp_0 -store 14 -load 15 +frame_bury 11 +frame_dig 12 callsub numericalcomp_0 -store 15 -load 16 +frame_bury 12 +frame_dig 13 callsub numericalcomp_0 -store 16 -load 17 +frame_bury 13 +frame_dig 14 callsub numericalcomp_0 -store 17 -load 18 +frame_bury 14 +frame_dig 15 callsub numericalcomp_0 -store 18 -load 19 +frame_bury 15 +frame_dig 16 callsub numericalcomp_0 -store 19 +frame_bury 16 byte 0x00 int 0 -load 4 +frame_dig 1 setbyte byte 0x00 int 0 -load 5 +frame_dig 2 setbyte concat byte 0x00 int 0 -load 6 +frame_dig 3 setbyte concat byte 0x00 int 0 -load 7 +frame_dig 4 setbyte concat byte 0x00 int 0 -load 8 +frame_dig 5 setbyte concat byte 0x00 int 0 -load 9 +frame_dig 6 setbyte concat byte 0x00 int 0 -load 10 +frame_dig 7 setbyte concat byte 0x00 int 0 -load 11 +frame_dig 8 setbyte concat byte 0x00 int 0 -load 12 +frame_dig 9 setbyte concat byte 0x00 int 0 -load 13 +frame_dig 10 setbyte concat byte 0x00 int 0 -load 14 +frame_dig 11 setbyte concat byte 0x00 int 0 -load 15 +frame_dig 12 setbyte concat byte 0x00 int 0 -load 16 +frame_dig 13 setbyte concat byte 0x00 int 0 -load 17 +frame_dig 14 setbyte concat byte 0x00 int 0 -load 18 +frame_dig 15 setbyte concat byte 0x00 int 0 -load 19 +frame_dig 16 setbyte concat frame_bury 0 @@ -259,16 +263,21 @@ retsub roundtripper_2: proto 1 1 byte "" +dupn 2 +int 0 +dupn 1 +byte "" +dupn 1 frame_dig -1 callsub arraycomplement_1 -store 2 -load 2 +frame_bury 1 +frame_dig 1 callsub arraycomplement_1 -store 3 +frame_bury 2 frame_dig -1 -load 2 +frame_dig 1 concat -load 3 +frame_dig 2 concat frame_bury 0 retsub \ No newline at end of file diff --git a/tests/integration/teal/roundtrip/app_roundtrip_byte[]_36_v8.teal b/tests/integration/teal/roundtrip/app_roundtrip_byte[]_36_v8.teal index 3b92e3e84..bc35cdbb4 100644 --- a/tests/integration/teal/roundtrip/app_roundtrip_byte[]_36_v8.teal +++ b/tests/integration/teal/roundtrip/app_roundtrip_byte[]_36_v8.teal @@ -29,6 +29,11 @@ retsub arraycomplement_1: proto 1 1 byte "" +int 0 +dupn 73 +byte "" +dupn 1 +int 0 frame_dig -1 int 1 int 0 @@ -36,7 +41,7 @@ int 0 int 2 + getbyte -store 8 +frame_bury 1 frame_dig -1 int 1 int 1 @@ -44,7 +49,7 @@ int 1 int 2 + getbyte -store 9 +frame_bury 2 frame_dig -1 int 1 int 2 @@ -52,7 +57,7 @@ int 2 int 2 + getbyte -store 10 +frame_bury 3 frame_dig -1 int 1 int 3 @@ -60,7 +65,7 @@ int 3 int 2 + getbyte -store 11 +frame_bury 4 frame_dig -1 int 1 int 4 @@ -68,7 +73,7 @@ int 4 int 2 + getbyte -store 12 +frame_bury 5 frame_dig -1 int 1 int 5 @@ -76,7 +81,7 @@ int 5 int 2 + getbyte -store 13 +frame_bury 6 frame_dig -1 int 1 int 6 @@ -84,7 +89,7 @@ int 6 int 2 + getbyte -store 14 +frame_bury 7 frame_dig -1 int 1 int 7 @@ -92,7 +97,7 @@ int 7 int 2 + getbyte -store 15 +frame_bury 8 frame_dig -1 int 1 int 8 @@ -100,7 +105,7 @@ int 8 int 2 + getbyte -store 16 +frame_bury 9 frame_dig -1 int 1 int 9 @@ -108,7 +113,7 @@ int 9 int 2 + getbyte -store 17 +frame_bury 10 frame_dig -1 int 1 int 10 @@ -116,7 +121,7 @@ int 10 int 2 + getbyte -store 18 +frame_bury 11 frame_dig -1 int 1 int 11 @@ -124,7 +129,7 @@ int 11 int 2 + getbyte -store 19 +frame_bury 12 frame_dig -1 int 1 int 12 @@ -132,7 +137,7 @@ int 12 int 2 + getbyte -store 20 +frame_bury 13 frame_dig -1 int 1 int 13 @@ -140,7 +145,7 @@ int 13 int 2 + getbyte -store 21 +frame_bury 14 frame_dig -1 int 1 int 14 @@ -148,7 +153,7 @@ int 14 int 2 + getbyte -store 22 +frame_bury 15 frame_dig -1 int 1 int 15 @@ -156,7 +161,7 @@ int 15 int 2 + getbyte -store 23 +frame_bury 16 frame_dig -1 int 1 int 16 @@ -164,7 +169,7 @@ int 16 int 2 + getbyte -store 24 +frame_bury 17 frame_dig -1 int 1 int 17 @@ -172,7 +177,7 @@ int 17 int 2 + getbyte -store 25 +frame_bury 18 frame_dig -1 int 1 int 18 @@ -180,7 +185,7 @@ int 18 int 2 + getbyte -store 26 +frame_bury 19 frame_dig -1 int 1 int 19 @@ -188,7 +193,7 @@ int 19 int 2 + getbyte -store 27 +frame_bury 20 frame_dig -1 int 1 int 20 @@ -196,7 +201,7 @@ int 20 int 2 + getbyte -store 28 +frame_bury 21 frame_dig -1 int 1 int 21 @@ -204,7 +209,7 @@ int 21 int 2 + getbyte -store 29 +frame_bury 22 frame_dig -1 int 1 int 22 @@ -212,7 +217,7 @@ int 22 int 2 + getbyte -store 30 +frame_bury 23 frame_dig -1 int 1 int 23 @@ -220,7 +225,7 @@ int 23 int 2 + getbyte -store 31 +frame_bury 24 frame_dig -1 int 1 int 24 @@ -228,7 +233,7 @@ int 24 int 2 + getbyte -store 32 +frame_bury 25 frame_dig -1 int 1 int 25 @@ -236,7 +241,7 @@ int 25 int 2 + getbyte -store 33 +frame_bury 26 frame_dig -1 int 1 int 26 @@ -244,7 +249,7 @@ int 26 int 2 + getbyte -store 34 +frame_bury 27 frame_dig -1 int 1 int 27 @@ -252,7 +257,7 @@ int 27 int 2 + getbyte -store 35 +frame_bury 28 frame_dig -1 int 1 int 28 @@ -260,7 +265,7 @@ int 28 int 2 + getbyte -store 36 +frame_bury 29 frame_dig -1 int 1 int 29 @@ -268,7 +273,7 @@ int 29 int 2 + getbyte -store 37 +frame_bury 30 frame_dig -1 int 1 int 30 @@ -276,7 +281,7 @@ int 30 int 2 + getbyte -store 38 +frame_bury 31 frame_dig -1 int 1 int 31 @@ -284,7 +289,7 @@ int 31 int 2 + getbyte -store 39 +frame_bury 32 frame_dig -1 int 1 int 32 @@ -292,7 +297,7 @@ int 32 int 2 + getbyte -store 40 +frame_bury 33 frame_dig -1 int 1 int 33 @@ -300,7 +305,7 @@ int 33 int 2 + getbyte -store 41 +frame_bury 34 frame_dig -1 int 1 int 34 @@ -308,7 +313,7 @@ int 34 int 2 + getbyte -store 42 +frame_bury 35 frame_dig -1 int 1 int 35 @@ -316,297 +321,297 @@ int 35 int 2 + getbyte -store 43 -load 8 +frame_bury 36 +frame_dig 1 callsub numericalcomp_0 -store 8 -load 9 +frame_bury 1 +frame_dig 2 callsub numericalcomp_0 -store 9 -load 10 +frame_bury 2 +frame_dig 3 callsub numericalcomp_0 -store 10 -load 11 +frame_bury 3 +frame_dig 4 callsub numericalcomp_0 -store 11 -load 12 +frame_bury 4 +frame_dig 5 callsub numericalcomp_0 -store 12 -load 13 +frame_bury 5 +frame_dig 6 callsub numericalcomp_0 -store 13 -load 14 +frame_bury 6 +frame_dig 7 callsub numericalcomp_0 -store 14 -load 15 +frame_bury 7 +frame_dig 8 callsub numericalcomp_0 -store 15 -load 16 +frame_bury 8 +frame_dig 9 callsub numericalcomp_0 -store 16 -load 17 +frame_bury 9 +frame_dig 10 callsub numericalcomp_0 -store 17 -load 18 +frame_bury 10 +frame_dig 11 callsub numericalcomp_0 -store 18 -load 19 +frame_bury 11 +frame_dig 12 callsub numericalcomp_0 -store 19 -load 20 +frame_bury 12 +frame_dig 13 callsub numericalcomp_0 -store 20 -load 21 +frame_bury 13 +frame_dig 14 callsub numericalcomp_0 -store 21 -load 22 +frame_bury 14 +frame_dig 15 callsub numericalcomp_0 -store 22 -load 23 +frame_bury 15 +frame_dig 16 callsub numericalcomp_0 -store 23 -load 24 +frame_bury 16 +frame_dig 17 callsub numericalcomp_0 -store 24 -load 25 +frame_bury 17 +frame_dig 18 callsub numericalcomp_0 -store 25 -load 26 +frame_bury 18 +frame_dig 19 callsub numericalcomp_0 -store 26 -load 27 +frame_bury 19 +frame_dig 20 callsub numericalcomp_0 -store 27 -load 28 +frame_bury 20 +frame_dig 21 callsub numericalcomp_0 -store 28 -load 29 +frame_bury 21 +frame_dig 22 callsub numericalcomp_0 -store 29 -load 30 +frame_bury 22 +frame_dig 23 callsub numericalcomp_0 -store 30 -load 31 +frame_bury 23 +frame_dig 24 callsub numericalcomp_0 -store 31 -load 32 +frame_bury 24 +frame_dig 25 callsub numericalcomp_0 -store 32 -load 33 +frame_bury 25 +frame_dig 26 callsub numericalcomp_0 -store 33 -load 34 +frame_bury 26 +frame_dig 27 callsub numericalcomp_0 -store 34 -load 35 +frame_bury 27 +frame_dig 28 callsub numericalcomp_0 -store 35 -load 36 +frame_bury 28 +frame_dig 29 callsub numericalcomp_0 -store 36 -load 37 +frame_bury 29 +frame_dig 30 callsub numericalcomp_0 -store 37 -load 38 +frame_bury 30 +frame_dig 31 callsub numericalcomp_0 -store 38 -load 39 +frame_bury 31 +frame_dig 32 callsub numericalcomp_0 -store 39 -load 40 +frame_bury 32 +frame_dig 33 callsub numericalcomp_0 -store 40 -load 41 +frame_bury 33 +frame_dig 34 callsub numericalcomp_0 -store 41 -load 42 +frame_bury 34 +frame_dig 35 callsub numericalcomp_0 -store 42 -load 43 +frame_bury 35 +frame_dig 36 callsub numericalcomp_0 -store 43 +frame_bury 36 int 36 -store 44 -load 44 +frame_bury 77 +frame_dig 77 itob extract 6 0 byte 0x00 int 0 -load 8 +frame_dig 1 setbyte byte 0x00 int 0 -load 9 +frame_dig 2 setbyte concat byte 0x00 int 0 -load 10 +frame_dig 3 setbyte concat byte 0x00 int 0 -load 11 +frame_dig 4 setbyte concat byte 0x00 int 0 -load 12 +frame_dig 5 setbyte concat byte 0x00 int 0 -load 13 +frame_dig 6 setbyte concat byte 0x00 int 0 -load 14 +frame_dig 7 setbyte concat byte 0x00 int 0 -load 15 +frame_dig 8 setbyte concat byte 0x00 int 0 -load 16 +frame_dig 9 setbyte concat byte 0x00 int 0 -load 17 +frame_dig 10 setbyte concat byte 0x00 int 0 -load 18 +frame_dig 11 setbyte concat byte 0x00 int 0 -load 19 +frame_dig 12 setbyte concat byte 0x00 int 0 -load 20 +frame_dig 13 setbyte concat byte 0x00 int 0 -load 21 +frame_dig 14 setbyte concat byte 0x00 int 0 -load 22 +frame_dig 15 setbyte concat byte 0x00 int 0 -load 23 +frame_dig 16 setbyte concat byte 0x00 int 0 -load 24 +frame_dig 17 setbyte concat byte 0x00 int 0 -load 25 +frame_dig 18 setbyte concat byte 0x00 int 0 -load 26 +frame_dig 19 setbyte concat byte 0x00 int 0 -load 27 +frame_dig 20 setbyte concat byte 0x00 int 0 -load 28 +frame_dig 21 setbyte concat byte 0x00 int 0 -load 29 +frame_dig 22 setbyte concat byte 0x00 int 0 -load 30 +frame_dig 23 setbyte concat byte 0x00 int 0 -load 31 +frame_dig 24 setbyte concat byte 0x00 int 0 -load 32 +frame_dig 25 setbyte concat byte 0x00 int 0 -load 33 +frame_dig 26 setbyte concat byte 0x00 int 0 -load 34 +frame_dig 27 setbyte concat byte 0x00 int 0 -load 35 +frame_dig 28 setbyte concat byte 0x00 int 0 -load 36 +frame_dig 29 setbyte concat byte 0x00 int 0 -load 37 +frame_dig 30 setbyte concat byte 0x00 int 0 -load 38 +frame_dig 31 setbyte concat byte 0x00 int 0 -load 39 +frame_dig 32 setbyte concat byte 0x00 int 0 -load 40 +frame_dig 33 setbyte concat byte 0x00 int 0 -load 41 +frame_dig 34 setbyte concat byte 0x00 int 0 -load 42 +frame_dig 35 setbyte concat byte 0x00 int 0 -load 43 +frame_dig 36 setbyte concat concat @@ -617,64 +622,69 @@ retsub roundtripper_2: proto 1 1 byte "" +dupn 2 +int 0 +dupn 1 +byte "" +dupn 1 frame_dig -1 callsub arraycomplement_1 -store 2 -load 2 +frame_bury 1 +frame_dig 1 callsub arraycomplement_1 -store 3 +frame_bury 2 frame_dig -1 -store 7 -load 7 -store 6 +frame_bury 6 +frame_dig 6 +frame_bury 5 int 6 -store 4 -load 4 -load 7 +frame_bury 3 +frame_dig 3 +frame_dig 6 len + -store 5 -load 5 +frame_bury 4 +frame_dig 4 int 65536 < assert -load 4 +frame_dig 3 itob extract 6 0 -load 2 -store 7 -load 6 -load 7 -concat -store 6 -load 5 -store 4 -load 4 -load 7 +frame_dig 1 +frame_bury 6 +frame_dig 5 +frame_dig 6 +concat +frame_bury 5 +frame_dig 4 +frame_bury 3 +frame_dig 3 +frame_dig 6 len + -store 5 -load 5 +frame_bury 4 +frame_dig 4 int 65536 < assert -load 4 +frame_dig 3 itob extract 6 0 concat -load 3 -store 7 -load 6 -load 7 +frame_dig 2 +frame_bury 6 +frame_dig 5 +frame_dig 6 concat -store 6 -load 5 -store 4 -load 4 +frame_bury 5 +frame_dig 4 +frame_bury 3 +frame_dig 3 itob extract 6 0 concat -load 6 +frame_dig 5 concat frame_bury 0 retsub \ No newline at end of file diff --git a/tests/integration/teal/roundtrip/app_roundtrip_byte_v8.teal b/tests/integration/teal/roundtrip/app_roundtrip_byte_v8.teal index c7dfcc09f..09f91f0a7 100644 --- a/tests/integration/teal/roundtrip/app_roundtrip_byte_v8.teal +++ b/tests/integration/teal/roundtrip/app_roundtrip_byte_v8.teal @@ -31,24 +31,28 @@ retsub roundtripper_1: proto 1 1 byte "" +int 0 +dupn 3 +byte "" +dupn 1 frame_dig -1 callsub numericalcomp_0 -store 2 -load 2 +frame_bury 1 +frame_dig 1 callsub numericalcomp_0 -store 3 +frame_bury 2 byte 0x00 int 0 frame_dig -1 setbyte byte 0x00 int 0 -load 2 +frame_dig 1 setbyte concat byte 0x00 int 0 -load 3 +frame_dig 2 setbyte concat frame_bury 0 diff --git a/tests/integration/teal/roundtrip/app_roundtrip_string_0_v8.teal b/tests/integration/teal/roundtrip/app_roundtrip_string_0_v8.teal index f6742b7c1..3a1effcc4 100644 --- a/tests/integration/teal/roundtrip/app_roundtrip_string_0_v8.teal +++ b/tests/integration/teal/roundtrip/app_roundtrip_string_0_v8.teal @@ -16,8 +16,13 @@ stringreverse_0: proto 1 1 byte "" int 0 -store 8 -load 8 +dupn 1 +byte "" +dupn 1 +int 0 +int 0 +frame_bury 5 +frame_dig 5 itob extract 6 0 byte "" @@ -29,64 +34,69 @@ retsub roundtripper_1: proto 1 1 byte "" +dupn 2 +int 0 +dupn 1 +byte "" +dupn 1 frame_dig -1 callsub stringreverse_0 -store 2 -load 2 +frame_bury 1 +frame_dig 1 callsub stringreverse_0 -store 3 +frame_bury 2 frame_dig -1 -store 7 -load 7 -store 6 +frame_bury 6 +frame_dig 6 +frame_bury 5 int 6 -store 4 -load 4 -load 7 +frame_bury 3 +frame_dig 3 +frame_dig 6 len + -store 5 -load 5 +frame_bury 4 +frame_dig 4 int 65536 < assert -load 4 +frame_dig 3 itob extract 6 0 -load 2 -store 7 -load 6 -load 7 +frame_dig 1 +frame_bury 6 +frame_dig 5 +frame_dig 6 concat -store 6 -load 5 -store 4 -load 4 -load 7 +frame_bury 5 +frame_dig 4 +frame_bury 3 +frame_dig 3 +frame_dig 6 len + -store 5 -load 5 +frame_bury 4 +frame_dig 4 int 65536 < assert -load 4 +frame_dig 3 itob extract 6 0 concat -load 3 -store 7 -load 6 -load 7 +frame_dig 2 +frame_bury 6 +frame_dig 5 +frame_dig 6 concat -store 6 -load 5 -store 4 -load 4 +frame_bury 5 +frame_dig 4 +frame_bury 3 +frame_dig 3 itob extract 6 0 concat -load 6 +frame_dig 5 concat frame_bury 0 retsub \ No newline at end of file diff --git a/tests/integration/teal/roundtrip/app_roundtrip_string_13_v8.teal b/tests/integration/teal/roundtrip/app_roundtrip_string_13_v8.teal index 4e608a404..fdb2b37fb 100644 --- a/tests/integration/teal/roundtrip/app_roundtrip_string_13_v8.teal +++ b/tests/integration/teal/roundtrip/app_roundtrip_string_13_v8.teal @@ -15,6 +15,11 @@ return stringreverse_0: proto 1 1 byte "" +int 0 +dupn 27 +byte "" +dupn 1 +int 0 frame_dig -1 int 1 int 0 @@ -22,7 +27,7 @@ int 0 int 2 + getbyte -store 20 +frame_bury 13 frame_dig -1 int 1 int 1 @@ -30,7 +35,7 @@ int 1 int 2 + getbyte -store 19 +frame_bury 12 frame_dig -1 int 1 int 2 @@ -38,7 +43,7 @@ int 2 int 2 + getbyte -store 18 +frame_bury 11 frame_dig -1 int 1 int 3 @@ -46,7 +51,7 @@ int 3 int 2 + getbyte -store 17 +frame_bury 10 frame_dig -1 int 1 int 4 @@ -54,7 +59,7 @@ int 4 int 2 + getbyte -store 16 +frame_bury 9 frame_dig -1 int 1 int 5 @@ -62,7 +67,7 @@ int 5 int 2 + getbyte -store 15 +frame_bury 8 frame_dig -1 int 1 int 6 @@ -70,7 +75,7 @@ int 6 int 2 + getbyte -store 14 +frame_bury 7 frame_dig -1 int 1 int 7 @@ -78,7 +83,7 @@ int 7 int 2 + getbyte -store 13 +frame_bury 6 frame_dig -1 int 1 int 8 @@ -86,7 +91,7 @@ int 8 int 2 + getbyte -store 12 +frame_bury 5 frame_dig -1 int 1 int 9 @@ -94,7 +99,7 @@ int 9 int 2 + getbyte -store 11 +frame_bury 4 frame_dig -1 int 1 int 10 @@ -102,7 +107,7 @@ int 10 int 2 + getbyte -store 10 +frame_bury 3 frame_dig -1 int 1 int 11 @@ -110,7 +115,7 @@ int 11 int 2 + getbyte -store 9 +frame_bury 2 frame_dig -1 int 1 int 12 @@ -118,74 +123,74 @@ int 12 int 2 + getbyte -store 8 +frame_bury 1 int 13 -store 21 -load 21 +frame_bury 31 +frame_dig 31 itob extract 6 0 byte 0x00 int 0 -load 8 +frame_dig 1 setbyte byte 0x00 int 0 -load 9 +frame_dig 2 setbyte concat byte 0x00 int 0 -load 10 +frame_dig 3 setbyte concat byte 0x00 int 0 -load 11 +frame_dig 4 setbyte concat byte 0x00 int 0 -load 12 +frame_dig 5 setbyte concat byte 0x00 int 0 -load 13 +frame_dig 6 setbyte concat byte 0x00 int 0 -load 14 +frame_dig 7 setbyte concat byte 0x00 int 0 -load 15 +frame_dig 8 setbyte concat byte 0x00 int 0 -load 16 +frame_dig 9 setbyte concat byte 0x00 int 0 -load 17 +frame_dig 10 setbyte concat byte 0x00 int 0 -load 18 +frame_dig 11 setbyte concat byte 0x00 int 0 -load 19 +frame_dig 12 setbyte concat byte 0x00 int 0 -load 20 +frame_dig 13 setbyte concat concat @@ -196,64 +201,69 @@ retsub roundtripper_1: proto 1 1 byte "" +dupn 2 +int 0 +dupn 1 +byte "" +dupn 1 frame_dig -1 callsub stringreverse_0 -store 2 -load 2 +frame_bury 1 +frame_dig 1 callsub stringreverse_0 -store 3 +frame_bury 2 frame_dig -1 -store 7 -load 7 -store 6 +frame_bury 6 +frame_dig 6 +frame_bury 5 int 6 -store 4 -load 4 -load 7 +frame_bury 3 +frame_dig 3 +frame_dig 6 len + -store 5 -load 5 +frame_bury 4 +frame_dig 4 int 65536 < assert -load 4 +frame_dig 3 itob extract 6 0 -load 2 -store 7 -load 6 -load 7 +frame_dig 1 +frame_bury 6 +frame_dig 5 +frame_dig 6 concat -store 6 -load 5 -store 4 -load 4 -load 7 +frame_bury 5 +frame_dig 4 +frame_bury 3 +frame_dig 3 +frame_dig 6 len + -store 5 -load 5 +frame_bury 4 +frame_dig 4 int 65536 < assert -load 4 +frame_dig 3 itob extract 6 0 concat -load 3 -store 7 -load 6 -load 7 +frame_dig 2 +frame_bury 6 +frame_dig 5 +frame_dig 6 concat -store 6 -load 5 -store 4 -load 4 +frame_bury 5 +frame_dig 4 +frame_bury 3 +frame_dig 3 itob extract 6 0 concat -load 6 +frame_dig 5 concat frame_bury 0 retsub \ No newline at end of file diff --git a/tests/integration/teal/roundtrip/app_roundtrip_string_1_v8.teal b/tests/integration/teal/roundtrip/app_roundtrip_string_1_v8.teal index 8a72badb8..be88fc157 100644 --- a/tests/integration/teal/roundtrip/app_roundtrip_string_1_v8.teal +++ b/tests/integration/teal/roundtrip/app_roundtrip_string_1_v8.teal @@ -15,6 +15,11 @@ return stringreverse_0: proto 1 1 byte "" +int 0 +dupn 3 +byte "" +dupn 1 +int 0 frame_dig -1 int 1 int 0 @@ -22,15 +27,15 @@ int 0 int 2 + getbyte -store 8 +frame_bury 1 int 1 -store 9 -load 9 +frame_bury 7 +frame_dig 7 itob extract 6 0 byte 0x00 int 0 -load 8 +frame_dig 1 setbyte concat frame_bury 0 @@ -40,64 +45,69 @@ retsub roundtripper_1: proto 1 1 byte "" +dupn 2 +int 0 +dupn 1 +byte "" +dupn 1 frame_dig -1 callsub stringreverse_0 -store 2 -load 2 +frame_bury 1 +frame_dig 1 callsub stringreverse_0 -store 3 +frame_bury 2 frame_dig -1 -store 7 -load 7 -store 6 +frame_bury 6 +frame_dig 6 +frame_bury 5 int 6 -store 4 -load 4 -load 7 +frame_bury 3 +frame_dig 3 +frame_dig 6 len + -store 5 -load 5 +frame_bury 4 +frame_dig 4 int 65536 < assert -load 4 +frame_dig 3 itob extract 6 0 -load 2 -store 7 -load 6 -load 7 +frame_dig 1 +frame_bury 6 +frame_dig 5 +frame_dig 6 concat -store 6 -load 5 -store 4 -load 4 -load 7 +frame_bury 5 +frame_dig 4 +frame_bury 3 +frame_dig 3 +frame_dig 6 len + -store 5 -load 5 +frame_bury 4 +frame_dig 4 int 65536 < assert -load 4 +frame_dig 3 itob extract 6 0 concat -load 3 -store 7 -load 6 -load 7 +frame_dig 2 +frame_bury 6 +frame_dig 5 +frame_dig 6 concat -store 6 -load 5 -store 4 -load 4 +frame_bury 5 +frame_dig 4 +frame_bury 3 +frame_dig 3 itob extract 6 0 concat -load 6 +frame_dig 5 concat frame_bury 0 retsub \ No newline at end of file diff --git a/tests/integration/teal/roundtrip/app_roundtrip_uint16_v8.teal b/tests/integration/teal/roundtrip/app_roundtrip_uint16_v8.teal index 2baecd50a..e1ac5d747 100644 --- a/tests/integration/teal/roundtrip/app_roundtrip_uint16_v8.teal +++ b/tests/integration/teal/roundtrip/app_roundtrip_uint16_v8.teal @@ -31,20 +31,24 @@ retsub roundtripper_1: proto 1 1 byte "" +int 0 +dupn 3 +byte "" +dupn 1 frame_dig -1 callsub numericalcomp_0 -store 2 -load 2 +frame_bury 1 +frame_dig 1 callsub numericalcomp_0 -store 3 +frame_bury 2 frame_dig -1 itob extract 6 0 -load 2 +frame_dig 1 itob extract 6 0 concat -load 3 +frame_dig 2 itob extract 6 0 concat diff --git a/tests/integration/teal/roundtrip/app_roundtrip_uint32_v8.teal b/tests/integration/teal/roundtrip/app_roundtrip_uint32_v8.teal index d495dae9d..2ad4ceba3 100644 --- a/tests/integration/teal/roundtrip/app_roundtrip_uint32_v8.teal +++ b/tests/integration/teal/roundtrip/app_roundtrip_uint32_v8.teal @@ -31,20 +31,24 @@ retsub roundtripper_1: proto 1 1 byte "" +int 0 +dupn 3 +byte "" +dupn 1 frame_dig -1 callsub numericalcomp_0 -store 2 -load 2 +frame_bury 1 +frame_dig 1 callsub numericalcomp_0 -store 3 +frame_bury 2 frame_dig -1 itob extract 4 0 -load 2 +frame_dig 1 itob extract 4 0 concat -load 3 +frame_dig 2 itob extract 4 0 concat diff --git a/tests/integration/teal/roundtrip/app_roundtrip_uint64[1]_v8.teal b/tests/integration/teal/roundtrip/app_roundtrip_uint64[1]_v8.teal index 48d881ec6..7a92839b7 100644 --- a/tests/integration/teal/roundtrip/app_roundtrip_uint64[1]_v8.teal +++ b/tests/integration/teal/roundtrip/app_roundtrip_uint64[1]_v8.teal @@ -25,16 +25,20 @@ retsub arraycomplement_1: proto 1 1 byte "" +int 0 +dupn 2 +byte "" +dupn 1 frame_dig -1 int 8 int 0 * extract_uint64 -store 4 -load 4 +frame_bury 1 +frame_dig 1 callsub numericalcomp_0 -store 4 -load 4 +frame_bury 1 +frame_dig 1 itob frame_bury 0 retsub @@ -43,16 +47,21 @@ retsub roundtripper_2: proto 1 1 byte "" +dupn 2 +int 0 +dupn 1 +byte "" +dupn 1 frame_dig -1 callsub arraycomplement_1 -store 2 -load 2 +frame_bury 1 +frame_dig 1 callsub arraycomplement_1 -store 3 +frame_bury 2 frame_dig -1 -load 2 +frame_dig 1 concat -load 3 +frame_dig 2 concat frame_bury 0 retsub \ No newline at end of file diff --git a/tests/integration/teal/roundtrip/app_roundtrip_uint64[42]_v8.teal b/tests/integration/teal/roundtrip/app_roundtrip_uint64[42]_v8.teal index 9126983f1..bee568ac1 100644 --- a/tests/integration/teal/roundtrip/app_roundtrip_uint64[42]_v8.teal +++ b/tests/integration/teal/roundtrip/app_roundtrip_uint64[42]_v8.teal @@ -25,507 +25,511 @@ retsub arraycomplement_1: proto 1 1 byte "" +int 0 +dupn 43 +byte "" +dupn 1 frame_dig -1 int 8 int 0 * extract_uint64 -store 4 +frame_bury 1 frame_dig -1 int 8 int 1 * extract_uint64 -store 5 +frame_bury 2 frame_dig -1 int 8 int 2 * extract_uint64 -store 6 +frame_bury 3 frame_dig -1 int 8 int 3 * extract_uint64 -store 7 +frame_bury 4 frame_dig -1 int 8 int 4 * extract_uint64 -store 8 +frame_bury 5 frame_dig -1 int 8 int 5 * extract_uint64 -store 9 +frame_bury 6 frame_dig -1 int 8 int 6 * extract_uint64 -store 10 +frame_bury 7 frame_dig -1 int 8 int 7 * extract_uint64 -store 11 +frame_bury 8 frame_dig -1 int 8 int 8 * extract_uint64 -store 12 +frame_bury 9 frame_dig -1 int 8 int 9 * extract_uint64 -store 13 +frame_bury 10 frame_dig -1 int 8 int 10 * extract_uint64 -store 14 +frame_bury 11 frame_dig -1 int 8 int 11 * extract_uint64 -store 15 +frame_bury 12 frame_dig -1 int 8 int 12 * extract_uint64 -store 16 +frame_bury 13 frame_dig -1 int 8 int 13 * extract_uint64 -store 17 +frame_bury 14 frame_dig -1 int 8 int 14 * extract_uint64 -store 18 +frame_bury 15 frame_dig -1 int 8 int 15 * extract_uint64 -store 19 +frame_bury 16 frame_dig -1 int 8 int 16 * extract_uint64 -store 20 +frame_bury 17 frame_dig -1 int 8 int 17 * extract_uint64 -store 21 +frame_bury 18 frame_dig -1 int 8 int 18 * extract_uint64 -store 22 +frame_bury 19 frame_dig -1 int 8 int 19 * extract_uint64 -store 23 +frame_bury 20 frame_dig -1 int 8 int 20 * extract_uint64 -store 24 +frame_bury 21 frame_dig -1 int 8 int 21 * extract_uint64 -store 25 +frame_bury 22 frame_dig -1 int 8 int 22 * extract_uint64 -store 26 +frame_bury 23 frame_dig -1 int 8 int 23 * extract_uint64 -store 27 +frame_bury 24 frame_dig -1 int 8 int 24 * extract_uint64 -store 28 +frame_bury 25 frame_dig -1 int 8 int 25 * extract_uint64 -store 29 +frame_bury 26 frame_dig -1 int 8 int 26 * extract_uint64 -store 30 +frame_bury 27 frame_dig -1 int 8 int 27 * extract_uint64 -store 31 +frame_bury 28 frame_dig -1 int 8 int 28 * extract_uint64 -store 32 +frame_bury 29 frame_dig -1 int 8 int 29 * extract_uint64 -store 33 +frame_bury 30 frame_dig -1 int 8 int 30 * extract_uint64 -store 34 +frame_bury 31 frame_dig -1 int 8 int 31 * extract_uint64 -store 35 +frame_bury 32 frame_dig -1 int 8 int 32 * extract_uint64 -store 36 +frame_bury 33 frame_dig -1 int 8 int 33 * extract_uint64 -store 37 +frame_bury 34 frame_dig -1 int 8 int 34 * extract_uint64 -store 38 +frame_bury 35 frame_dig -1 int 8 int 35 * extract_uint64 -store 39 +frame_bury 36 frame_dig -1 int 8 int 36 * extract_uint64 -store 40 +frame_bury 37 frame_dig -1 int 8 int 37 * extract_uint64 -store 41 +frame_bury 38 frame_dig -1 int 8 int 38 * extract_uint64 -store 42 +frame_bury 39 frame_dig -1 int 8 int 39 * extract_uint64 -store 43 +frame_bury 40 frame_dig -1 int 8 int 40 * extract_uint64 -store 44 +frame_bury 41 frame_dig -1 int 8 int 41 * extract_uint64 -store 45 -load 4 +frame_bury 42 +frame_dig 1 callsub numericalcomp_0 -store 4 -load 5 +frame_bury 1 +frame_dig 2 callsub numericalcomp_0 -store 5 -load 6 +frame_bury 2 +frame_dig 3 callsub numericalcomp_0 -store 6 -load 7 +frame_bury 3 +frame_dig 4 callsub numericalcomp_0 -store 7 -load 8 +frame_bury 4 +frame_dig 5 callsub numericalcomp_0 -store 8 -load 9 +frame_bury 5 +frame_dig 6 callsub numericalcomp_0 -store 9 -load 10 +frame_bury 6 +frame_dig 7 callsub numericalcomp_0 -store 10 -load 11 +frame_bury 7 +frame_dig 8 callsub numericalcomp_0 -store 11 -load 12 +frame_bury 8 +frame_dig 9 callsub numericalcomp_0 -store 12 -load 13 +frame_bury 9 +frame_dig 10 callsub numericalcomp_0 -store 13 -load 14 +frame_bury 10 +frame_dig 11 callsub numericalcomp_0 -store 14 -load 15 +frame_bury 11 +frame_dig 12 callsub numericalcomp_0 -store 15 -load 16 +frame_bury 12 +frame_dig 13 callsub numericalcomp_0 -store 16 -load 17 +frame_bury 13 +frame_dig 14 callsub numericalcomp_0 -store 17 -load 18 +frame_bury 14 +frame_dig 15 callsub numericalcomp_0 -store 18 -load 19 +frame_bury 15 +frame_dig 16 callsub numericalcomp_0 -store 19 -load 20 +frame_bury 16 +frame_dig 17 callsub numericalcomp_0 -store 20 -load 21 +frame_bury 17 +frame_dig 18 callsub numericalcomp_0 -store 21 -load 22 +frame_bury 18 +frame_dig 19 callsub numericalcomp_0 -store 22 -load 23 +frame_bury 19 +frame_dig 20 callsub numericalcomp_0 -store 23 -load 24 +frame_bury 20 +frame_dig 21 callsub numericalcomp_0 -store 24 -load 25 +frame_bury 21 +frame_dig 22 callsub numericalcomp_0 -store 25 -load 26 +frame_bury 22 +frame_dig 23 callsub numericalcomp_0 -store 26 -load 27 +frame_bury 23 +frame_dig 24 callsub numericalcomp_0 -store 27 -load 28 +frame_bury 24 +frame_dig 25 callsub numericalcomp_0 -store 28 -load 29 +frame_bury 25 +frame_dig 26 callsub numericalcomp_0 -store 29 -load 30 +frame_bury 26 +frame_dig 27 callsub numericalcomp_0 -store 30 -load 31 +frame_bury 27 +frame_dig 28 callsub numericalcomp_0 -store 31 -load 32 +frame_bury 28 +frame_dig 29 callsub numericalcomp_0 -store 32 -load 33 +frame_bury 29 +frame_dig 30 callsub numericalcomp_0 -store 33 -load 34 +frame_bury 30 +frame_dig 31 callsub numericalcomp_0 -store 34 -load 35 +frame_bury 31 +frame_dig 32 callsub numericalcomp_0 -store 35 -load 36 +frame_bury 32 +frame_dig 33 callsub numericalcomp_0 -store 36 -load 37 +frame_bury 33 +frame_dig 34 callsub numericalcomp_0 -store 37 -load 38 +frame_bury 34 +frame_dig 35 callsub numericalcomp_0 -store 38 -load 39 +frame_bury 35 +frame_dig 36 callsub numericalcomp_0 -store 39 -load 40 +frame_bury 36 +frame_dig 37 callsub numericalcomp_0 -store 40 -load 41 +frame_bury 37 +frame_dig 38 callsub numericalcomp_0 -store 41 -load 42 +frame_bury 38 +frame_dig 39 callsub numericalcomp_0 -store 42 -load 43 +frame_bury 39 +frame_dig 40 callsub numericalcomp_0 -store 43 -load 44 +frame_bury 40 +frame_dig 41 callsub numericalcomp_0 -store 44 -load 45 +frame_bury 41 +frame_dig 42 callsub numericalcomp_0 -store 45 -load 4 +frame_bury 42 +frame_dig 1 itob -load 5 +frame_dig 2 itob concat -load 6 +frame_dig 3 itob concat -load 7 +frame_dig 4 itob concat -load 8 +frame_dig 5 itob concat -load 9 +frame_dig 6 itob concat -load 10 +frame_dig 7 itob concat -load 11 +frame_dig 8 itob concat -load 12 +frame_dig 9 itob concat -load 13 +frame_dig 10 itob concat -load 14 +frame_dig 11 itob concat -load 15 +frame_dig 12 itob concat -load 16 +frame_dig 13 itob concat -load 17 +frame_dig 14 itob concat -load 18 +frame_dig 15 itob concat -load 19 +frame_dig 16 itob concat -load 20 +frame_dig 17 itob concat -load 21 +frame_dig 18 itob concat -load 22 +frame_dig 19 itob concat -load 23 +frame_dig 20 itob concat -load 24 +frame_dig 21 itob concat -load 25 +frame_dig 22 itob concat -load 26 +frame_dig 23 itob concat -load 27 +frame_dig 24 itob concat -load 28 +frame_dig 25 itob concat -load 29 +frame_dig 26 itob concat -load 30 +frame_dig 27 itob concat -load 31 +frame_dig 28 itob concat -load 32 +frame_dig 29 itob concat -load 33 +frame_dig 30 itob concat -load 34 +frame_dig 31 itob concat -load 35 +frame_dig 32 itob concat -load 36 +frame_dig 33 itob concat -load 37 +frame_dig 34 itob concat -load 38 +frame_dig 35 itob concat -load 39 +frame_dig 36 itob concat -load 40 +frame_dig 37 itob concat -load 41 +frame_dig 38 itob concat -load 42 +frame_dig 39 itob concat -load 43 +frame_dig 40 itob concat -load 44 +frame_dig 41 itob concat -load 45 +frame_dig 42 itob concat frame_bury 0 @@ -535,16 +539,21 @@ retsub roundtripper_2: proto 1 1 byte "" +dupn 2 +int 0 +dupn 1 +byte "" +dupn 1 frame_dig -1 callsub arraycomplement_1 -store 2 -load 2 +frame_bury 1 +frame_dig 1 callsub arraycomplement_1 -store 3 +frame_bury 2 frame_dig -1 -load 2 +frame_dig 1 concat -load 3 +frame_dig 2 concat frame_bury 0 retsub \ No newline at end of file diff --git a/tests/integration/teal/roundtrip/app_roundtrip_uint64[]_0_v8.teal b/tests/integration/teal/roundtrip/app_roundtrip_uint64[]_0_v8.teal index 87f935c92..8a24971dd 100644 --- a/tests/integration/teal/roundtrip/app_roundtrip_uint64[]_0_v8.teal +++ b/tests/integration/teal/roundtrip/app_roundtrip_uint64[]_0_v8.teal @@ -16,8 +16,13 @@ arraycomplement_0: proto 1 1 byte "" int 0 -store 8 -load 8 +dupn 1 +byte "" +dupn 1 +int 0 +int 0 +frame_bury 5 +frame_dig 5 itob extract 6 0 byte "" @@ -29,64 +34,69 @@ retsub roundtripper_1: proto 1 1 byte "" +dupn 2 +int 0 +dupn 1 +byte "" +dupn 1 frame_dig -1 callsub arraycomplement_0 -store 2 -load 2 +frame_bury 1 +frame_dig 1 callsub arraycomplement_0 -store 3 +frame_bury 2 frame_dig -1 -store 7 -load 7 -store 6 +frame_bury 6 +frame_dig 6 +frame_bury 5 int 6 -store 4 -load 4 -load 7 +frame_bury 3 +frame_dig 3 +frame_dig 6 len + -store 5 -load 5 +frame_bury 4 +frame_dig 4 int 65536 < assert -load 4 +frame_dig 3 itob extract 6 0 -load 2 -store 7 -load 6 -load 7 +frame_dig 1 +frame_bury 6 +frame_dig 5 +frame_dig 6 concat -store 6 -load 5 -store 4 -load 4 -load 7 +frame_bury 5 +frame_dig 4 +frame_bury 3 +frame_dig 3 +frame_dig 6 len + -store 5 -load 5 +frame_bury 4 +frame_dig 4 int 65536 < assert -load 4 +frame_dig 3 itob extract 6 0 concat -load 3 -store 7 -load 6 -load 7 +frame_dig 2 +frame_bury 6 +frame_dig 5 +frame_dig 6 concat -store 6 -load 5 -store 4 -load 4 +frame_bury 5 +frame_dig 4 +frame_bury 3 +frame_dig 3 itob extract 6 0 concat -load 6 +frame_dig 5 concat frame_bury 0 retsub \ No newline at end of file diff --git a/tests/integration/teal/roundtrip/app_roundtrip_uint64[]_1_v8.teal b/tests/integration/teal/roundtrip/app_roundtrip_uint64[]_1_v8.teal index fb4caf8bd..6c45bb4b8 100644 --- a/tests/integration/teal/roundtrip/app_roundtrip_uint64[]_1_v8.teal +++ b/tests/integration/teal/roundtrip/app_roundtrip_uint64[]_1_v8.teal @@ -25,6 +25,11 @@ retsub arraycomplement_1: proto 1 1 byte "" +int 0 +dupn 3 +byte "" +dupn 1 +int 0 frame_dig -1 int 8 int 0 @@ -32,16 +37,16 @@ int 0 int 2 + extract_uint64 -store 8 -load 8 +frame_bury 1 +frame_dig 1 callsub numericalcomp_0 -store 8 +frame_bury 1 int 1 -store 9 -load 9 +frame_bury 7 +frame_dig 7 itob extract 6 0 -load 8 +frame_dig 1 itob concat frame_bury 0 @@ -51,64 +56,69 @@ retsub roundtripper_2: proto 1 1 byte "" +dupn 2 +int 0 +dupn 1 +byte "" +dupn 1 frame_dig -1 callsub arraycomplement_1 -store 2 -load 2 +frame_bury 1 +frame_dig 1 callsub arraycomplement_1 -store 3 +frame_bury 2 frame_dig -1 -store 7 -load 7 -store 6 +frame_bury 6 +frame_dig 6 +frame_bury 5 int 6 -store 4 -load 4 -load 7 +frame_bury 3 +frame_dig 3 +frame_dig 6 len + -store 5 -load 5 +frame_bury 4 +frame_dig 4 int 65536 < assert -load 4 +frame_dig 3 itob extract 6 0 -load 2 -store 7 -load 6 -load 7 +frame_dig 1 +frame_bury 6 +frame_dig 5 +frame_dig 6 concat -store 6 -load 5 -store 4 -load 4 -load 7 +frame_bury 5 +frame_dig 4 +frame_bury 3 +frame_dig 3 +frame_dig 6 len + -store 5 -load 5 +frame_bury 4 +frame_dig 4 int 65536 < assert -load 4 +frame_dig 3 itob extract 6 0 concat -load 3 -store 7 -load 6 -load 7 +frame_dig 2 +frame_bury 6 +frame_dig 5 +frame_dig 6 concat -store 6 -load 5 -store 4 -load 4 +frame_bury 5 +frame_dig 4 +frame_bury 3 +frame_dig 3 itob extract 6 0 concat -load 6 +frame_dig 5 concat frame_bury 0 retsub \ No newline at end of file diff --git a/tests/integration/teal/roundtrip/app_roundtrip_uint64[]_42_v8.teal b/tests/integration/teal/roundtrip/app_roundtrip_uint64[]_42_v8.teal index cf61ff80f..3ede8656c 100644 --- a/tests/integration/teal/roundtrip/app_roundtrip_uint64[]_42_v8.teal +++ b/tests/integration/teal/roundtrip/app_roundtrip_uint64[]_42_v8.teal @@ -25,6 +25,11 @@ retsub arraycomplement_1: proto 1 1 byte "" +int 0 +dupn 85 +byte "" +dupn 1 +int 0 frame_dig -1 int 8 int 0 @@ -32,7 +37,7 @@ int 0 int 2 + extract_uint64 -store 8 +frame_bury 1 frame_dig -1 int 8 int 1 @@ -40,7 +45,7 @@ int 1 int 2 + extract_uint64 -store 9 +frame_bury 2 frame_dig -1 int 8 int 2 @@ -48,7 +53,7 @@ int 2 int 2 + extract_uint64 -store 10 +frame_bury 3 frame_dig -1 int 8 int 3 @@ -56,7 +61,7 @@ int 3 int 2 + extract_uint64 -store 11 +frame_bury 4 frame_dig -1 int 8 int 4 @@ -64,7 +69,7 @@ int 4 int 2 + extract_uint64 -store 12 +frame_bury 5 frame_dig -1 int 8 int 5 @@ -72,7 +77,7 @@ int 5 int 2 + extract_uint64 -store 13 +frame_bury 6 frame_dig -1 int 8 int 6 @@ -80,7 +85,7 @@ int 6 int 2 + extract_uint64 -store 14 +frame_bury 7 frame_dig -1 int 8 int 7 @@ -88,7 +93,7 @@ int 7 int 2 + extract_uint64 -store 15 +frame_bury 8 frame_dig -1 int 8 int 8 @@ -96,7 +101,7 @@ int 8 int 2 + extract_uint64 -store 16 +frame_bury 9 frame_dig -1 int 8 int 9 @@ -104,7 +109,7 @@ int 9 int 2 + extract_uint64 -store 17 +frame_bury 10 frame_dig -1 int 8 int 10 @@ -112,7 +117,7 @@ int 10 int 2 + extract_uint64 -store 18 +frame_bury 11 frame_dig -1 int 8 int 11 @@ -120,7 +125,7 @@ int 11 int 2 + extract_uint64 -store 19 +frame_bury 12 frame_dig -1 int 8 int 12 @@ -128,7 +133,7 @@ int 12 int 2 + extract_uint64 -store 20 +frame_bury 13 frame_dig -1 int 8 int 13 @@ -136,7 +141,7 @@ int 13 int 2 + extract_uint64 -store 21 +frame_bury 14 frame_dig -1 int 8 int 14 @@ -144,7 +149,7 @@ int 14 int 2 + extract_uint64 -store 22 +frame_bury 15 frame_dig -1 int 8 int 15 @@ -152,7 +157,7 @@ int 15 int 2 + extract_uint64 -store 23 +frame_bury 16 frame_dig -1 int 8 int 16 @@ -160,7 +165,7 @@ int 16 int 2 + extract_uint64 -store 24 +frame_bury 17 frame_dig -1 int 8 int 17 @@ -168,7 +173,7 @@ int 17 int 2 + extract_uint64 -store 25 +frame_bury 18 frame_dig -1 int 8 int 18 @@ -176,7 +181,7 @@ int 18 int 2 + extract_uint64 -store 26 +frame_bury 19 frame_dig -1 int 8 int 19 @@ -184,7 +189,7 @@ int 19 int 2 + extract_uint64 -store 27 +frame_bury 20 frame_dig -1 int 8 int 20 @@ -192,7 +197,7 @@ int 20 int 2 + extract_uint64 -store 28 +frame_bury 21 frame_dig -1 int 8 int 21 @@ -200,7 +205,7 @@ int 21 int 2 + extract_uint64 -store 29 +frame_bury 22 frame_dig -1 int 8 int 22 @@ -208,7 +213,7 @@ int 22 int 2 + extract_uint64 -store 30 +frame_bury 23 frame_dig -1 int 8 int 23 @@ -216,7 +221,7 @@ int 23 int 2 + extract_uint64 -store 31 +frame_bury 24 frame_dig -1 int 8 int 24 @@ -224,7 +229,7 @@ int 24 int 2 + extract_uint64 -store 32 +frame_bury 25 frame_dig -1 int 8 int 25 @@ -232,7 +237,7 @@ int 25 int 2 + extract_uint64 -store 33 +frame_bury 26 frame_dig -1 int 8 int 26 @@ -240,7 +245,7 @@ int 26 int 2 + extract_uint64 -store 34 +frame_bury 27 frame_dig -1 int 8 int 27 @@ -248,7 +253,7 @@ int 27 int 2 + extract_uint64 -store 35 +frame_bury 28 frame_dig -1 int 8 int 28 @@ -256,7 +261,7 @@ int 28 int 2 + extract_uint64 -store 36 +frame_bury 29 frame_dig -1 int 8 int 29 @@ -264,7 +269,7 @@ int 29 int 2 + extract_uint64 -store 37 +frame_bury 30 frame_dig -1 int 8 int 30 @@ -272,7 +277,7 @@ int 30 int 2 + extract_uint64 -store 38 +frame_bury 31 frame_dig -1 int 8 int 31 @@ -280,7 +285,7 @@ int 31 int 2 + extract_uint64 -store 39 +frame_bury 32 frame_dig -1 int 8 int 32 @@ -288,7 +293,7 @@ int 32 int 2 + extract_uint64 -store 40 +frame_bury 33 frame_dig -1 int 8 int 33 @@ -296,7 +301,7 @@ int 33 int 2 + extract_uint64 -store 41 +frame_bury 34 frame_dig -1 int 8 int 34 @@ -304,7 +309,7 @@ int 34 int 2 + extract_uint64 -store 42 +frame_bury 35 frame_dig -1 int 8 int 35 @@ -312,7 +317,7 @@ int 35 int 2 + extract_uint64 -store 43 +frame_bury 36 frame_dig -1 int 8 int 36 @@ -320,7 +325,7 @@ int 36 int 2 + extract_uint64 -store 44 +frame_bury 37 frame_dig -1 int 8 int 37 @@ -328,7 +333,7 @@ int 37 int 2 + extract_uint64 -store 45 +frame_bury 38 frame_dig -1 int 8 int 38 @@ -336,7 +341,7 @@ int 38 int 2 + extract_uint64 -store 46 +frame_bury 39 frame_dig -1 int 8 int 39 @@ -344,7 +349,7 @@ int 39 int 2 + extract_uint64 -store 47 +frame_bury 40 frame_dig -1 int 8 int 40 @@ -352,7 +357,7 @@ int 40 int 2 + extract_uint64 -store 48 +frame_bury 41 frame_dig -1 int 8 int 41 @@ -360,261 +365,261 @@ int 41 int 2 + extract_uint64 -store 49 -load 8 +frame_bury 42 +frame_dig 1 callsub numericalcomp_0 -store 8 -load 9 +frame_bury 1 +frame_dig 2 callsub numericalcomp_0 -store 9 -load 10 +frame_bury 2 +frame_dig 3 callsub numericalcomp_0 -store 10 -load 11 +frame_bury 3 +frame_dig 4 callsub numericalcomp_0 -store 11 -load 12 +frame_bury 4 +frame_dig 5 callsub numericalcomp_0 -store 12 -load 13 +frame_bury 5 +frame_dig 6 callsub numericalcomp_0 -store 13 -load 14 +frame_bury 6 +frame_dig 7 callsub numericalcomp_0 -store 14 -load 15 +frame_bury 7 +frame_dig 8 callsub numericalcomp_0 -store 15 -load 16 +frame_bury 8 +frame_dig 9 callsub numericalcomp_0 -store 16 -load 17 +frame_bury 9 +frame_dig 10 callsub numericalcomp_0 -store 17 -load 18 +frame_bury 10 +frame_dig 11 callsub numericalcomp_0 -store 18 -load 19 +frame_bury 11 +frame_dig 12 callsub numericalcomp_0 -store 19 -load 20 +frame_bury 12 +frame_dig 13 callsub numericalcomp_0 -store 20 -load 21 +frame_bury 13 +frame_dig 14 callsub numericalcomp_0 -store 21 -load 22 +frame_bury 14 +frame_dig 15 callsub numericalcomp_0 -store 22 -load 23 +frame_bury 15 +frame_dig 16 callsub numericalcomp_0 -store 23 -load 24 +frame_bury 16 +frame_dig 17 callsub numericalcomp_0 -store 24 -load 25 +frame_bury 17 +frame_dig 18 callsub numericalcomp_0 -store 25 -load 26 +frame_bury 18 +frame_dig 19 callsub numericalcomp_0 -store 26 -load 27 +frame_bury 19 +frame_dig 20 callsub numericalcomp_0 -store 27 -load 28 +frame_bury 20 +frame_dig 21 callsub numericalcomp_0 -store 28 -load 29 +frame_bury 21 +frame_dig 22 callsub numericalcomp_0 -store 29 -load 30 +frame_bury 22 +frame_dig 23 callsub numericalcomp_0 -store 30 -load 31 +frame_bury 23 +frame_dig 24 callsub numericalcomp_0 -store 31 -load 32 +frame_bury 24 +frame_dig 25 callsub numericalcomp_0 -store 32 -load 33 +frame_bury 25 +frame_dig 26 callsub numericalcomp_0 -store 33 -load 34 +frame_bury 26 +frame_dig 27 callsub numericalcomp_0 -store 34 -load 35 +frame_bury 27 +frame_dig 28 callsub numericalcomp_0 -store 35 -load 36 +frame_bury 28 +frame_dig 29 callsub numericalcomp_0 -store 36 -load 37 +frame_bury 29 +frame_dig 30 callsub numericalcomp_0 -store 37 -load 38 +frame_bury 30 +frame_dig 31 callsub numericalcomp_0 -store 38 -load 39 +frame_bury 31 +frame_dig 32 callsub numericalcomp_0 -store 39 -load 40 +frame_bury 32 +frame_dig 33 callsub numericalcomp_0 -store 40 -load 41 +frame_bury 33 +frame_dig 34 callsub numericalcomp_0 -store 41 -load 42 +frame_bury 34 +frame_dig 35 callsub numericalcomp_0 -store 42 -load 43 +frame_bury 35 +frame_dig 36 callsub numericalcomp_0 -store 43 -load 44 +frame_bury 36 +frame_dig 37 callsub numericalcomp_0 -store 44 -load 45 +frame_bury 37 +frame_dig 38 callsub numericalcomp_0 -store 45 -load 46 +frame_bury 38 +frame_dig 39 callsub numericalcomp_0 -store 46 -load 47 +frame_bury 39 +frame_dig 40 callsub numericalcomp_0 -store 47 -load 48 +frame_bury 40 +frame_dig 41 callsub numericalcomp_0 -store 48 -load 49 +frame_bury 41 +frame_dig 42 callsub numericalcomp_0 -store 49 +frame_bury 42 int 42 -store 50 -load 50 +frame_bury 89 +frame_dig 89 itob extract 6 0 -load 8 +frame_dig 1 itob -load 9 +frame_dig 2 itob concat -load 10 +frame_dig 3 itob concat -load 11 +frame_dig 4 itob concat -load 12 +frame_dig 5 itob concat -load 13 +frame_dig 6 itob concat -load 14 +frame_dig 7 itob concat -load 15 +frame_dig 8 itob concat -load 16 +frame_dig 9 itob concat -load 17 +frame_dig 10 itob concat -load 18 +frame_dig 11 itob concat -load 19 +frame_dig 12 itob concat -load 20 +frame_dig 13 itob concat -load 21 +frame_dig 14 itob concat -load 22 +frame_dig 15 itob concat -load 23 +frame_dig 16 itob concat -load 24 +frame_dig 17 itob concat -load 25 +frame_dig 18 itob concat -load 26 +frame_dig 19 itob concat -load 27 +frame_dig 20 itob concat -load 28 +frame_dig 21 itob concat -load 29 +frame_dig 22 itob concat -load 30 +frame_dig 23 itob concat -load 31 +frame_dig 24 itob concat -load 32 +frame_dig 25 itob concat -load 33 +frame_dig 26 itob concat -load 34 +frame_dig 27 itob concat -load 35 +frame_dig 28 itob concat -load 36 +frame_dig 29 itob concat -load 37 +frame_dig 30 itob concat -load 38 +frame_dig 31 itob concat -load 39 +frame_dig 32 itob concat -load 40 +frame_dig 33 itob concat -load 41 +frame_dig 34 itob concat -load 42 +frame_dig 35 itob concat -load 43 +frame_dig 36 itob concat -load 44 +frame_dig 37 itob concat -load 45 +frame_dig 38 itob concat -load 46 +frame_dig 39 itob concat -load 47 +frame_dig 40 itob concat -load 48 +frame_dig 41 itob concat -load 49 +frame_dig 42 itob concat concat @@ -625,64 +630,69 @@ retsub roundtripper_2: proto 1 1 byte "" +dupn 2 +int 0 +dupn 1 +byte "" +dupn 1 frame_dig -1 callsub arraycomplement_1 -store 2 -load 2 +frame_bury 1 +frame_dig 1 callsub arraycomplement_1 -store 3 +frame_bury 2 frame_dig -1 -store 7 -load 7 -store 6 +frame_bury 6 +frame_dig 6 +frame_bury 5 int 6 -store 4 -load 4 -load 7 +frame_bury 3 +frame_dig 3 +frame_dig 6 len + -store 5 -load 5 +frame_bury 4 +frame_dig 4 int 65536 < assert -load 4 +frame_dig 3 itob extract 6 0 -load 2 -store 7 -load 6 -load 7 -concat -store 6 -load 5 -store 4 -load 4 -load 7 +frame_dig 1 +frame_bury 6 +frame_dig 5 +frame_dig 6 +concat +frame_bury 5 +frame_dig 4 +frame_bury 3 +frame_dig 3 +frame_dig 6 len + -store 5 -load 5 +frame_bury 4 +frame_dig 4 int 65536 < assert -load 4 +frame_dig 3 itob extract 6 0 concat -load 3 -store 7 -load 6 -load 7 +frame_dig 2 +frame_bury 6 +frame_dig 5 +frame_dig 6 concat -store 6 -load 5 -store 4 -load 4 +frame_bury 5 +frame_dig 4 +frame_bury 3 +frame_dig 3 itob extract 6 0 concat -load 6 +frame_dig 5 concat frame_bury 0 retsub \ No newline at end of file diff --git a/tests/integration/teal/roundtrip/app_roundtrip_uint64_v8.teal b/tests/integration/teal/roundtrip/app_roundtrip_uint64_v8.teal index ce11171f2..b3d7da786 100644 --- a/tests/integration/teal/roundtrip/app_roundtrip_uint64_v8.teal +++ b/tests/integration/teal/roundtrip/app_roundtrip_uint64_v8.teal @@ -26,18 +26,22 @@ retsub roundtripper_1: proto 1 1 byte "" +int 0 +dupn 3 +byte "" +dupn 1 frame_dig -1 callsub numericalcomp_0 -store 2 -load 2 +frame_bury 1 +frame_dig 1 callsub numericalcomp_0 -store 3 +frame_bury 2 frame_dig -1 itob -load 2 +frame_dig 1 itob concat -load 3 +frame_dig 2 itob concat frame_bury 0 diff --git a/tests/integration/teal/roundtrip/app_roundtrip_uint8_v8.teal b/tests/integration/teal/roundtrip/app_roundtrip_uint8_v8.teal index c7dfcc09f..09f91f0a7 100644 --- a/tests/integration/teal/roundtrip/app_roundtrip_uint8_v8.teal +++ b/tests/integration/teal/roundtrip/app_roundtrip_uint8_v8.teal @@ -31,24 +31,28 @@ retsub roundtripper_1: proto 1 1 byte "" +int 0 +dupn 3 +byte "" +dupn 1 frame_dig -1 callsub numericalcomp_0 -store 2 -load 2 +frame_bury 1 +frame_dig 1 callsub numericalcomp_0 -store 3 +frame_bury 2 byte 0x00 int 0 frame_dig -1 setbyte byte 0x00 int 0 -load 2 +frame_dig 1 setbyte concat byte 0x00 int 0 -load 3 +frame_dig 2 setbyte concat frame_bury 0