Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support constant valued defaults for @abimethod's #371

Draft
wants to merge 41 commits into
base: main
Choose a base branch
from

Conversation

achidlow
Copy link
Contributor

No description provided.

Copy link

github-actions bot commented Jan 10, 2025

Coverage

Coverage Report
FileStmtsMissCoverMissing
src/puya_lib
   arc4.py1261260%1–332
   bytes.py990%1–15
   util.py16160%1–33
src/puya
   __main__.py34340%1–57
   arc32.py83693%74, 115–122
   arc56.py85594%282, 285–287, 297
   artifact_sorter.py57296%32, 89
   compile.py218996%101–102, 170–171, 179, 277–279, 388, 436
   context.py56296%39, 75
   errors.py35877%40–42, 44–46, 50–51
   log.py2376274%26–29, 45–48, 82, 92–93, 98–105, 120–128, 150, 178, 186–187, 229–231, 234–236, 238, 251–260, 285, 291, 296, 365–366, 375, 403–405, 418–432
   main.py36360%1–49
   parse.py87594%31, 40, 50, 56, 87
   program_refs.py28293%45, 56
   utils.py2011891%50, 67–68, 77–78, 86–87, 177, 195–197, 204, 212, 226, 249, 251, 274, 309
src/puya/awst
   arc4_types.py42295%23, 49
   function_traverser.py292399%76, 372, 378
   nodes.py10404396%89, 93–96, 136, 140–143, 354, 550, 566, 600, 641, 670–671, 721, 748–749, 897, 919, 951, 977, 982, 1142, 1227, 1243, 1292, 1369, 1450, 1504, 1508, 1632, 1777, 1782, 1787, 1795, 1800, 1805, 1842–1843, 1853
   serialize.py681184%24, 84–89, 95–98
   to_code_visitor.py4321197%129, 240, 277, 323, 584–587, 617, 645, 649
   txn_fields.py98199%48
   wtypes.py3291895%173, 177–180, 194–195, 199, 229, 242, 253, 258–259, 293, 331, 345, 395, 518
src/puya/awst/validation
   arc4_copy.py113199%38
   base_invoker.py47491%55, 62, 72–76
   immutable.py31294%26, 34
   inner_transactions.py187199%161
   labels.py30873%25–27, 32, 36–41
   scratch_slots.py38489%18, 32, 47, 49
src/puya/ir
   _arc4_default_args.py991882%59–60, 84, 101, 114, 116, 118, 120, 122, 124, 127, 134, 146–149, 201–202, 211, 218
   contract_metadata.py198398%50, 185–189
   arc4_router.py186796%98, 161, 215, 297, 345, 417, 427
   avm_ops.py325199%46
   avm_ops_models.py50394%21, 30, 38
   context.py81594%67, 82, 85, 87, 96
   main.py1591094%99, 108–114, 124–130, 156
   models.py5112395%74, 182, 189, 337, 408–409, 414, 420–424, 437, 481, 510, 566, 608, 676, 725, 728, 816–817, 843, 923–925, 943
   ssa.py137398%51–52, 150
   to_text_visitor.py165299%144, 212
   types.py1011090%50, 57, 91–95, 116, 152, 157–159
   visitor.py1271588%145, 203, 224, 237, 240, 246, 249, 260, 263, 266, 269, 272, 275, 278, 281
   visitor_mutator.py89298%126–127
   vla.py72199%87
src/puya/ir/builder
   _utils.py136596%229–231, 293–300
   arc4.py5002196%175–180, 479, 482, 540–543, 815–816, 1062, 1086, 1167, 1174, 1210, 1258, 1268, 1323, 1368, 1387, 1407
   assignment.py94793%100, 115, 189, 208, 225–226, 271
   blocks.py140795%55, 92–96, 158, 166, 231
   bytes.py641478%13–45, 129
   callsub.py81594%32–33, 58, 108–109
   flow_control.py94199%55
   iteration.py198597%90–91, 106, 143, 205
   itxn.py3233789%139–140, 142, 156, 164–169, 197, 204, 226–227, 560, 579–597, 666, 670, 684, 693–706
   main.py5996889%261, 265, 270–289, 294–313, 368, 392, 413, 431–432, 434, 442, 484, 571–572, 684, 716, 729–730, 778, 803, 840–842, 853, 918, 1009, 1050, 1115, 1118, 1126, 1129, 1137, 1168, 1194, 1203, 1327, 1344, 1387–1397
   storage.py83298%101, 154
src/puya/ir/destructure
   coalesce_locals.py951980%113, 122–123, 126–129, 132–141, 153–156
   parcopy.py73297%81, 117
