Skip to content

Commit

Permalink
Revert "Pass-by-Ref / Dynamic Scratch Variables via the loads and `…
Browse files Browse the repository at this point in the history
…stores` opcodes (#198)"

This reverts commit cf95165.
  • Loading branch information
jasonpaulos committed Mar 7, 2022
1 parent b01f86e commit 51ec8c9
Show file tree
Hide file tree
Showing 23 changed files with 183 additions and 1,327 deletions.
250 changes: 124 additions & 126 deletions pyteal/__init__.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -17,158 +17,156 @@ from .errors import TealInternalError, TealTypeError, TealInputError, TealCompil
from .config import MAX_GROUP_SIZE, NUM_SLOTS

__all__ = [
"AccountParam",
"Add",
"Expr",
"LeafExpr",
"Addr",
"And",
"Bytes",
"Int",
"EnumInt",
"MethodSignature",
"Arg",
"TxnType",
"TxnField",
"TxnExpr",
"TxnaExpr",
"TxnArray",
"TxnObject",
"Txn",
"GtxnExpr",
"GtxnaExpr",
"TxnGroup",
"Gtxn",
"GeneratedID",
"ImportScratchValue",
"Global",
"GlobalField",
"App",
"AppField",
"OnComplete",
"AppParam",
"Approve",
"Arg",
"Array",
"Assert",
"AssetHolding",
"AssetParam",
"AccountParam",
"InnerTxnBuilder",
"InnerTxn",
"InnerTxnAction",
"Gitxn",
"GitxnExpr",
"GitxnaExpr",
"InnerTxnGroup",
"Array",
"Tmpl",
"Nonce",
"UnaryExpr",
"Btoi",
"Itob",
"Len",
"BitLen",
"Sha256",
"Sha512_256",
"Keccak256",
"Not",
"BitwiseNot",
"Sqrt",
"Pop",
"Balance",
"MinBalance",
"BinaryExpr",
"BitLen",
"Add",
"Minus",
"Mul",
"Div",
"Mod",
"Exp",
"Divw",
"BitwiseAnd",
"BitwiseNot",
"BitwiseOr",
"BitwiseXor",
"Break",
"Btoi",
"Bytes",
"ShiftLeft",
"ShiftRight",
"Eq",
"Neq",
"Lt",
"Le",
"Gt",
"Ge",
"GetBit",
"GetByte",
"Ed25519Verify",
"Substring",
"Extract",
"Suffix",
"SetBit",
"SetByte",
"NaryExpr",
"And",
"Or",
"Concat",
"WideRatio",
"If",
"Cond",
"Seq",
"Assert",
"Err",
"Return",
"Approve",
"Reject",
"Subroutine",
"SubroutineDefinition",
"SubroutineDeclaration",
"SubroutineCall",
"SubroutineFnWrapper",
"ScratchSlot",
"ScratchLoad",
"ScratchStore",
"ScratchStackStore",
"ScratchVar",
"MaybeValue",
"MultiValue",
"BytesAdd",
"BytesAnd",
"BytesDiv",
"BytesEq",
"BytesGe",
"BytesGt",
"BytesLe",
"BytesLt",
"BytesMinus",
"BytesMod",
"BytesDiv",
"BytesMul",
"BytesMod",
"BytesAnd",
"BytesOr",
"BytesXor",
"BytesEq",
"BytesNeq",
"BytesLt",
"BytesLe",
"BytesGt",
"BytesGe",
"BytesNot",
"BytesOr",
"BytesSqrt",
"BytesXor",
"BytesZero",
"CompileOptions",
"Concat",
"Cond",
"Continue",
"DEFAULT_TEAL_VERSION",
"Div",
"Divw",
"DynamicScratchVar",
"Ed25519Verify",
"EnumInt",
"Eq",
"Err",
"Exp",
"Expr",
"Extract",
"ExtractUint16",
"ExtractUint32",
"ExtractUint64",
"For",
"Ge",
"GeneratedID",
"GetBit",
"GetByte",
"Gitxn",
"GitxnExpr",
"GitxnaExpr",
"Global",
"GlobalField",
"Gt",
"Gtxn",
"GtxnExpr",
"GtxnaExpr",
"If",
"ImportScratchValue",
"InnerTxn",
"InnerTxnAction",
"InnerTxnBuilder",
"InnerTxnGroup",
"Int",
"Itob",
"Keccak256",
"LabelReference",
"Le",
"LeafExpr",
"Len",
"Log",
"Lt",
"MAX_GROUP_SIZE",
"MAX_TEAL_VERSION",
"MIN_TEAL_VERSION",
"MaybeValue",
"MethodSignature",
"MinBalance",
"Minus",
"Mod",
"Mode",
"Mul",
"MultiValue",
"NUM_SLOTS",
"NaryExpr",
"Neq",
"Nonce",
"Not",
"OnComplete",
"While",
"For",
"Break",
"Continue",
"Op",
"Or",
"Pop",
"Reject",
"Return",
"ScratchIndex",
"ScratchLoad",
"ScratchSlot",
"ScratchStackStore",
"ScratchStore",
"ScratchVar",
"Seq",
"SetBit",
"SetByte",
"Sha256",
"Sha512_256",
"ShiftLeft",
"ShiftRight",
"Sqrt",
"Subroutine",
"SubroutineCall",
"SubroutineDeclaration",
"SubroutineDefinition",
"SubroutineFnWrapper",
"Substring",
"Suffix",
"TealBlock",
"TealCompileError",
"Mode",
"TealComponent",
"TealConditionalBlock",
"TealInputError",
"TealInternalError",
"TealLabel",
"TealOp",
"TealLabel",
"TealBlock",
"TealSimpleBlock",
"TealConditionalBlock",
"LabelReference",
"MAX_TEAL_VERSION",
"MIN_TEAL_VERSION",
"DEFAULT_TEAL_VERSION",
"CompileOptions",
"compileTeal",
"TealType",
"TealInternalError",
"TealTypeError",
"Tmpl",
"Txn",
"TxnArray",
"TxnExpr",
"TxnField",
"TxnGroup",
"TxnObject",
"TxnType",
"TxnaExpr",
"UnaryExpr",
"While",
"WideRatio",
"compileTeal",
"TealInputError",
"TealCompileError",
"MAX_GROUP_SIZE",
"NUM_SLOTS",
]
16 changes: 4 additions & 12 deletions pyteal/ast/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -120,14 +120,8 @@


# misc
from .scratch import (
ScratchIndex,
ScratchLoad,
ScratchSlot,
ScratchStackStore,
ScratchStore,
)
from .scratchvar import DynamicScratchVar, ScratchVar
from .scratch import ScratchSlot, ScratchLoad, ScratchStore, ScratchStackStore
from .scratchvar import ScratchVar
from .maybe import MaybeValue
from .multi import MultiValue

Expand Down Expand Up @@ -231,12 +225,10 @@
"SubroutineDeclaration",
"SubroutineCall",
"SubroutineFnWrapper",
"ScratchIndex",
"ScratchLoad",
"ScratchSlot",
"ScratchStackStore",
"ScratchLoad",
"ScratchStore",
"DynamicScratchVar",
"ScratchStackStore",
"ScratchVar",
"MaybeValue",
"MultiValue",
Expand Down
6 changes: 5 additions & 1 deletion pyteal/ast/multi_test.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
from typing import List
import pytest

from .. import *
from typing import List

# this is not necessary but mypy complains if it's not included
from .. import CompileOptions

options = CompileOptions()

Expand Down
Loading

0 comments on commit 51ec8c9

Please sign in to comment.