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

Contract defragmentation #328

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

Contract defragmentation #328

wants to merge 4 commits into from

Conversation

achidlow
Copy link
Contributor

No description provided.

Copy link

github-actions bot commented Oct 18, 2024

Coverage

Coverage Report
FileStmtsMissCoverMissing
src/puya_lib
   arc4.py1261260%1–332
   bytes.py990%1–15
   util.py16160%1–33
src/puya
   __main__.py30300%1–42
   arc32.py68297%77, 103
   artifact_sorter.py53198%84
   compile.py147895%89–90, 132–135, 155–158, 288, 309
   context.py31197%35
   errors.py35877%40–42, 44–46, 50–51
   log.py1994179%32–35, 69, 89, 108, 123–124, 166–168, 171–173, 175, 188–197, 219, 288–289, 298, 326–328, 341–355
   main.py36360%1–49
   parse.py87594%31, 40, 50, 56, 87
   utils.py1991990%50, 67–68, 77–78, 86–87, 171, 177, 195–197, 204, 212, 226, 249, 251, 274, 309
src/puya/awst
   function_traverser.py285399%76, 367, 373
   nodes.py9753996%99, 103–106, 146, 150–153, 351, 536, 552, 586, 627, 656–657, 707, 735–736, 885, 907, 939, 965, 970, 1125, 1210, 1226, 1275, 1348, 1419, 1473, 1477, 1730, 1735, 1740, 1748, 1753, 1758
   serialize.py64494%24, 95–97
   to_code_visitor.py423898%131, 242, 279, 329, 585, 610, 638, 642
   txn_fields.py98199%48
   wtypes.py3021595%169–172, 186–187, 191, 208, 246, 300, 314, 349, 358, 429, 474
src/puya/awst/validation
   base_invoker.py47491%55, 62, 72–76
   inner_transactions.py187199%160
   labels.py30873%25–27, 32, 36–41
   scratch_slots.py39490%19, 33, 48, 50
src/puya/ir
   arc4_router.py2831993%110, 173, 229, 307, 355, 426, 439, 497–498, 510, 515, 520, 525, 530, 535, 555–559, 699, 736
   avm_ops.py315199%46
   avm_ops_models.py48394%21, 30, 38
   context.py101892%68, 75, 78, 80, 118–119, 129, 135
   main.py2761296%74–80, 90–96, 122, 135, 163, 511
   models.py5292296%74, 182, 189, 338, 408–409, 414, 420–424, 437, 481, 510, 566, 612, 692, 708, 749, 752, 759, 762, 851–852
   ssa.py130596%51–52, 150, 212, 223
   to_text_visitor.py152795%123, 212, 219–224
   types_.py1011090%50, 57, 91–95, 116, 152, 157–159
   visitor.py1291787%145, 193, 205, 220, 223, 236, 239, 245, 248, 259, 262, 265, 268, 271, 274, 277, 280
   visitor_mutator.py105298%174–175
   vla.py72199%87
src/puya/ir/builder
   _utils.py58395%175–177
   arc4.py5292595%103, 164–169, 448, 473, 476, 534–537, 802–803, 1049, 1073, 1154, 1161, 1197, 1245, 1255, 1310, 1355, 1374, 1394, 1455–1462
   assignment.py83693%51, 98, 112, 188, 206, 222
   blocks.py140795%55, 92–96, 158, 166, 231
   bytes.py641478%13–45, 129
   callsub.py77594%30–31, 51, 101–102
   flow_control.py95199%56
   iteration.py198597%91–92, 107, 144, 206
   itxn.py3193390%139–140, 142, 156, 164–169, 197, 204, 226–227, 559, 578–588, 657, 661, 675, 684–693
   main.py5326588%102, 240, 244, 249–267, 272–290, 345, 369, 393–394, 432, 620, 642, 655–656, 712, 737, 774–776, 787, 852, 930, 943, 975, 1030, 1033, 1041, 1044, 1052, 1081, 1092, 1101, 1180, 1197, 1240–1250
   storage.py83298%101, 154
src/puya/ir/destructure
   coalesce_locals.py1011981%119, 128–129, 132–135, 138–147, 163–166
   parcopy.py84298%47, 83