src/puya/ir/optimize
   _call_graph.py32197%42
   _utils.py14286%17–19
   collapse_blocks.py94199%68
   compiled_reference.py82594%54, 86, 167–172
   control_op_simplification.py851088%35–36, 80–109
   inlining.py2291195%33–42, 46, 53, 389, 393, 397, 407, 411
   inner_txn.py30293%36–37
   intrinsic_simplification.py6173095%467, 479, 507, 518–519, 587–588, 612, 681, 834–837, 889, 891, 901, 941, 964, 978, 1003, 1009, 1011, 1013, 1018, 1020, 1022, 1024, 1026, 1078–1079, 1086
src/puya/ir/validation
   _base.py30197%28
   compile_reference_validator.py20290%24, 30
   min_avm_version_validator.py15473%16–20
   op_run_mode_validator.py19574%19–29
src/puya/mir
   aligned_writer.py63297%21, 61
   builder.py1591392%77–79, 169, 271–272, 301, 304, 307, 310, 313, 316, 319
   models.py496898%121, 174, 177, 225, 269, 335, 352, 408
   output.py52198%20
   stack.py154199%90
src/puya/mir/stack_allocation
   f_stack.py86495%22, 57–66
   peephole.py44295%39, 41
   x_stack.py205399%32, 336–340
src/puya/teal
   builder.py160299%107, 139
   models.py446299%377, 438
src/puya/teal/optimize
   constant_block.py104496%63, 152, 189, 206
   constant_stack_shuffling.py90496%46–47, 69–70
   main.py140398%96, 170–171
   peephole.py127497%128, 162, 230, 251
   repeated_rotations.py51590%16, 52–55
   repeated_rotations_search.py90693%35, 41–42, 58, 68–69
src/puya/ussemble
   assemble.py174498%130, 198, 218, 262
   models.py25196%16
   op_spec_models.py22195%20
src/puyapy
   __main__.py641773%177, 189–203, 207
   client_gen.py1181191%62–63, 81–85, 89, 203, 210–211, 231
   compile.py1522286%61–70, 84, 166–167, 178, 185–186, 203–213, 223–225, 230, 246
   models.py101496%68, 80–82
   parse.py1801393%50–51, 87, 159–164, 168, 268, 272–273, 321, 333, 358
   template.py32875%10–11, 18–19, 27–28, 34, 37
   utils.py21576%16–17, 25–28
src/puyapy/awst_build
   arc4_client.py1042477%46–50, 58, 70, 76, 80, 109, 115–116, 122, 125, 128, 134, 137, 145, 148, 151, 154, 157, 160, 163, 166, 169, 172
   arc4_client_gen.py132894%30, 89–90, 100, 102, 117–118, 185
   arc4_utils.py3014884%47, 50–51, 53, 58–65, 82–86, 102, 104, 107–108, 131, 174–176, 185, 197–199, 225, 229, 240, 248, 252, 271, 278, 280, 294–295, 298–302, 307–308, 314–317, 325, 336, 348, 356, 458, 463, 482
   base_mypy_visitor.py1603876%77–83, 103, 112–125, 139, 141, 143, 156, 161, 166, 170, 174, 200, 204, 208, 217, 222, 226, 230, 235, 255, 260, 265, 270, 275, 280, 285, 290, 295, 300, 305, 310, 315
   context.py2174778%54, 57, 67–68, 86–87, 127, 187, 192, 198–202, 206, 209, 218, 220, 223–225, 227, 234, 236, 247–248, 253–255, 258, 273, 285–286, 298, 312, 315–327
   contract.py3223390%123, 175, 190–194, 234, 236, 240, 244, 252, 264, 266, 286, 342, 345, 357, 365, 368, 371, 374, 377, 380, 383, 386, 389, 392, 452–456, 505–509, 603–607, 679, 702
   intrinsic_models.py49198%55
   main.py36197%30
   module.py4315986%129, 151, 157–161, 176–177, 184, 193–194, 202–206, 228, 257, 277–278, 289, 311–314, 324–326, 332, 349–352, 365, 399, 406, 428–429, 452–457, 511–512, 540, 551, 554, 560, 566, 576, 582, 585, 597, 600, 623, 643, 648, 652, 661–665, 757, 765, 767
   pytypes.py5956090%88, 98–100, 105, 112, 117–119, 123–125, 152–153, 193, 211–217, 240, 260, 302, 340–342, 371, 437, 446, 465, 485, 507–508, 649–651, 665–666, 733–734, 838, 849–850, 899–900, 905, 958–959, 982–983, 1134–1135, 1159, 1187, 1223–1225, 1265, 1275–1276
   subroutine.py6315392%160, 167, 187–188, 277, 303–304, 322, 339, 364, 372, 383, 410–413, 525–526, 538, 541, 544, 547, 550, 597, 725, 736, 738, 747, 765, 773, 805, 811, 869–872, 878, 929, 934, 937–943, 1034, 1054, 1209, 1211–1212, 1230, 1232, 1242–1243, 1252–1253, 1257, 1279, 1283
   utils.py1812984%30, 47–51, 69, 104–105, 107, 151–152, 203, 211, 216, 229–233, 238–241, 250, 254, 262, 296, 310–313
