File tree Expand file tree Collapse file tree 11 files changed +52
-55
lines changed
tests/test_expected_output Expand file tree Collapse file tree 11 files changed +52
-55
lines changed File renamed without changes.
Original file line number Diff line number Diff line change 11from collections .abc import Iterator
22
33import attrs
4+
45from puya import log
56from puya .awst import (
67 nodes as awst_nodes ,
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change 11from puya .awst import nodes as awst_nodes
2-
3- from puyapy .awst_build .validation .arc4_copy import ARC4CopyValidator
4- from puyapy .awst_build .validation .base_invoker import BaseInvokerValidator
5- from puyapy .awst_build .validation .inner_transactions import (
2+ from puya .awst .validation .arc4_copy import ARC4CopyValidator
3+ from puya .awst .validation .base_invoker import BaseInvokerValidator
4+ from puya .awst .validation .inner_transactions import (
65 InnerTransactionsValidator ,
76 InnerTransactionUsedInALoopValidator ,
87 StaleInnerTransactionsValidator ,
98)
10- from puyapy . awst_build .validation .labels import LabelsValidator
11- from puyapy . awst_build .validation .scratch_slots import ScratchSlotReservationValidator
12- from puyapy . awst_build .validation .storage import StorageTypesValidator
9+ from puya . awst .validation .labels import LabelsValidator
10+ from puya . awst .validation .scratch_slots import ScratchSlotReservationValidator
11+ from puya . awst .validation .storage import StorageTypesValidator
1312
1413
1514def validate_awst (module : awst_nodes .AWST ) -> None :
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change 1010from puya .arc32 import create_arc32_json
1111from puya .artifact_sorter import ArtifactCompilationSorter
1212from puya .awst .nodes import AWST
13+ from puya .awst .validation .main import validate_awst
1314from puya .context import CompileContext
1415from puya .errors import CodeError , InternalError
1516from puya .ir .main import awst_to_ir , optimize_and_destructure_ir
@@ -52,6 +53,8 @@ def awst_to_teal(
5253 * ,
5354 write : bool = True ,
5455) -> list [CompilationArtifact ]:
56+ validate_awst (awst )
57+ log_ctx .exit_if_errors ()
5558 context = CompileContext (
5659 options = options ,
5760 compilation_set = compilation_set ,
Original file line number Diff line number Diff line change 2727 get_decorators_by_fullname ,
2828 get_unaliased_fullname ,
2929)
30- from puyapy .awst_build .validation .main import validate_awst
3130
3231logger = log .get_logger (__name__ )
3332
@@ -67,7 +66,6 @@ def convert(self) -> AWST:
6766 for deferred in deferrals :
6867 awst_node = deferred (self .context )
6968 awst .append (awst_node )
70- validate_awst (awst ) # TODO: move/split this to/with puya core
7169 return awst
7270
7371 # Supported Statements
You can’t perform that action at this time.
0 commit comments