src/puya/ir/optimize
   collapse_blocks.py92595%65–69
   compiled_reference.py79594%53, 87, 158–163
   control_op_simplification.py104793%47–48, 171, 245–252
   inner_txn.py36197%38
   intrinsic_simplification.py4833194%76, 166–168, 173, 255, 267, 302, 313–314, 338–339, 363, 430, 617, 619, 634, 674, 697, 727, 733, 735, 737, 742, 744, 746, 748, 750, 802–803, 810
   main.py87298%116–117
src/puya/ir/validation
   _base.py29197%24
   compile_reference_validator.py20290%24, 30
   min_avm_version_validator.py11191%15
   op_run_mode_validator.py19574%19–29
src/puya/mir
   annotaters.py159299%62, 212
   builder.py1401093%139, 248–249, 302, 305, 308, 311, 314, 317, 320
   models.py3281595%40, 52, 68, 77, 88, 99, 110, 260, 291, 328, 340, 365–371
   output.py63297%29, 33
   stack.py2501992%72, 119, 135, 146, 157, 167, 184, 201, 211, 230, 250, 256, 258, 297, 310, 334, 366, 371, 409
src/puya/mir/stack_allocation
   baileys.py205399%31, 330–334
   frame_allocation.py80298%21, 68
   koopmans.py61198%55
   peephole.py100595%75, 89, 103, 105, 149
src/puya/teal/optimize
   peephole.py112298%139, 145
   repeated_rotations.py42198%13
   repeated_rotations_search.py88693%34, 40–41, 57, 67–68
src/puya/ussemble
   build.py731086%37, 52–53, 58–61, 65–68, 85–86, 115
   op_spec_models.py22195%20
   optimize.py76199%77
   output.py115199%71
   validate.py17194%19
src/puyapy
   __main__.py581672%163–177, 181
   client_gen.py1161587%56–57, 66–70, 74, 166–167, 175–176, 191, 195–196, 205
   compile.py1502285%59–68, 82, 162–163, 174, 181–182, 199–209, 219–221, 226, 242
   models.py130497%115, 127–129
   parse.py1801393%49–50, 86, 158–163, 167, 265, 269–270, 317, 329, 354
   template.py32875%10–11, 18–19, 27–28, 34, 37
   utils.py21576%16–17, 25–28
src/puyapy/awst_build
   arc4_client.py1052675%48–52, 60, 72, 78, 82, 119, 125–126, 132, 135, 138, 144, 147, 150–155, 158, 161, 164, 167, 170, 173, 176, 179, 182
   arc4_utils.py2794285%42, 45–46, 48, 78, 89–93, 109, 111, 114–115, 138, 181–183, 192, 197, 202–203, 233, 237, 249, 256, 258, 272–273, 276–280, 285–286, 292–295, 303, 321, 333, 341, 442, 447, 466
   arc32_client_gen.py68297%34, 130
   base_mypy_visitor.py1273969%70–76, 94, 102–115, 129, 131, 133, 145, 150, 154, 157, 160, 166, 188, 191, 194, 201, 205, 208, 211, 215, 233, 237, 241, 245, 249, 253, 257, 261, 265, 269, 273, 277, 281
   context.py2164679%55, 58, 68–69, 87–88, 128, 188, 193, 199–203, 208, 217, 219, 222–224, 226, 233, 235, 246–247, 252–254, 257, 272, 284–285, 297, 311, 314–326
   contract.py3023289%128, 179, 233–237, 284, 286, 290, 294, 303, 311, 313, 333, 386, 389, 401, 409, 412, 415, 418, 421, 424, 427, 430, 433, 436, 497–501, 550–554, 591–595, 672
   intrinsic_models.py40198%49
   main.py36197%31
   module.py3975786%116, 130–132, 147–148, 155, 164–165, 173–177, 195–199, 209, 247–248, 259, 281–284, 294–296, 302, 319–322, 335, 369, 376, 398–399, 422–427, 481–482, 510, 521, 524, 530, 536, 546, 552, 555, 567, 570, 592, 612, 617, 621, 625–628, 646, 689, 697, 699
   pytypes.py5175290%85–87, 101–102, 142, 158–164, 187, 207, 314, 323, 342, 361, 365, 381–382, 421, 514–516, 530–531, 600–601, 731, 742–743, 788–789, 794, 843–844, 865–866, 995–996, 1020, 1048, 1082–1084, 1110, 1137, 1147–1148, 1184–1186
   subroutine.py6035291%134, 249, 255, 313–316, 322, 374, 381, 384–390, 488, 643, 645–646, 664, 666, 676–677, 686–687, 691, 712, 788, 795, 815–816, 898, 924–925, 942, 958, 982, 990, 1001, 1026, 1131–1132, 1152, 1162, 1164, 1173, 1188, 1196, 1210, 1213, 1216, 1219, 1222, 1242–1244
   utils.py1742586%30, 47–51, 69, 104–105, 107, 151–152, 203, 211, 216, 229–233, 238–241, 250, 254, 262, 305