src/puyapy/awst_build/eb
   _base.py1281886%52, 57–59, 64, 71, 76, 81–83, 142, 153, 183, 188, 193, 198, 209, 223–225
   _bytes_backed.py48296%30–31
   _expect.py1222183%25, 36, 85–88, 100–103, 106, 158–159, 217–220, 230–233
   _literals.py1452980%43, 72, 91, 120, 137, 151, 155, 159–165, 175–189, 194
   _type_registry.py40490%251–252, 264–265
   utils.py47394%28–30, 100
   array.py26965%23, 28–33, 43, 47
   biguint.py101694%56, 100, 139, 155–156, 158
   binary_bool_op.py105397%153, 161, 171
   bool.py55984%39–43, 59, 70, 83, 97
   bytes.py1681889%103–104, 131–132, 137–138, 144–145, 148, 156, 199, 234, 266, 270, 287–288, 303–304
   compiled.py70987%86–90, 127–131, 154
   conditional_literal.py1343475%98, 102, 162, 166–169, 178–180, 203–206, 215, 219, 223–226, 241–253, 262–263, 274–277
   contracts.py77890%55, 61, 63, 73, 99, 109, 111, 116
   dict.py27581%24, 32–34, 38
   ensure_budget.py31197%47
   interface.py91397%314–316, 320
   intrinsics.py97694%43, 62, 69, 82, 89, 160
   log.py43491%46–47, 52, 61
   logicsig.py15193%26
   none.py27196%38
   string.py1441391%72, 116–117, 136, 141, 184, 191, 195, 207, 281–283, 303
   struct.py16569%14–16, 25, 29
   subroutine.py801680%47, 51–54, 69, 72–79, 94, 102–103, 105–108, 113
   template_variables.py37295%30, 58
   tuple.py3391396%86, 134, 150, 240–241, 253, 346–347, 466, 535, 546–547, 610
   uint64.py108694%57, 118–119, 167–168, 200
   uint64_enums.py40295%41, 46
   unsigned_builtins.py1552286%74, 81, 105, 129, 133, 137, 141, 149, 153, 157, 161, 165, 175, 179, 185, 196, 202, 208, 247, 279, 291, 303
src/puyapy/awst_build/eb/arc4
   _base.py92397%185–188, 199
   _utils.py141795%119, 127, 138, 178–181, 252, 256
   abi_call.py3181994%115, 121, 142, 212, 225–226, 307, 319, 377, 400, 431, 450–451, 510, 546, 620, 705–706, 723
   address.py73297%57, 116
   bool.py58395%42, 87–88
   dynamic_array.py120992%56, 123–124, 145, 221, 241–242, 245–248
   dynamic_bytes.py68396%99–101
   emit.py34197%36
   static_array.py62198%44
   string.py98793%54–55, 103, 124, 129–132
   struct.py75199%49
   tuple.py931683%45–47, 70, 88–91, 94–95, 134–137, 142, 146–147, 157, 167
   ufixed.py70297%43, 102
src/puyapy/awst_build/eb/reference_types
   account.py79199%175
   application.py45198%40
   asset.py65198%48
src/puyapy/awst_build/eb/storage
   _common.py69396%107, 120–121
   _storage.py1082081%58, 66, 70, 74, 78, 82, 86, 90, 94, 104, 108, 112, 116, 122, 133, 139, 145, 157–159
   _value_proxy.py55787%38, 42, 50, 54, 91, 99, 103
   box_map.py147199%194
   global_state.py127695%104–105, 114–115, 164–165
   local_state.py1371192%99–100, 104, 151, 155, 159, 169, 173, 197, 254, 278
src/puyapy/awst_build/eb/transaction
   base.py39295%23, 43
   group.py53198%48
   inner.py48296%91–92
   inner_params.py77594%64, 74, 78, 138, 140
   itxn_args.py60198%72
TOTAL23781177993% 

Tests Skipped Failures Errors Time
845 2 💤 0 ❌ 0 🔥 4m 21s ⏱️

@achidlow achidlow force-pushed the abi-default-args branch 4 times, most recently from 3216fee to e3d9aa9 Compare January 17, 2025 09:12
@achidlow achidlow force-pushed the abi-default-args branch 6 times, most recently from 78ab454 to f835cb4 Compare January 24, 2025 08:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants