Commit b44a514
committed
Phase 3 Batch 4: block_map_ Class B-kept disposition closure (X MINIMAL)
Add hir_builder_state_block_map_blocks_lookup_cpp bridge accessing
HIRBuilder.block_map_.blocks (a std::unordered_map<BCOffset,
BasicBlock*>) via friend declaration. Rewire the existing C-side
bridge hir_builder_get_block_at_off in hir_c_api.cpp to call the new
state-flavored bridge instead of the C++ method directly.
§5 forcing-decision validation: PhxHirBuilderState declares block_map
as opaque pointer in spirit (Class B-kept with as-needed bridge
surface); the bridge is materialized + actively used by C-side code.
Disposition CLOSED for block_map_; pattern propagatable to remaining
Class B members (temps_, static_method_stack_) per spec §5 amendment.
Per theologian 00:06:05Z + supervisor 00:06:36Z DISPOSITION (X)
MINIMAL: pure addition of bridge + rewire of existing C-side bridge
caller. C++ method HIRBuilder::getBlockAtOff UNCHANGED — the 9
internal C++ callers in builder.cpp keep direct C++ access (no
indirection added on hot translate paths).
Bridge added (1, well within W25b ≤5/batch):
hir_builder_state_block_map_blocks_lookup_cpp(builder, off) -> void*
W45 fixture: 1 new (state_block_map_blocks_lookup_cpp) added per
shepard 22:46:33Z same-commit discipline. W45 perl regex updated
([\s\*]+ before symbol) to handle void* return type. Dry-run: 13/13
fixtures stage cleanly.
Numstat (vs HEAD b92d85e):
Python/jit/hir/builder.cpp +10 -0 (bridge impl + friend access)
Python/jit/hir/builder.h +5 -0 (friend decl + comment)
Python/jit/hir/builder_state_c.h +9 -0 (1 bridge decl)
Python/jit/hir/hir_c_api.cpp +4 -2 (rewire body to bridge)
scripts/w45_bridge_drift_falsifier.sh +2 -1 (1 new fixture +
void*-return regex)
TOTAL: NET +27L (forecast +26L; +1L variance, ~4%, under theologian
15% threshold).
Pre-commit compile-check: testkeeper 00:11:14Z BUILD_EXIT=0,
3-test sanity green (partial_conversions + W22 + W44).
W44 gate: PASS.
§3.5 backstop count post-land: 5/5 reached (W26 python#6+python#7 fold-into-C +
Phase 3 Batch 1+2+4; Batch 3 dead-delete didn't count). §3.5
fold-into-C derivation falsifier impl trigger fires next workstream
per supervisor 23:49:22Z + theologian §2.5 amendment.
Authorization: theologian 00:06:05Z (cross-check PASS, caller-count
correction 9 builder.cpp + 1 hir_c_api.cpp = 10 total) + supervisor
00:06:36Z (Step B GO).1 parent b92d85e commit b44a514
5 files changed
Lines changed: 30 additions & 3 deletions
File tree
- Python/jit/hir
- scripts
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1515 | 1515 | | |
1516 | 1516 | | |
1517 | 1517 | | |
| 1518 | + | |
| 1519 | + | |
| 1520 | + | |
| 1521 | + | |
| 1522 | + | |
| 1523 | + | |
| 1524 | + | |
| 1525 | + | |
| 1526 | + | |
| 1527 | + | |
1518 | 1528 | | |
1519 | 1529 | | |
1520 | 1530 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
217 | 217 | | |
218 | 218 | | |
219 | 219 | | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
220 | 225 | | |
221 | 226 | | |
222 | 227 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
89 | 89 | | |
90 | 90 | | |
91 | 91 | | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
92 | 101 | | |
93 | 102 | | |
94 | 103 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2625 | 2625 | | |
2626 | 2626 | | |
2627 | 2627 | | |
2628 | | - | |
2629 | | - | |
| 2628 | + | |
| 2629 | + | |
| 2630 | + | |
| 2631 | + | |
2630 | 2632 | | |
2631 | 2633 | | |
2632 | 2634 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
99 | 99 | | |
100 | 100 | | |
101 | 101 | | |
| 102 | + | |
102 | 103 | | |
103 | 104 | | |
104 | 105 | | |
| |||
111 | 112 | | |
112 | 113 | | |
113 | 114 | | |
114 | | - | |
| 115 | + | |
115 | 116 | | |
116 | 117 | | |
117 | 118 | | |
| |||
0 commit comments