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

docs: add code re-use documentation (WIP) #168

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

Conversation

daniel-makerx
Copy link
Contributor

No description provided.

Copy link

github-actions bot commented Mar 28, 2024

Coverage

Coverage Report
FileStmtsMissCoverMissing
src/puya
   __main__.py31197%116
   arc4_util.py104892%30, 78–79, 93, 105, 107, 145, 164
   arc32.py125398%108, 119, 222
   client_gen.py1061060%1–194
   compile.py2002190%132, 146–149, 166–167, 176–177, 188, 195–196, 213–223, 230–232, 237, 308–309
   context.py40198%48
   errors.py512061%14–16, 45, 50–60, 72–78
   log.py2103185%18–20, 36–39, 72, 74, 92, 111, 164–166, 169–171, 173, 186–195, 217, 287–289, 298–299, 333, 350
   models.py101397%10–13
   options.py30293%12–13
   parse.py2291793%25, 96, 108, 135, 175, 229, 276, 286, 288, 292, 320–325, 329, 427–428, 431
   utils.py1652485%12, 52, 56, 90, 96, 111, 114–116, 123, 145, 158–159, 163, 167–170, 199, 201, 224, 236, 241, 246, 257
src/puya/awst
   function_traverser.py190398%116, 146–147
   nodes.py9276993%18–27, 43, 52, 86, 92, 96–99, 133, 139, 143–146, 280, 524, 727–728, 748, 760, 798, 804–805, 835, 861, 865–869, 881, 937, 979–980, 985, 1000, 1051, 1056, 1114, 1139, 1156, 1304, 1352, 1357–1358, 1365–1370, 1412, 1495, 1543, 1552, 1580, 1587, 1600, 1642, 1684, 1695, 1697, 1702, 1710, 1715, 1720, 1729, 1734, 1739, 1746
   to_code_visitor.py3251296%83–84, 87–90, 114–115, 196, 331–332, 426–427, 498
   visitors.py2237367%7, 15, 19, 23, 27, 31, 35, 39, 43, 47, 53, 59, 65, 69, 73, 77, 83, 87, 91, 95, 99, 103, 109, 113, 117, 121, 125, 129, 133, 137, 141, 147, 151, 155, 161, 167, 171, 177, 181, 185, 189, 193, 197, 201, 205, 209, 213, 217, 221, 225, 229, 233, 239, 242, 245, 251, 257, 261, 265, 269, 273, 277, 281, 285, 289, 293, 297, 301, 305, 309, 313, 317, 321
   wtypes.py3013389%21, 185–196, 211–214, 231, 233, 278, 282, 312, 315, 317, 320, 345, 364, 400, 403, 452–453, 462–463, 471–472, 486, 545, 557, 573
src/puya/awst_build
   arc4_utils.py1513775%50, 52, 55, 67, 94–95, 110, 114, 117, 123, 126, 129, 132, 138, 140, 148, 151, 154–166, 169, 178, 181, 264, 336, 343, 346
   base_mypy_visitor.py1394667%39, 59, 71–77, 95, 103–116, 130, 132, 134, 143, 147, 152, 156, 159, 162, 168, 183, 189, 194, 197, 200, 207, 211, 214, 217, 221, 226, 232, 239, 243, 247, 251, 255, 259, 263, 267, 271, 275, 279, 283, 287
   context.py1492285%62–63, 139–144, 152, 154–158, 161–162, 182, 187, 191, 204, 216–217
   contract.py2265874%130–131, 133–136, 144–145, 148, 160, 171, 193, 211, 217, 219, 228, 238, 247, 275, 279, 295–299, 307–308, 313, 316, 319, 322, 327–328, 331, 339, 342, 345, 348, 351, 354, 357, 360, 363, 377, 391–398, 407–414, 421–422, 445, 455–456, 463, 469, 491–497
   intrinsic_factory.py33294%10, 83
   intrinsic_models.py32584%21, 26–29
   main.py48394%31, 48, 58
   module.py4028180%75, 143, 157–159, 173–174, 181, 189, 195, 201–205, 210, 222, 246–247, 258, 288, 314–315, 338, 345, 367–368, 391–396, 450–451, 462, 479, 490, 493, 499, 507, 512, 518, 530, 533, 555, 576, 582, 591–594, 612–647, 671, 679–680, 694–696, 698, 700–701, 726, 734, 736
   subroutine.py6177089%214, 225, 273, 279, 347, 351, 365, 373, 406–407, 547–562, 570, 578, 590, 622–623, 628, 633, 670, 690–691, 717–723, 776–777, 782, 798, 801, 804, 812–818, 872, 876–877, 881–882, 898, 900, 903–905, 930–931, 939, 975, 1017, 1045, 1049, 1080, 1153, 1181, 1188, 1198, 1209–1213, 1222, 1225, 1228, 1231, 1234, 1239, 1244, 1251, 1258
   utils.py1641790%40, 77, 92, 95–96, 100, 140, 143–144, 161, 175, 188, 195, 233, 254, 307–308
