Commit 2a8366a
committed
refactor(runtime): use VMPILOT_TRY / TRY_ASSIGN on vm_engine hot path
Six identity-propagation sites in the dispatch loop that used to
read:
auto x_or = f(...);
if (!x_or) return tl::make_unexpected(x_or.error());
auto x = *x_or;
collapse to VMPILOT_TRY or VMPILOT_TRY_ASSIGN. Covers BlobView::create,
pipeline::fetch_decrypt_decode, pipeline::verify_bb_mac,
pipeline::enter_basic_block, dispatch_unit, and VmEngine::create.
Most of the 120 call sites the retrospective estimated are already
gone — schema_parse subsumed the per-field require_* chains. What
remains falls into two groups: pure identity propagation (migrated
here and in the companion commits) and error-code substitution
(e.g. for a generic BadCbor), which
stays imperative because the macro forces the original error.1 parent fca3b2e commit 2a8366a
2 files changed
Lines changed: 11 additions & 18 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
41 | 41 | | |
42 | 42 | | |
43 | 43 | | |
44 | | - | |
45 | | - | |
46 | | - | |
| 44 | + | |
| 45 | + | |
47 | 46 | | |
48 | 47 | | |
49 | 48 | | |
| |||
371 | 370 | | |
372 | 371 | | |
373 | 372 | | |
374 | | - | |
375 | | - | |
376 | | - | |
| 373 | + | |
377 | 374 | | |
378 | 375 | | |
379 | 376 | | |
| |||
645 | 642 | | |
646 | 643 | | |
647 | 644 | | |
648 | | - | |
649 | | - | |
| 645 | + | |
650 | 646 | | |
651 | 647 | | |
652 | 648 | | |
653 | | - | |
654 | | - | |
655 | | - | |
| 649 | + | |
| 650 | + | |
656 | 651 | | |
657 | 652 | | |
658 | 653 | | |
| |||
687 | 682 | | |
688 | 683 | | |
689 | 684 | | |
690 | | - | |
691 | | - | |
692 | | - | |
| 685 | + | |
| 686 | + | |
693 | 687 | | |
694 | 688 | | |
695 | 689 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
54 | 54 | | |
55 | 55 | | |
56 | 56 | | |
57 | | - | |
| 57 | + | |
58 | 58 | | |
59 | | - | |
60 | | - | |
| 59 | + | |
61 | 60 | | |
62 | | - | |
| 61 | + | |
63 | 62 | | |
64 | 63 | | |
65 | 64 | | |
| |||
0 commit comments