Skip to content

Commit

Permalink
fix: Don't unnecessarilly pre-check uranges for forward iteration
Browse files Browse the repository at this point in the history
  • Loading branch information
tristanmenzel committed Jan 31, 2024
1 parent 6d549ed commit 066088c
Show file tree
Hide file tree
Showing 200 changed files with 26,542 additions and 30,565 deletions.
200 changes: 95 additions & 105 deletions examples/amm/puya.log

Large diffs are not rendered by default.

200 changes: 95 additions & 105 deletions examples/auction/puya.log

Large diffs are not rendered by default.

200 changes: 95 additions & 105 deletions examples/calculator/puya.log

Large diffs are not rendered by default.

200 changes: 95 additions & 105 deletions examples/global_state/puya.log

Large diffs are not rendered by default.

200 changes: 95 additions & 105 deletions examples/hello_world/puya.log

Large diffs are not rendered by default.

200 changes: 95 additions & 105 deletions examples/local_state/puya.log

Large diffs are not rendered by default.

20 changes: 10 additions & 10 deletions examples/sizes.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ application 163 163
arc4_types/array 622 487
arc4_types/bool 322 59
arc4_types/dynamic_string_array 249 167
arc4_types/mutation 2926 1861
arc4_types/mutation 2891 1826
arc4_types/numeric 353 214
arc4_types/string 344 305
arc4_types/structs 291 221
Expand All @@ -26,7 +26,7 @@ conditional_execution 380 344
conditional_expressions 228 182
contains 155 156
edverify 39 33
enumeration 633 586
enumeration 554 512
everything 467 457
global_state 319 315
hello_world 19 18
Expand All @@ -37,22 +37,22 @@ less_simple 93 87
local_state/local_state_contract 319 314
local_state/local_state_with_offsets 332 326
match 486 467
nested_loops 369 203
nested_loops 242 203
reversed_iteration 783 618
scratch_slots 78 63
scratch_slots/contract2 78 63
scratch_slots 66 63
scratch_slots/contract2 66 63
simple 51 4
simplish 741 725
ssa 267 212
ssa2 77 46
ssa 237 212
ssa2 51 46
string_ops 150 148
stubs/biguint 158 140
stubs/bytes 645 4
stubs/uint64 366 4
transaction 685 677
tuple_support 455 326
tuple_support 436 306
unary 129 92
undefined_phi_args/baddie 346 346
unssa 473 420
voting/voting 1646 1565
unssa 442 378
voting/voting 1610 1530
with_reentrancy 259 240
2 changes: 1 addition & 1 deletion examples/voting/out/application.json

Large diffs are not rendered by default.

666 changes: 320 additions & 346 deletions examples/voting/out/voting.approval.debug.teal

Large diffs are not rendered by default.

72 changes: 24 additions & 48 deletions examples/voting/out/voting.approval.teal
Original file line number Diff line number Diff line change
Expand Up @@ -341,7 +341,7 @@ close_for_header@1:
frame_dig 9
frame_dig 7
<
bz close_after_for@16
bz close_after_for@15

close_for_body@2:
frame_dig 8
Expand Down Expand Up @@ -377,52 +377,37 @@ close_after_if_else@4:
frame_bury 0
frame_dig 6
frame_bury 2
bz close_after_if_else@14
bz close_after_if_else@13

close_if_body@5:
frame_dig 5
byte "["
concat
dup
frame_bury 5
int 0
frame_dig 4
<
swap
frame_bury 0
frame_dig 6
frame_bury 2
bz close_after_for@13

close_for_preamble@6:
int 0
frame_bury 3

close_for_header@7:
close_for_header@6:
frame_dig 3
frame_dig 4
<
frame_dig 5
frame_bury 0
frame_dig 6
frame_bury 2
bz close_after_for@13
bz close_after_for@12

close_for_body@8:
close_for_body@7:
frame_dig 3
int 0
>
frame_dig 5
frame_bury 0
bz close_after_if_else@10
bz close_after_if_else@9

close_if_body@9:
close_if_body@8:
frame_dig 5
byte ","
concat
frame_bury 0

close_after_if_else@10:
close_after_if_else@9:
frame_dig 0
frame_dig 6
dup
Expand All @@ -438,17 +423,17 @@ close_after_if_else@10:
int 1
+
frame_bury 3
b close_for_header@7
b close_for_header@6

close_after_for@13:
frame_dig 2
frame_dig 0
close_after_for@12:
frame_dig 5
byte "]"
concat
frame_bury 0
frame_dig 6
frame_bury 2

close_after_if_else@14:
close_after_if_else@13:
frame_dig 0
frame_bury 5
frame_dig 2
Expand All @@ -459,7 +444,7 @@ close_after_if_else@14:
frame_bury 9
b close_for_header@1

close_after_for@16:
close_after_for@15:
frame_dig 5
byte "]}}"
concat
Expand Down Expand Up @@ -727,7 +712,6 @@ already_voted_block@0:
// examples.voting.voting.VotingRoundApp.vote(fund_min_bal_req#0: uint64, signature#0: bytes, answer_ids#0: bytes) -> void:
vote:
proto 3 0
byte ""

vote_block@0:
int 7700
Expand All @@ -752,7 +736,6 @@ vote_block@0:
frame_dig -1
int 0
extract_uint16
dig 1
==
assert // Number of answers incorrect
frame_dig -1
Expand All @@ -777,26 +760,19 @@ vote_block@0:
==
assert // Payment must be the exact min balance
int 0
swap
int 0
>
bz vote_after_for@6

vote_for_preamble@1:
int 0
frame_bury 0

vote_for_header@2:
vote_for_header@1:
frame_dig 2
frame_dig 0
frame_dig 1
<
bz vote_after_for@6
bz vote_after_for@5

vote_for_body@3:
vote_for_body@2:
frame_dig -1
int 0
extract_uint16
frame_dig 0
frame_dig 2
dup
cover 2
>
Expand Down Expand Up @@ -827,13 +803,13 @@ vote_for_body@3:
dig 1
<
assert // Answer option index invalid
frame_dig 2
frame_dig 1
dup
uncover 4
+
callsub increment_vote_in_box
+
frame_bury 2
frame_bury 1
txn Sender
frame_dig -1
box_put
Expand All @@ -848,10 +824,10 @@ vote_for_body@3:
app_global_put
int 1
+
frame_bury 0
b vote_for_header@2
frame_bury 2
b vote_for_header@1

vote_after_for@6:
vote_after_for@5:
retsub


Expand Down
Loading

0 comments on commit 066088c

Please sign in to comment.