src/puyapy/awst_build/eb
   _base.py1311985%53, 58–60, 65, 72, 77, 82–84, 143, 154, 184, 189, 194, 199, 210, 225, 230–232
   _bytes_backed.py48296%30–31
   _expect.py1222183%26, 37, 87–90, 102–105, 108, 160–161, 219–222, 232–235
   _literals.py1442980%44, 73, 92, 121, 138, 152, 156, 160–166, 176–190, 195
   _type_registry.py40490%250–251, 263–264
   utils.py47394%29–31, 100
   array.py26965%23, 28–33, 43, 49
   biguint.py96694%56, 98, 135, 150–151, 153
   binary_bool_op.py104397%152, 160, 170
   bool.py56984%39–43, 59, 70, 85, 99
   bytes.py1681889%103–104, 131–132, 137–138, 144–145, 148, 156, 199, 234, 266, 270, 287–288, 303–304
   compiled.py1121388%56, 61, 67–68, 165–169, 206–210, 233
   conditional_literal.py1293176%100, 104, 164, 168–171, 180–182, 205–208, 217, 221, 225–228, 243–255, 264–265
   contracts.py76791%53, 59, 61, 102, 113, 117, 124
   dict.py27581%25, 33–35, 39
   ensure_budget.py31197%47
   interface.py90397%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, 140, 183, 190, 194, 206, 280–282, 302
   struct.py16569%14–16, 25, 31
   subroutine.py801680%46, 50–53, 68, 71–78, 93, 101–102, 104–107, 112
   template_variables.py37295%30, 58
   tuple.py2871395%75, 147, 153, 188–189, 201, 278–279, 398, 426, 437–438, 501
   uint64.py110595%57, 118–119, 167–168
   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.py91397%186–189, 200
   _utils.py1461093%97–98, 127, 132, 145, 185–188, 247, 251, 265
   abi_call.py3201994%123, 129, 154, 224, 241–242, 323, 340, 398, 426, 457, 481–482, 540, 577, 649, 734–735, 752
   address.py77396%57, 117–118
   bool.py57395%44, 86–87
   dynamic_array.py1271092%57, 126–127, 147, 149, 154, 228, 249, 255–258
   dynamic_bytes.py68396%97–99
   emit.py36197%38
   static_array.py66198%45
   string.py100793%54–55, 103, 126, 131–134
   struct.py49198%49
   tuple.py961683%50–52, 77, 96–99, 102–103, 139–142, 147, 151–152, 162, 172
   ufixed.py70297%43, 102
src/puyapy/awst_build/eb/reference_types
   account.py81298%65, 176
   application.py45198%40
   asset.py65198%48
src/puyapy/awst_build/eb/storage
   _common.py69396%107, 122–123
   _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.py148199%195
   global_state.py125596%104–105, 111, 163–164
   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.py58198%51
   inner.py49296%89–90
   inner_params.py81594%69, 79, 83, 143, 145
   itxn_args.py60198%72
TOTAL21635169792% 

Tests Skipped Failures Errors Time
1280 2 💤 0 ❌ 0 🔥 7m 29s ⏱️

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.

1 participant