src/puya/awst_build/eb
   _utils.py21290%13–14
   app_account_state.py1282878%51–54, 62, 78, 80, 112–113, 134–141, 162–163, 168, 175–176, 178, 195–196, 203–204, 233, 238–239
   app_state.py1232679%35–40, 51–58, 79–80, 85, 95–96, 101, 118–119, 126–127, 168–169, 192, 210
   array.py684534%26–27, 30–32, 37–44, 56–72, 77–79, 82, 85–88, 93–95, 100–102, 111–123
   base.py2136072%25–32, 104, 108, 112, 118, 128, 134–139, 150–156, 161–167, 175, 181, 191, 201, 205, 211, 225, 230, 235, 238, 241, 244, 249, 252, 274, 295, 298, 303, 306, 309, 312, 315, 320, 323, 334, 347, 357, 360, 373, 394, 399, 408, 411, 415, 422, 425, 428, 433, 438, 449
   biguint.py912276%35–39, 62–63, 78, 93, 103–106, 128–131, 148–153, 170–178, 181–182
   bool.py40685%27–31, 53–54, 72
   bytes.py1411987%55–59, 81–82, 93–94, 114–115, 119, 123, 128, 130–131, 151, 173, 287–288, 317
   bytes_backed.py30487%37–38, 50–51
   contracts.py44295%57, 61
   ensure_budget.py481569%25–29, 49–50, 70–71, 79, 91, 97–102
   intrinsics.py1564174%31–33, 54–55, 63–64, 70–71, 88–89, 96, 125, 134, 136–160, 167–168, 212, 233–234, 253–254, 266, 271, 278, 281
   log.py52983%25–29, 79–85, 95, 97
   named_int_constants.py20290%23–24
   string.py1191587%41–45, 66–67, 85–86, 99–100, 127–128, 180, 238–239, 254
   struct.py321553%21–22, 25, 35–41, 46–48, 51–56
   subroutine.py51590%48, 63, 89, 92, 107
   template_variables.py471079%25–26, 59–60, 64, 69, 72–73, 82–83
   tuple.py982080%38–39, 46, 57, 59–60, 82–83, 92–93, 106, 112, 130–131, 136–137, 149, 157, 165, 197
   type_registry.py28293%150–151
   uint64.py811581%37–41, 62–63, 85, 103, 126, 145–148, 162–170, 173–174
   unsigned_builtins.py701184%30–34, 51, 58, 92, 95–96, 126, 129–130
   value_proxy.py391269%24, 27, 30, 33, 36, 41, 56, 66, 75, 84, 87, 90
src/puya/awst_build/eb/arc4
   utils.py1602187%25–28, 60–61, 63, 66–67, 89–90, 120, 125–126, 165, 200, 206, 211–213, 257, 262
   abi_call.py1672386%51–54, 109, 118–119, 137–138, 142–143, 182, 194, 212–213, 275–281, 310–311, 372, 375, 377
   arrays.py2423088%63–67, 80–81, 108, 138, 158–159, 194, 196, 229, 260, 276–277, 290, 339–340, 393–394, 416, 426–427, 443, 472, 491–492, 500, 546, 583
   base.py1042378%35–39, 67–68, 73–74, 83–91, 146–147, 167, 176–177, 194–195, 205, 215, 220
   bool.py31681%18–25, 46–47
   dynamic_bytes.py42588%15–19, 60–61
   emit.py33779%26–30, 55–56, 64–65
   numeric.py1251786%30–34, 46, 73, 80–81, 88, 111, 141–142, 148, 154, 210–213
   string.py661183%32–36, 58, 87, 106–107, 132–133, 151–152
   struct.py58886%25–32, 67, 70, 105–106
   tuple.py831780%28–32, 47, 51–52, 81, 90, 101, 110, 123, 127–128, 155–156, 165–166
src/puya/awst_build/eb/reference_types
   account.py69691%37–41, 88–89, 130
   application.py33779%15–19, 38–41
   asset.py53983%26–30, 49–52, 89–90
   base.py44491%25–27, 61, 87
src/puya/awst_build/eb/transaction
   base.py35877%17–18, 26, 30, 35–36, 43, 52
   group.py571574%33–37, 87–88, 141–154
   inner.py56886%27–32, 64–65, 115, 142
   inner_params.py1041189%31–35, 43–44, 54, 110, 145, 169, 185, 217
src/puya/awst_build/validation
   base_invoker.py29583%31, 38, 47–52
   inner_transactions.py94298%112, 126
   scratch_slots.py39490%19, 33, 49, 51
