-
raise an error when attempting to iterate a tuple of mutable values (
43a364e
)BREAKING CHANGE: iterating a tuple of mutable types will now raise an error as they cannot be copied
-
passing a mutable value more than once to a subroutine will now raise an error as allowing it would break semantic compatability (
dac51be
)BREAKING CHANGE: passing a mutable value more than once to a subroutine causes an error
-
raise an error when attempting to modify immutable arrays such as
algopy.arc4.Address
(9450c7a
)BREAKING CHANGE: modifying an
algopy.arc4.Address
will now raise an error
-
use extract3 instead of substring3 for bytes indexing (
4954155
) -
remove ops with no side effects when result is not used (
ea34059
) -
ARC-56 application specifications can now be output using the
--output-arc56
option (2d3eb49
) -
add
.copy()
to arc4.Tuple (fe7a0ea
) -
add support for AVM version 11 (
0c31697
) -
allow variable rebinding of mutable parameter values (
253168a
)
-
ensure expressions are only evaluated once (
359956c
) -
prevent errors trying to optimize dig 0 (
bf52c36
) -
improve error message when a self parameter is missing from a method declaration (
8153cfb
) -
use read location for variable source locations, rather than where the variable was last defined (
27e2659
) -
correctly determine if an
algopy.arc4.Struct
sub-class is immutable or not based onfrozen
class parameter and immutability of fields (0491d0b
)
- ensure paths are normalised in Puya source maps (
29224ef
)
-
add
_replace
implementation for named tuples, makealgopy.CompiledContract
andalgopy.CompiledLogicSig
named tuples (93a47f2
) -
reduce stack manipulations ops when subroutine/op results are directly assigned (
fbe6ebb
) -
add CLI option
--output_source_map
to produce debug information that can be used with the next release of AVM debugger (3009822
) -
add optimization to include constant blocks in TEAL output (
671677b
)
-
check target type for ARC4Decode (
9704011
) -
deprecate
--match-algod-bytecode
option as there is now no difference between algod and puya bytecode output (de0fd58
)
-
allow named tuples to be unpacked (
320efd2
) -
itxn arguments are now inferred correctly when using only a method name in
algopy.arc4.abi_call
(04fe6d7
)
- Round trip serialization of names property on WTuple (
dd7b679
)
- native tuples now supported as arguments and return value when using
algopy.arc4.abi_call
,algopy.arc4.arc4_create
oralgopy.arc4.arc4_update
(#324) (6dfd68b
)
-
assigning transaction result from algopy.arc4.abi_call containing other transactions no longer causes an error (
125e85e
) -
fixed incorrect typing of
algopy.arc4.abi_call
parametersglobal_num_uint
,global_num_bytes
,local_num_uint
,local_num_bytes
andextra_program_pages
(e464ca2
)
- fixed error when assigning result of an abi_call with inner transactions that return an ABI value (
e3ef7dd
)
- expand handling of literal expressions to allow combining them with binary boolean operators, and improve error messaging when handling of type unions in nested bool contexts (
b4e0c30
)
-
prevent error that occurs when removing a series of redundant Load and Store ops (
17778b8
) -
fix compilation error when a nested tuple is passed as a named argument (
d849496
)
-
algopy.arc4.abi_call
,algopy.arc4.arc4_create
andalgopy.arc4.arc4_update
now all support txn arguments (8133e1d
) -
add CLI option to serialize AWST to JSON (
66bf127
) -
optimize
int 0; return
->err
(3605cf4
) -
allow user to implement approval_program in ARC4Contract subclasses (
004450b
)
-
handle zero values for TemplateVar (
6087dc2
)boolean values are now also allowed as
True
orFalse
also incorrect values will no longer result in a critical error, but a CLI usage error instead
-
when accessing a member of
self
, use the source location of the access (2f827ab
) -
when there is exactly 15 arguments to an ABI function, the final argument should not be expected to be automatically tuple-packed (
04e15df
) -
calling
algopy.arc4.arc4_create
oralgopy.arc4.arc4_update
with a ARC4Contract type now works for abimethods that have a return type (99d6a24
) -
fix
super()
usage in multiple inheritance scenarios (21929cc
) -
allow
super().__init__()
calls that resolve toobject.__init__()
as no-ops, this is valid and can be useful in multiple inheritance scenarios (267f423
) -
abstract methods can still have implementations, which can be called via super (
9615467
) -
evaluate class bodies at module evaluation time, so that any referenced constants in e.g. decorators receive the correct value if it's later updated (
9aea78c
) -
resolve all base scratch slot reservations, not just direct bases (
f9521b5
)
- do not remove swap ops before
itxn_field
if it's immediates point to the same field (0e88cdb
)
-
handle utf-8 alias's when checking for encoding, addresses #300 (
90bf86f
) -
remove
slice
from__getitem__
inalgopy.arc4.DynamicArray
andalgopy.arc4.StaticArray
(c0049f1
)
- improve ARC4 array documentation (
251759f
)
-
handle
in
/not in
tests correctly for differing types that can still be considered equal (234c376
) -
do not error when using
algopy.arc4.abi_call
with a method selector string containing no arguments (74577c4
)
-
use correct return type for
algopy.op.gaid
(a5c57ef
)BREAKING CHANGE:
algop.op.gaid
return type has changed fromalgopy.Application
toalgopy.UInt64
as the return value could be the id of either an application or an asset. Any existing usages ofalgopy.op.gaid
will need to pass the result to eitheralgopy.Application
oralgopy.Asset
as appropriate
-
include
num_log
,log
,create_app
andcreated_asset
properties for group transactions (5359c4d
) -
as part of optimization, remove no-op subroutines (
5663a55
)
-
improved optimization when uint64 comparisons involve a boolean value (
a68ca06
) -
more aggressive optimization of
select
op involving constants or references to constants (8d59e2d
) -
optimise away
select
op when both values are the same (f8eb257
) -
optimise code size by converting conditional (ie ternary) expressions into
select
op when both values are simple variables / constants (b748976
) -
more aggressive optimization of the boolean condition argument to
setbit
(e9828b3
) -
support nested tuples (
fe270dc
)
-
correctly type the result of BigUInt bin ops at IR layer (
d8d92bd
) -
ensure non-zero UInt64 values that are explicitly converted to bool are handled correctly (issue #194) (
13929de
)
- fix link (
c53d1f7
)
-
remove requirement that the target variable of a for-loop with enumeration be a tuple unpacking (
5b994e3
) -
support for-else and while-else (
0959e2d
) -
include ARC-22 readonly flag in ARC-32 output (
6d325b9
) -
add support for compiling programs to AVM bytecode, and referencing those programs within other contracts. (
7d7a4fd
)
-
ensure conversion of UInt64 enum types to arc4 UIntN is handled correctly. (
70b49dc
) -
change total_num_byte_slice return type to UInt64 (
96b5165
) -
fix bug with iteration of single item tuples (
983f171
) -
fix a regression where
algopy.op
functions that accepted multiple literal types would fail to compile with all except one type (2cbf5df
) -
use UInt64 enum types as return types where appropriate in low-level ops stubs (
008c96a
) -
prevent internal errors when for-loop bodies always exit (#269) (
1b24cd7
)
-
corrected parsing of ARC4 ufixed types when provided via string literals in
algopy.arc4.abi_call
andalgopy.arc4.emit
(43ffe8e
) -
in the case of overlapping values in a Switch (ie Python match-case), mark subsequent cases as unreachable to prevent a critical error from occurring ("Attempted to add a (non-entry) block with no predecessors") (
f21efc1
)
-
clarify default behaviour of key_prefix in BoxMap (
786e9b5
)also fix existing invalid doc syntax for arguments
-
fix documentation of arc4.Tuple native property (
172934b
)
-
prevent assertion error when using dynamic key with storage proxy and assinging to self member (
351b51e
) -
add dynamic key types to stubs for LocalState and GlobalState (
0aade7a
)also add this use cases to tests
-
support comparisons between
arc4.Bool
andbool
(1787f06
) -
support a wider range of types for inner transaction application args (
28b5197
) -
support string literals in String.join argument (
0818d7d
) -
support constructing tuples via tuple(<expr>) where expr is a fixed size sequence (
529f12a
) -
support tuple equality comparisons with literal elements, support tuple repetition & concatenation, and support indexing/slicing literals that support it (
0c8a745
) -
allow conditional expressions involving literals when either interacting with an algopy type or being passed to an algopy function, where possible (
a047d92
)examples that are now possible: -
x = UInt64(12 if condition else 34)
-x += 45 if condition else 67
-op.addw(2**64-1 if condition else 0, x)
-
Box storage api (
c41ce5e
) -
handle cover/uncover rotation simplification edge case (
9ed7a60
)
-
bool evaluations that evaluate to constants are now treated as errors as they were either hiding a semantic compatability issue or were a sign of a mistake in the code. (
247d62d
) -
handle single item tuples correctly (
2026815
) -
add missing * to stubs, that EB was expecting (
4842719
) -
ensure tuple expressions are evaluated when converting to a bool (
9d556e6
) -
do not require ARC4 types to .copy() when being as arguments to an inner transaction (
601a385
) -
fix argument packing condition when using abi_call (
070d224
) -
fix UInt64 handling of construction from bool (
07cd6d9
) -
fix semantic issues with tuple comparisons of different length / types (
840118a
) -
fix semantic compatibility issue with comparisons involving tuple literals (
180d363
) -
support negative indexes on indexable types (
9213996
) -
fix bug in "untyped" itxn creation not being declared as allowing BytesBacked (
f5aeada
) -
fix encoding of bytes constants and allow String as sep value (
6e82f80
) -
handle eq for ufixed (
83b346b
) -
handle bool values (as subtype of int) when comparing against arc4 uintn (
74e065d
)fix: allow arc4.String comparison with String without going through constructor
refactoring convert_arc4_literal (wip)
-
fix bug with inner-transaction-containing tuple detection (
6ca2c45
) -
resolve issue when using native types with arguments and return values in abi_call (
604dddc
) -
allow usage of module constants in ARC4 method decorators (
d09f381
) -
fix bug with resolving super/direct base method invocation (
a0618cb
) -
improve error messages when typing.Any type is encountered (
c2cfaf5
) -
prevent critical error message when missing self param in declaration (
7ff2e17
) -
correct return type of String.join (
3df0b8b
) -
fix resolution of base class references across modules (
cf7c67f
) -
resolve potential semantic incompatibility with super() usage and differing kinds of attributes (methods vs data) (
f1f2bdd
)add bad super() usage test
-
ARC4 Bool decode now resolves to IRType.bool (
9b4e82d
)
-
resolve issues with reading and writing ARC4 types (
23f9bd2
)Reading and writing dynamic ARC4 types in an array Modifying ARC4 tuple items (#152) Require ARC4 struct initialisation to have unaliased values to maintain reference semantics
-
fix inner transaction validation to handle some cases that were accidentally missed (#233) (
cd42f02
)
- Add example of struct in a box (#243) (
b0530c1
)
-
fix incorrectly mapped transaction arguments
global_num_uint
andlocal_num_uint
inalgopy.arc4.abi_call
#232 (0c35caa
) -
resolve issue when using native types with arguments and return values in abi_call (
38a199a
) -
correct default value for fee in abi_call (
ac46f49
) -
fix IR return types of
b+
andb*
ops (0de49c1
) -
correct return type of String.join expression (
873460d
) -
corrected itxn field type definitions for
VotePK
,SelectionPK
andFreezeAssetFrozen
(5f59f15
) -
correctly handle
BigUInt
in ARC4 methods (354a4a2
) -
handle resolve reinterpret cast at the IR level with a temporary assignment if required (#219) (
4b1bff3
) -
do not match
dup2
op when performing constant stack shuffling (815e253
) -
remove type bound on
TemplateVar
allowing it to be used with all types. (4226e0f
)
- improve some stub type signatures & copy in transaction field notes from Algorand docs (#215) (
4f01df5
)
Accessing an array field of an inner transaction result after it may no longer be available (i.e. after another inner transaction submission) is now a compile error, to resolve this move the array field access before the statement that causes this.
Commit: 0915c5c
Using state proxies (GlobalState, LocalState) outside of an __init__
method may not give the behaviour expected, so prevent their usage in those scenarios.
Commit: d354d4e
The default fee for inner transactions is now 0 unless explicitly specified.
Commit: 519957f
- Allow wider range of algorand-python versions as long as no incompatible definitions are used. Instead of an error, a prominent warning is displayed if there is a potential mismatch. (
bf84501
) - Allow raw
select
op usage, since it's a very efficient way to do a ternary operator if greedy argument evaluation is acceptable (e91a157
) - Constant optimisation for
algopy.op.sqrt
andalgopy.op.bsqrt
(bb8f03b
) - Allow int literals with
algopy.op
functions that take aBigUInt
(currently justbsqrt
) (a8e14c3
) - Add missing constant folding optimization for b% (
9536d59
) - Add support for
bool
types in state proxies (e.g.GlobalState
) and remove generic type constraint. (c9a7224
) - Allow module constants to be used as
assert
statement messages (328ee55
)
- Add missing
asset_sender
field to inner transactions (fd6bba3
) - Treat unassigned & unsubmitted inner-transaction field-sets as a code error, not an internal error (
b86bfa6
) - Use return type of method signature as return type for an
abi_call
without an indexed type param (1318459
) - Fix issue #195 where certain state comparisons could fail to compile. (
b8efcc3
) - Add missing ARC4-copy-checks of
.get()
and.maybe()
methods in state proxies (49da224
) - Allow negative
arc4.Tuple
indexing (67ff876
) - Add missing stub indicators for unary
+
operator toBigUInt
andUInt64
(caa98dc
) - Improve error message with invalid
String()
comparisons (f340c86
) - Improve source location for
Asset(<int>)
(7c89ad7
) - Correct input value types for
algopy.op.setbit
(c8fda82
) - Handle
arc4.Address.native
(6dcb55d
) - References to unknown symbols are now correctly treated as code errors rather than fatal errors (
eb802d3
) - Fix unnecessary
.copy()
requirement when providing an ARC4 encoded initial value toGlobalState
(5a56041
) - Ensure ARC router generation works with minimal contracts that don't have any explicit abimethods (
936f378
) - Fix bug with failing to discard unassigned results from
algopy.op.*
functions (33d961a
) - Prevent multiline assert messages from breaking TEAL output (
4ea5ae6
) - Fix incorrect error message on unsupported class declaration (
8eb5a78
) - Add colorama as a dependency on Windows, this is required when using PowerShell (
0acb4b2
)
- Add note about method behaviour for accounts which have not opted in (
12282b9
) - Use best practices in ARC-4 examples of dealing with native types and letting the router do encode/decode, which generally saves at least one op. (
7504ed5
) - Simplify "Quick start" steps (
01a9f95
) - Adding missing install step to install algorand-python (
c08f753
) - Corrections & improvements to
BigUInt
type docs (7e20261
)
- include algorand-python 1.0.1 stubs (
ba2fe25
)
- added v1 documentation (#147) (
faf9995
)
-
enable major on zero (
64145c2
)BREAKING CHANGE: 1.0 release
- set --output-client=False by default (
438d815
)
-
search for python3 when attempting to locate python executable (
abf5c09
) -
use shutil.which to find python exe (
56e46c9
) -
set supported algopy version range correctly (
6c1a387
) -
better support for executing puyapy within a venv and outside a venv (
212201e
)
- update README.md (
1f39990
)
- prevent mypy error when stubs and puyapy are in the same venv (
91f6765
)
-
change abimethod/baremethod "create" parameter to
"allow" | "require" | "disallow"
instead of"allow" | True | False
(2ca4c67
)BREAKING CHANGE: Replace create=True with create="require" in abimethod/baremethod decorators, and replace create=False with create="disallow" in abimethod/baremethod decorators.
-
prevent reassignment of mutable parameters that are passed by reference (
a9c7600
)BREAKING CHANGE: Re-assigment to a parameter that is mutable is now disallowed.
-
Prevent iteration of arc4 containers with mutable items (
f857181
)BREAKING CHANGE: Direct iteration of arc4 containers with mutable items is no longer possible due to issues with the reference vs value semantics, instead use
for <index> in urange(<array>.length)
and access/update elements by index. -
rename stubs from puyapy to algopy (
31052e3
)BREAKING CHANGE: Any imports from
puyapy
should be replaced withalgopy
. -
to prevent file output collisions, the ARC32 JSON output is now always named according the class name (or name= override). Tests for output collision is also performed before final output. For consistency, the TEAL files are use this same prefix, rather than the module name. (
78d5a31
)Compilation stages and error checking have been refactored to maintain a higher degree of logical separation.
BREAKING CHANGE: Output files names have changed as per the above ARC32 output fix note.
-
separate stubs into their own wheel (#154) (
9c58ae5
) -
Allow mutable tuple items to be updated (
8ea6ed5
) -
warn if a Contract class is implicitly abstract (
4d6317f
)fixes #120
-
compare
arc4.Address
againstAccount
(3888220
) -
empty constructor for arc4 numeric types, defaults to zero (
c514753
) -
allow bytes literal with
BytesBacked.from_bytes
(d47be8c
)test: add test for Struct.from_bytes
-
empty constructor for BigUInt() defaults to zero (
c02079b
)chore: address minor TODO regarding source locations
-
empty constructor for UInt64() defaults to zero (
6f79b8a
)chore: address minor TODO regarding source locations
-
simplify more conditions when we're in a
select
context (7403e7b
) -
simplify more conditions when we're in a ConditionalBranch context (
80f0167
) -
simplify more conditions when we're in an assert context (
7f89b6c
) -
allow bytes optimizations to handle
addr
constants, and alsoglobal ZeroAddress
ops (a508274
) -
Allow empty constructors to default to "zero" values for Account, Asset, Application, and arc4.Address (
3ad9c18
)Also, generally establish feature parity between Account and arc4.Address constructors
-
Add a validation step to confirm ops used in an app or lsig are available for those respecitve modes (
8600d4e
)Also moved avm version check into a validator with the same pattern
-
add empty
arc4.Bool
constructor to mimicbool()
(6175b59
) -
remove
encode()
from ARC4 types, an ensure constructors take appropriate values. Ensure all ARC4 types havefrom_log
classmethod. Removedecode()
method and instead have anative
property that returns decoded values where appropriate (146748e
) -
Allow arc4 types to be used in native tuples in ABI methods (
0948d83
) -
add class options for declaring storage values used in ARC32 specifications (#123) (
5721f4a
) -
allow primitive String type to be used in arc4 methods (
23fa701
) -
add startswith, endswith, and join to String (
262c679
) -
add primitive UTF-8 String type (
14d35c6
) -
add support for emitting ARC-28 events (
aa4a651
) -
allow TEAL optimizer to handle dup/dupn ops when removing stack shuffling of constants, and collapse any repeated elements with a dup/dupn (
b48db43
) -
added
puyapy.arc4.call_abi
for typed contract to contract calls (#112) (3d42df3
) -
add optimization to propagate constants found in Phi nodes resolving to the same constant value (
1b2e504
) -
add is_opted_in method to Account type (#126) (
e21dc55
) -
allow
gtxn.Transaction
as an ABI argument (#127) (e31eda8
) -
add asset and application reference types to op module (#124) (
47741ab
)BREAKING CHANGE: op module now uses
Asset
andApplication
types in ops involving those types Asset.asset_id is now Aseet.id Application.application_id is now Application.id -
Template variables (
9d93fee
)refactoring template-var feature
-
pop/popn collapse optimisation (
0b90505
)refactor: make checking for ABI router only calls (in the context of implicit return elisions) more robust
refactor: other non-functional refactorings of the implicit return feature
test: ensure there's a multi-valued explicit return combined with implicit returns being tested
-
Allow slicing Bytes with UInt64. Code generation has also been improved for slicing, and a potential double-evaluation has been fixed. (
0f9dd79
) -
implement ordering comparisons for arc4.UIntN and arc4.BigUIntN types (
f83a397
) -
implement missing optimisations for self comparisons (
24ead20
) -
improved constant folding, particularly with ARC4 operations (
17216c4
) -
optimisation of extract_uint16/32/64 with constants (
bf00f0d
) -
allow optimisation to concat bytes with different encodings (
e3c6253
) -
allow itob of a constant to flow through further optimisations (
ea2ce28
) -
implement boolean evaluation of ARC4 types (
aaa32ad
) -
Local/GlobalState custom keys & descriptions (
e9d5084
)also:
- solve issue of requiring forward declaration of constants & types
- improve code generation for state access in some cases
scratch_slots
reservation fixes/improvements- address usage of non-utf8 file encodings
- various bug fixes, refactoring, and minor optimisation improvements
-
add version option to CLI (
44b5e7f
)
-
Improve coverage of arc4_copy validator (
b482ebe
) -
arc4.String() gets incorrectly inferred as native String wtype (
4b12156
) -
ensure all
index_multiple
methods have the same signature (0c93a47
) -
treat ARC4 Tuples with mutable elements as mutable overall (
7f7a4b6
) -
fix source location for function signatures (
14b9eb3
) -
use repr for literal validation errors (
2d0feee
) -
add some missing positional-only indicators to stubs, and relax typing.LiteralString to str, it's not really applicable for our use case (
f5031a5
) -
don't implicitly map [32]byte to Account in stubs (
668c2e0
) -
consistent usage of positional-only arguments in stubs (
547d62c
) -
produce error with incorrect arc4 numeric class usage based on bit-sizes (
4cb6bbc
) -
check for state exceeding known consensus parameters and warn (not an error in case the consensus parameters update before a new compiler release) (
d65b350
) -
allow references to module constants in StateTotals args (
550fbd3
)also replace magic "auto" string with just
StateTotals()
since the behaviour is the same.docs for this feature improved, and code simplified
-
Fix optimizer bug where differing behaviour of extract with & without immediates when length is zero was not accounted for (
6a8db34
) -
handle tuple return types in method signatures (
6d31a69
) -
don't inline control ops of Switch or GotoNth nodes if it would result in additional copies in destructured SSA (#130) (
189847d
) -
check for errors between each stage of compiler pipeline (
b860e5a
) -
no longer eliminate expressions outside of dominators in RCE optimization (#119) (
b6bfc0a
) -
Address unexpected Python behaviour in slicing, where end > start would panic instead of returning an empty byte slice (
52c1666
)
-
update ARCHITECTURE.md (
d52d4a6
) -
add
default=
keyword toGlobalState.get()
usage to make example clearer (61e9bef
) -
improve tictactoe example (
0eb2d00
) -
Add a tictactoe game to the example contracts (
e866809
) -
Add example merkletree contract (#122) (
fccb36e
)
-
rename some op code types to more closely reflect the underlying op code (#102) (
d6c1441
)BREAKING CHANGE: The following op code classes were renamed:
AppGlobals
->AppGlobal
AppLocals
->AppLocal
Transaction
->Txn
TransactionGroup
->GTxn
InnerTransaction
->ITxn
InnerTransactionGroup
->GITxn
CreateInnerTransaction
->ITxnCreate
-
Optimizer improvements & significantly reworked TEAL output (
c2f778a
)The annotated output of a TEAL file has been greatly improved. The format now shows the source lines and source code above the section of associated TEAL. Extraneous information that was intended for internal development purposes has been removed (available as a separate output now with --output-memory-ir). Multi-line statements are faithfully reproduced now, so for example if an assert spans multiple lines it will appear as such in the TEAL file. Additionally, any comments on the line or on preceding lines (up to a blank line or the previous statement) will also be preserved.
Optimizer improvements: Implemented repeated expression elimination. Optimize branching on a ! condition, by swapping the branches Eliminated unused pure intrinsic ops. Inline conditional branch to an err block into an assert true/false. Blocks ending in a TEAL switch or match op can now have ops other than b as a fallback, in particular with err this, together with the above change, eliminates almost all standalone err blocks. Added a TEAL optimization pass that runs between MIR and TEAL generation, this simplifies the optimizer and also allows for crossing more virtual stack op boundaries easily. Added almost all cases found by the O2 brute force TEAL replacement search as special cases at O1. Added multiple other new optimizations to the new final TEAL optimizer. Minor tweaking of ARC4 embedded subroutine dynamic_array_pop_fixed_size. Add locals coalescing strategy as an option that it's independent of the optimization level, given that there's not necessarily one best approach. Significantly improved the code generated when routing >15 ABI args by removing a temporary assignment, which allows the new Repeated Expression Elimination optimizer pass to do its thing.
BREAKING CHANGE: --output-cssa-ir and --output-parallel-copies-ir CLI options have been removed, and --output-final-ir is now --output-destructured-ir to better reflect its position in the compiler chain. The default debug level is now 1, and only one TEAL file will be emitted for each program. To get back the previous default behaviour of only outputting an unannotated teal file, pass -g0.
-
improve coalescing by performing before sequentialisation, thus reducing chances of interference (
a29fba9
) -
reduce number of iterations required by optimiser by enabling fixed point iteration within ControlOp simplifier optimisation step (
b7b27d3
) -
add simple pass to collapse constants repeated >= 2 times by using a dupn (
47d90d6
) -
add duplicate block elimination as a post-SSA optimisation, at -O2 or above since it can mess with debugging info quite a bit (
c13d8fe
) -
add API for creating and submitting inner transactions (#98) (
6b76183
) -
move ops into their own module (
7678a7e
)Global and Transaction op values that are constant for a transaction are now class attributes added
puyapy.log
that can log any primitive typeBREAKING CHANGE: many functions and classes under
puyapy
can now be found inpuyapy.op
. Values that are constant for a transaction in thepuyapy.op.Global
andpuyapy.op.Transaction
classes are now typed as final class vars -
fix generated class names that are acronyms (#91) (
bd3f222
)Allow OnCompleteAction use in ARC4 abimethod, baremethod decorators
BREAKING CHANGE: enum class names have changed
-
reduce number of iterations required in TEAL optimiser (
597b939
) -
reduce number of iterations required in RCE optimizer, and ensure dominator set is stable by sorting it (
2af7135
) -
if simplifying a control op by inlining a block then ensure successor phi arguments are also updated (
bdbdb11
)
- Added link to the version of voting contract the puya example is converted from so you can compare before vs after (
21fd5be
)
- prevent too many permutations during O2 stack optimizations (#85) (
4dcdd6a
)
-
add documentation for more stubs (#88) (
2668623
) -
add autogenerated API documentation (#87) (
6ca27aa
)
-
Check min_avm_version of intrinsic ops against target avm version for compiler (
2b3dea0
) -
update langspec to v10 (
be62082
) -
Optimise constant mod expressions and pre-check for div 0 errors (
24c5020
)
-
Use
Bytes
as the return type where the langspec lists[32]byte
instead ofAccount
(41bead7
) -
improve error output when parsing fails (
c3d8f25
) -
Don't unnecessarilly pre-check uranges for forward iteration (
066088c
) -
Don't raise on div 0 in optimizer as the operation might be pre-checked for != 0 in previous operations (
6d549ed
)
- make hello_world ARC example consistent with Puya template example (
f294371
)
- Add scratch space API (#56) (
ad09eb8
)
-
fix argument matching order for gtxn, gtxna, gtxnsa, gtxnas. (
6d10fef
)test: add test that exercises compilation + execution of the trickier overloads with literal vs non-literal args
-
correct intrinsic mapping for
RenamedOpCode
types, so that the correct overload gets chosen. This is particularly important for extract, where a 0 immediate for length (along with an immediate for start) behaves very differently to the stack based variant. There is still potential for confusion if the start parameter is a literal vs a constant UInt64, but this at least fixes the inability to get the correct result with the right set of args. (7bf88e3
)fix: prevent substitution of extract3 with extract if the length is zero, due to behaviour difference.
fix: improve performance of the string/dynamic array of fixed size concatenation subroutine
enhancement: add intrinsic simplifier for replace3 -> replace2 and args -> arg
-
fix potential bug when removing an empty entry block that had a goto which was not the next block (
11c6a3e
)also do empty block removal immediately, to prevent confusion and potentially reduce the number of optimization passes
-
Add slot range validation to range expressions which specify a step (
3ccd47f
)
- add initial structure for documentation (
719c015
)
-
Replace references to local and global storage with "app account state" and "app state" (
ad2b326
) -
Rename Local to LocalState and introduce GlobalState type to provide a similar abstraction over app global storage (
6c6ac97
)
- speed up codegen (#48) (
4c2ed03
)
-
validate_awst was not called as part of testing (
71e9fbc
)fix: application.json was not being updated by tests
-
UnusedRegisterCollector no longer visits a Phi's register, so it can be considered as a potential unused register (
8b0e91a
) -
IntrinsicSimplifier now visits source values on Assignment ops (
2da337e
) -
Enforce copying of arc4 mutable types when passing them around so that developers are not fooled by the illusion of reference imutability as arc4 encoded data is still a value type underneath (
c20e621
) -
don't use structlog private fields (
831bd68
) -
MyPy incorrectly inferring generic types from first init overload when using classmethod (
14aecde
) -
Explicitly disallow nested native tuples in abi methods (
8663945
)
- move subroutine elimination to IR stage (#44) (
d65c9b6
)
-
reduce unnecessary usages of VLA (
9b2cc85
) -
relax docstring-parser version constraint for now (
d15046d
) -
stack ops optimisation looping, including not running at all if -O0 (
b6eaaa6
)feat: reduce stack shuffling when there is a swap preceded by two load ops
-
remove support for non bool literals in match cases (
c4520fb
)mypy does not consider runtime equality when evaluating if a case can be reached, resulting in blocks not being fully analyzed when matching literals against equivalent puya primitives
-
allow using puyapy primitive types with match statements (
e669c04
) -
use PYTHONUTF8 in compile_all_examples.py to force windows to use utf8 when running puya (
b4ab579
)
-
log level display in CLI arguments (
9bfc4e1
) -
work around windows issue with outputting Phi symbol (#6) (
6baa9c3
)temporary work around for Windows issue with outputting ϕ symbol
-
use utf-8 encoding when running puya from compile_all_examples.py (
f760e5c
) -
Making compiler name more succinct (
34bfd04
) -
Resolving line endings issues on windows (
b382d5a
)
- Adding quick getting started instructions to README.md (
321fb5f
)