Commit 6945b96
committed
Tier 8 Pilot Phase A: exception_table_ → PhxExceptionTable migration
Per docs/tier8-class-b-cport-migrate-arm-spec.md theologian 01:01:50Z +
supervisor 01:02:46Z ADOPTED + supervisor 01:18:35Z + 03:44:19Z +
04:14:27Z (8-incident root-cause attribution to §3.5 restore-trap +
b83f084 fix LIVE).
Migrates HIRBuilder std::vector<ExceptionTableEntry> exception_table_
field to PhxExceptionTable (purpose-built typed-inline pure-C
container in PhxHirBuilderState.exception_table_phx). Validates
Pythia python#103 + python#94 (3) §5 forcing-decision MIGRATE-ARM via 1-pilot
port (vs Phase 3's 4-Class-B-kept disposition).
CONTAINER:
PhxExceptionTable (builder_state_c.h): typed-inline data/count/capacity
with 6 inline funcs (init/destroy/push/size/at/clear). Lazy-init,
doubling realloc, free at HIRBuilder dtor.
ExceptionTableEntry (builder_state_c.h): POD mirror of deleted C++
struct, fields flattened BCOffset → int + bool → unsigned char.
C BODY PORTS (builder_state_c.c):
hir_builder_state_init: also calls phx_exception_table_init
hir_builder_state_destroy: NEW (calls phx_exception_table_destroy)
parse_exception_table_c: pushes ExceptionTableEntry via
phx_exception_table_push (replaces deleted push_cpp bridge)
find_exception_handler_c: linear scan via phx_exception_table_size +
at (replaces deleted size_cpp/entry_cpp bridges)
C++ SHIM (transient compatibility per Phase A; Phase B deletes):
HIRBuilder::parseExceptionTable → 1-line delegate to C body
HIRBuilder::findExceptionHandler → C body returns index, shim
converts via phx_exception_table_at preserving caller-contract
HIRBuilder::buildHIRImpl translate-loop iterates PhxExceptionTable
via size+at; .clear() goes to phx_exception_table_clear
HIRBuilder::getSimpleExceptInfo wraps handler.target in BCOffset{}
(now plain int post-C struct migration)
emit_call_method_exception_handler_inline_c at builder.cpp:2883
still calls self->findExceptionHandler (KEPT shim — Phase B
will rewire)
DELETED:
3 _cpp bridge impls in builder.cpp (push/size/entry, ~37L)
3 friend decls in builder.h
C++ struct ExceptionTableEntry in builder.h (5L)
std::vector<ExceptionTableEntry> exception_table_ field in builder.h
W45 §1-§2 fixture removals (3): the deleted bridges no longer have
signatures to fuzz. Cumulative bridge-count delta: -3 (per Tier 8
spec §5 python#11 acceptance).
Numstat (vs HEAD b83f084):
Python/jit/hir/builder.cpp +21 -44 (-23 NET)
Python/jit/hir/builder.h +14 -19 (-5 NET)
Python/jit/hir/builder_state_c.c +30 -17 (+13 NET)
Python/jit/hir/builder_state_c.h +103 -48 (+55 NET)
scripts/w45_bridge_drift_falsifier.sh +0 -3 (-3 NET)
TOTAL: NET +37L, bridge-count delta -3.
Per Tier 8 spec §5 python#10 amendment (theologian 01:14:29Z): full Tier 8
endpoint ≤+0L cumulative is across all 4 Class B containers, not
single pilot. exception_table_ pilot subtracts ~19% of Phase 3 +257L
foundation cost; Phase 3 + Tier 8 Phase A cumulative now +257 + 37 =
+294L.
Apply mechanism: python single-process write (8-incident root cause
was §3.5 restore-trap, NOT Write-tool-burst — but python single-process
remains best practice per Pythia python#107 (4) isolation principle). Apply
script: /tmp/apply_phase_a.py.
EXPANDED PRE-COMMIT GATE per supervisor 01:17:23Z (testkeeper 04:24:49Z):
Stage 1 compile-check: BUILD_EXIT=0
Stage 2 §3.5 BUILD MODE: 4/4 PASS, PhxExceptionTable INTACT post
(§3.5 fix b83f084 VINDICATED)
Stage 3 per-bench gate: GEO 1.27x, all 4 floor criteria PASS
§5 forcing-decision MIGRATE-ARM EMPIRICALLY VALIDATED via this pilot:
exception_table_ migrated to PhxArray-equivalent pure-C container
without C++-side-keep dependency in C-side reads. Pattern propagatable
to remaining 3 Class B containers (block_map_, temps_,
static_method_stack_) in future Tier 8 batches per spec §1.1
container-shape transferability caveat.
Phase B follow-up commit (NEXT) deletes C++ shims + rewires the
remaining caller at builder.cpp:2883 per Tier 8 spec §5 python#5.
Authorization: supervisor 03:44:19Z + 04:14:27Z; theologian 03:33:50Z
patch-apply hybrid + 03:54:15Z content-trigger refinement (later
attributed to §3.5 trap, not content) + 04:14:27Z fix directive.
Cross-link: 8 incidents resolved via b83f084 §3.5 restore-trap fix.
Pythia python#105 'fever has name infection still spreads' RESOLVED — fever
was self-inflicted instrumentation. W48 spec marked CANCELLED post-
this-commit per supervisor 04:14:27Z cascade re-retract.1 parent b83f084 commit 6945b96
5 files changed
Lines changed: 168 additions & 131 deletions
File tree
- Python/jit/hir
- scripts
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1195 | 1195 | | |
1196 | 1196 | | |
1197 | 1197 | | |
1198 | | - | |
1199 | | - | |
| 1198 | + | |
| 1199 | + | |
| 1200 | + | |
| 1201 | + | |
| 1202 | + | |
| 1203 | + | |
| 1204 | + | |
1200 | 1205 | | |
1201 | 1206 | | |
1202 | | - | |
| 1207 | + | |
1203 | 1208 | | |
1204 | 1209 | | |
1205 | 1210 | | |
| |||
1227 | 1232 | | |
1228 | 1233 | | |
1229 | 1234 | | |
1230 | | - | |
1231 | | - | |
1232 | | - | |
1233 | | - | |
1234 | | - | |
1235 | | - | |
1236 | | - | |
1237 | | - | |
1238 | | - | |
1239 | | - | |
1240 | | - | |
1241 | | - | |
1242 | | - | |
1243 | | - | |
1244 | | - | |
1245 | | - | |
1246 | | - | |
1247 | | - | |
1248 | | - | |
1249 | | - | |
1250 | | - | |
1251 | | - | |
1252 | | - | |
1253 | | - | |
1254 | | - | |
1255 | | - | |
1256 | | - | |
1257 | | - | |
1258 | | - | |
1259 | | - | |
1260 | | - | |
1261 | | - | |
1262 | | - | |
1263 | | - | |
1264 | | - | |
1265 | | - | |
1266 | | - | |
| 1235 | + | |
| 1236 | + | |
| 1237 | + | |
| 1238 | + | |
| 1239 | + | |
| 1240 | + | |
| 1241 | + | |
1267 | 1242 | | |
1268 | 1243 | | |
1269 | 1244 | | |
1270 | 1245 | | |
1271 | 1246 | | |
1272 | | - | |
| 1247 | + | |
1273 | 1248 | | |
1274 | 1249 | | |
1275 | 1250 | | |
1276 | 1251 | | |
1277 | 1252 | | |
1278 | 1253 | | |
1279 | 1254 | | |
1280 | | - | |
| 1255 | + | |
1281 | 1256 | | |
1282 | 1257 | | |
1283 | 1258 | | |
| |||
1288 | 1263 | | |
1289 | 1264 | | |
1290 | 1265 | | |
1291 | | - | |
| 1266 | + | |
| 1267 | + | |
| 1268 | + | |
1292 | 1269 | | |
1293 | 1270 | | |
1294 | 1271 | | |
| |||
1576 | 1553 | | |
1577 | 1554 | | |
1578 | 1555 | | |
1579 | | - | |
| 1556 | + | |
1580 | 1557 | | |
1581 | 1558 | | |
1582 | 1559 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
206 | 206 | | |
207 | 207 | | |
208 | 208 | | |
209 | | - | |
210 | | - | |
211 | | - | |
212 | | - | |
213 | | - | |
214 | | - | |
215 | | - | |
216 | | - | |
217 | | - | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
218 | 215 | | |
219 | 216 | | |
220 | 217 | | |
| |||
619 | 616 | | |
620 | 617 | | |
621 | 618 | | |
622 | | - | |
623 | | - | |
624 | | - | |
625 | | - | |
626 | | - | |
627 | | - | |
628 | | - | |
629 | | - | |
630 | | - | |
| 619 | + | |
| 620 | + | |
| 621 | + | |
| 622 | + | |
| 623 | + | |
| 624 | + | |
| 625 | + | |
631 | 626 | | |
632 | | - | |
| 627 | + | |
633 | 628 | | |
634 | 629 | | |
635 | 630 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
4 | | - | |
5 | | - | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
6 | 8 | | |
7 | 9 | | |
8 | 10 | | |
| |||
19 | 21 | | |
20 | 22 | | |
21 | 23 | | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
22 | 29 | | |
23 | 30 | | |
24 | 31 | | |
25 | 32 | | |
26 | 33 | | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
27 | 38 | | |
28 | 39 | | |
29 | 40 | | |
| |||
53 | 64 | | |
54 | 65 | | |
55 | 66 | | |
56 | | - | |
57 | | - | |
58 | | - | |
59 | | - | |
60 | | - | |
61 | | - | |
62 | | - | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
63 | 75 | | |
64 | 76 | | |
65 | 77 | | |
| |||
68 | 80 | | |
69 | 81 | | |
70 | 82 | | |
71 | | - | |
72 | | - | |
73 | | - | |
74 | | - | |
75 | | - | |
76 | | - | |
77 | | - | |
78 | | - | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
79 | 92 | | |
80 | 93 | | |
81 | 94 | | |
| |||
0 commit comments