Commit 7329403
committed
builder: emitCallExceptionHandler → C orchestrator (W27c #2b Cat B)
Per theologian W27c pair-batch design 00:08:52Z + 16:57:48Z
APPROVE; supervisor (α) local-accumulate posture. Conversion #2b
in the 5-method PARTIAL backlog (now 3 → 2 PARTIAL Cat-B
remaining); pair-batch sibling of W27c #2a (7135d94).
Cat B residue elimination — pair-batch closure: this commit
mirrors W27c #2a emitInlineExceptionMatch's shape and reuses the
same C helper build_inline_except_opcode_array_c (introduced in
#2a). The pre-resolve loop that previously ran on the C++ side
(BytecodeInstruction iteration + PyTuple_GET_ITEM(co_consts) for
LOAD_CONST/RETURN_CONST + getBlockAtOff for JUMP_BACKWARD* + the
terminator-detection skip-list) is deleted C++-side and replaced
with a single helper invocation in the C body.
Signature change: hir_builder_emit_call_exception_handler_c drops
(opcodes, opcode_count) params; builds opcode array internally
from PyCodeObject (via tc->frame.code) + builder block_map +
except_body_offset, identical to the #2a entry path. C++ stub
shrinks from ~70 lines to ~25.
D1 pre-amble (call_instr->setSuppressExceptionDeopt(true) +
phx_ptr_arr_pop on tc.frame.stack) stays C++-side because
DeoptBase*/Register* are C++-only types — that boundary is
intentional and unchanged.
D3 ok-block sequence (RefineType in-place SSA-rename + push
result back to outer tc stack to undo emitAnyCall's pre-amble
pop) preserved verbatim.
Bridge-struct elimination (bonus cleanup): with both #2a and #2b
now C-side for opcode-array construction, the C++/C bridge struct
OpcodeArrayEntry_CXX (+ its static_assert) in builder.cpp has
zero remaining references. Deleted entirely. The C-side
OpcodeArrayEntry struct in builder_emit_c.c stays (still used by
emit_except_match_body_c). This realises the design intent stated
in W27c #2a's commit message ("Eliminates OpcodeArrayEntry C++/C
bridge struct entirely").
Honest ratio framing per librarian D-1776879377 / D-1776880214:
post-conversion 98/100 PURE-CONVERTED + 2 PARTIAL Cat-B remaining
(was 97/100 + 3 PARTIAL after W27c #2a). emitCallExceptionHandler
is now a delegation stub, not pure-C++-eliminated; same metric
reading as the established honest-scope record. Remaining 2
PARTIAL are emitAnyCall (await-tail residue, design-residual per
pythia python#128 D-1777029012) and emitLoadMethodStatic (classloader.h
_PyType_VTable struct dependency, design-residual per A1 rule).
VERIFICATION: deferred to testkeeper full gate cycle (post-reboot
fresh verifications per supervisor 16:54:08Z stale-pre-reboot
discipline). All pre-reboot results (testkeeper 00:48:33Z +
01:45:23Z + 05:39:16Z) RETIRED. Push 54 batch (W27c python#1
7bfb7d1 + #2a 7135d94 + this commit) gated on:
- x86_64 fresh build + JIT smoke + nbody + W-RE-PARSER
substrate-stability + Phoenix CPython suite + ABBA 4-bench
- ARM64 STRICT verify on 3-commit bundle (devgpu004 connectivity
restored 16:53Z post-server-reboot)
- gatekeeper APPROVE
- supervisor PUSH AUTHORIZED
Auth chain: theologian design 00:08:52Z + APPROVE 16:57:48Z;
supervisor (α) authorization 00:07:10Z + 16:55:47Z plan; testkeeper
standby for fresh full gate (post-reboot discipline).1 parent 7135d94 commit 7329403
2 files changed
Lines changed: 22 additions & 58 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1326 | 1326 | | |
1327 | 1327 | | |
1328 | 1328 | | |
1329 | | - | |
1330 | | - | |
1331 | | - | |
1332 | | - | |
1333 | | - | |
1334 | | - | |
1335 | | - | |
1336 | | - | |
1337 | | - | |
1338 | | - | |
1339 | | - | |
1340 | | - | |
| 1329 | + | |
| 1330 | + | |
| 1331 | + | |
| 1332 | + | |
1341 | 1333 | | |
1342 | 1334 | | |
1343 | 1335 | | |
| |||
1391 | 1383 | | |
1392 | 1384 | | |
1393 | 1385 | | |
1394 | | - | |
1395 | | - | |
1396 | | - | |
| 1386 | + | |
1397 | 1387 | | |
1398 | 1388 | | |
1399 | 1389 | | |
| |||
1409 | 1399 | | |
1410 | 1400 | | |
1411 | 1401 | | |
| 1402 | + | |
| 1403 | + | |
| 1404 | + | |
1412 | 1405 | | |
1413 | 1406 | | |
1414 | 1407 | | |
1415 | | - | |
1416 | | - | |
1417 | | - | |
1418 | | - | |
1419 | | - | |
1420 | | - | |
1421 | | - | |
1422 | | - | |
1423 | | - | |
1424 | | - | |
1425 | | - | |
1426 | | - | |
1427 | | - | |
1428 | | - | |
1429 | | - | |
1430 | | - | |
1431 | | - | |
1432 | | - | |
1433 | | - | |
1434 | | - | |
1435 | | - | |
1436 | | - | |
1437 | | - | |
1438 | | - | |
1439 | | - | |
1440 | | - | |
1441 | | - | |
1442 | | - | |
1443 | | - | |
1444 | | - | |
1445 | | - | |
1446 | | - | |
1447 | | - | |
1448 | | - | |
1449 | | - | |
1450 | | - | |
1451 | | - | |
1452 | 1408 | | |
1453 | 1409 | | |
1454 | 1410 | | |
| |||
1459 | 1415 | | |
1460 | 1416 | | |
1461 | 1417 | | |
1462 | | - | |
1463 | | - | |
1464 | | - | |
| 1418 | + | |
1465 | 1419 | | |
1466 | 1420 | | |
1467 | 1421 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3568 | 3568 | | |
3569 | 3569 | | |
3570 | 3570 | | |
3571 | | - | |
3572 | | - | |
3573 | | - | |
| 3571 | + | |
3574 | 3572 | | |
3575 | 3573 | | |
3576 | 3574 | | |
3577 | 3575 | | |
3578 | 3576 | | |
3579 | 3577 | | |
| 3578 | + | |
| 3579 | + | |
| 3580 | + | |
| 3581 | + | |
| 3582 | + | |
| 3583 | + | |
| 3584 | + | |
| 3585 | + | |
| 3586 | + | |
| 3587 | + | |
3580 | 3588 | | |
3581 | 3589 | | |
3582 | 3590 | | |
| |||
3597 | 3605 | | |
3598 | 3606 | | |
3599 | 3607 | | |
| 3608 | + | |
| 3609 | + | |
3600 | 3610 | | |
3601 | 3611 | | |
3602 | 3612 | | |
| |||
0 commit comments