src/puya/ir
   arc4_router.py2462092%131, 149, 157, 307, 381, 427, 491–492, 506, 546–547, 559, 564, 569, 574, 579, 584, 604–609
   avm_ops.py316299%46–47
   avm_ops_models.py48394%21, 30, 38
   context.py921287%19, 72–73, 75, 93–99, 104, 115, 122, 132
   main.py221697%138, 141, 307, 309, 414, 425
   models.py4702694%29, 45, 63, 79, 186, 196, 200, 374, 448, 490, 570, 586, 627, 630, 637, 640, 696, 705, 713, 719, 730–732, 742, 754, 791
   ssa.py136993%43, 51–52, 99, 105, 141, 145, 166, 170
   to_text_visitor.py143994%85, 90, 174–175, 181–186
   types.py50786%27–28, 58–61, 72
   visitor.py1713778%10–12, 20, 24, 28, 32, 36, 40, 44, 48, 52, 56, 60, 64, 68, 72, 76, 80, 84, 88, 92, 96, 174, 186, 201, 204, 207, 213, 216, 222, 225, 228, 231, 234, 237, 240, 243
   visitor_mutator.py93298%138–139
   vla.py73297%50, 87
src/puya/ir/builder
   _utils.py71889%33, 44, 57, 79–80, 157, 203–204
   arc4.py4264689%77–78, 127, 151–157, 221, 229, 452, 464, 467, 623–637, 966–980, 1006–1030, 1039–1055, 1078, 1242–1259, 1298–1299, 1352, 1385–1386, 1534–1535, 1598
   assignment.py45589%64, 80, 107, 138–139
   blocks.py921089%60, 70, 74, 110, 118, 122, 155–157, 163–165
   callsub.py57198%93
   flow_control.py98496%62, 116, 140, 154
   iteration.py192697%45, 65, 94, 144, 182–183
   itxn.py2692690%123–124, 139–140, 150–151, 157–162, 188, 468–469, 474–475, 480–481, 487, 498, 515–516, 558–561
   main.py4765189%93, 118, 144, 153, 157, 202–203, 219–220, 254, 262, 269–270, 341, 379, 391, 408, 429, 436, 470, 483, 521, 534–535, 599–600, 622, 670, 698, 716, 751–752, 827, 830, 836, 843–844, 874–875, 890, 936–937, 953–954, 988, 1003–1005, 1014, 1017–1018
src/puya/ir/destructure
   coalesce_locals.py941584%33, 36, 118, 127–128, 131–134, 137–139, 155–158
   parcopy.py84298%47, 83
src/puya/ir/optimize
   _utils.py28196%21
   collapse_blocks.py92595%65–69
   control_op_simplification.py1011189%158–165, 239–246
   dead_code_elimination.py118298%289, 325
   intrinsic_simplification.py4124190%67, 170, 182, 247, 316, 374, 380, 451, 473, 494, 496, 502, 511, 551, 555, 557, 559, 566, 596, 602, 604, 606, 611, 613, 615, 617, 619, 622–625, 632, 634, 636, 638, 640, 642, 646, 669–670, 677
   main.py85396%106–107, 123
src/puya/ir/validation
   min_avm_version_validator.py29390%24–25, 38
   op_run_mode_validator.py41880%22–23, 44–55
src/puya/mir
   annotaters.py172796%56, 62, 98, 102, 135, 139, 216
   builder.py120596%90, 138, 144, 251–252
   context.py39197%35
   models.py3352493%14–18, 30, 41, 53, 69–70, 78, 89, 100, 111, 141, 251, 282, 319, 331, 348, 356–362, 368
   output.py61297%29, 31
   stack.py2532291%68, 72, 115, 119, 125, 135, 146, 157, 167, 182, 199, 209, 228, 246, 252, 254, 293, 304, 328, 360, 365, 403
   visitor.py762468%7, 15, 19, 23, 27, 31, 35, 39, 43, 47, 51, 55, 59, 63, 67, 71, 75, 79, 83, 87, 91, 95, 99, 103
src/puya/mir/stack_allocation
   baileys.py208697%31, 103, 123, 330–334, 359
   frame_allocation.py80396%21, 64–65
   koopmans.py61198%55
   peephole.py100694%75, 89, 99, 101, 103, 145
src/puya/teal
   models.py229299%292, 298
src/puya/teal/optimize
   peephole.py112496%154–164, 172
   repeated_rotations.py30197%13
   repeated_rotations_search.py88693%34, 40–41, 57, 67–68
TOTAL16637189889% 

Tests Skipped Failures Errors Time
278 4 💤 0 ❌ 0 🔥 3m 8s ⏱️

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