Repository navigation
Commit 0fd0057
committed
W27d python#3: emitMatchClass → C body + delegation stub
MATCH_CLASS (mainline) opcode handler. Per W27d Step A scope.
C body: hir_builder_emit_match_class_c (~70 lines). Pops names/type/subject.
Loads nargs as TCUInt64 const. Emits MatchClass → attrs_tuple. Refines to
TOptTupleExact = TTupleExact|TNullptr (constructed via hir_type_union per
theologian L2544 fallback — HIR_TYPE_OPTTUPLEEXACT not defined). Cond-branch:
true_block refines to TTupleExact + (pre-3.12) loads Py_True; false_block
emits CheckErrOccurred + (pre-3.12 Py_False+assign-subject; 3.12+ Py_None
+assign-none). Converges at done.
ZERO new bridges.
C primitives: hir_c_create_load_const + hir_c_create_match_class_reg2 +
hir_c_create_refine_type_reg + hir_c_create_cond_branch +
hir_c_create_check_err_occurred_reg + hir_c_create_assign_reg +
hir_c_create_branch_cpp + hir_type_from_cuint + hir_type_union +
hir_type_from_object + hir_func_alloc_register + hir_cfg_alloc_block
+ hir_builder_temps_alloc_stack (all existing).
C++ HIRBuilder::emitMatchClass → 4-line delegation stub.
Verification: cmake --build target jit/phoenix_jit clean (BUILD_EXIT=0).
Sole-path: MATCH_CLASS is mainline-tested per theologian L2544
coverage observation.1 parent f9cbca1 commit 0fd0057
2 files changed
Lines changed: 80 additions & 47 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4810 | 4810 | | |
4811 | 4811 | | |
4812 | 4812 | | |
| 4813 | + | |
| 4814 | + | |
| 4815 | + | |
4813 | 4816 | | |
4814 | | - | |
| 4817 | + | |
4815 | 4818 | | |
4816 | 4819 | | |
4817 | | - | |
4818 | | - | |
4819 | | - | |
4820 | | - | |
4821 | | - | |
4822 | | - | |
4823 | | - | |
4824 | | - | |
4825 | | - | |
4826 | | - | |
4827 | | - | |
4828 | | - | |
4829 | | - | |
4830 | | - | |
4831 | | - | |
4832 | | - | |
4833 | | - | |
4834 | | - | |
4835 | | - | |
4836 | | - | |
4837 | | - | |
4838 | | - | |
4839 | | - | |
4840 | | - | |
4841 | | - | |
4842 | | - | |
4843 | | - | |
4844 | | - | |
4845 | | - | |
4846 | | - | |
4847 | | - | |
4848 | | - | |
4849 | | - | |
4850 | | - | |
4851 | | - | |
4852 | | - | |
4853 | | - | |
4854 | | - | |
4855 | | - | |
4856 | | - | |
4857 | | - | |
4858 | | - | |
4859 | | - | |
4860 | | - | |
4861 | | - | |
4862 | | - | |
| 4820 | + | |
| 4821 | + | |
4863 | 4822 | | |
4864 | 4823 | | |
4865 | 4824 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4393 | 4393 | | |
4394 | 4394 | | |
4395 | 4395 | | |
| 4396 | + | |
| 4397 | + | |
| 4398 | + | |
| 4399 | + | |
| 4400 | + | |
| 4401 | + | |
| 4402 | + | |
| 4403 | + | |
| 4404 | + | |
| 4405 | + | |
| 4406 | + | |
| 4407 | + | |
| 4408 | + | |
| 4409 | + | |
| 4410 | + | |
| 4411 | + | |
| 4412 | + | |
| 4413 | + | |
| 4414 | + | |
| 4415 | + | |
| 4416 | + | |
| 4417 | + | |
| 4418 | + | |
| 4419 | + | |
| 4420 | + | |
| 4421 | + | |
| 4422 | + | |
| 4423 | + | |
| 4424 | + | |
| 4425 | + | |
| 4426 | + | |
| 4427 | + | |
| 4428 | + | |
| 4429 | + | |
| 4430 | + | |
| 4431 | + | |
| 4432 | + | |
| 4433 | + | |
| 4434 | + | |
| 4435 | + | |
| 4436 | + | |
| 4437 | + | |
| 4438 | + | |
| 4439 | + | |
| 4440 | + | |
| 4441 | + | |
| 4442 | + | |
| 4443 | + | |
| 4444 | + | |
| 4445 | + | |
| 4446 | + | |
| 4447 | + | |
| 4448 | + | |
| 4449 | + | |
| 4450 | + | |
| 4451 | + | |
| 4452 | + | |
| 4453 | + | |
| 4454 | + | |
| 4455 | + | |
| 4456 | + | |
| 4457 | + | |
| 4458 | + | |
| 4459 | + | |
| 4460 | + | |
| 4461 | + | |
| 4462 | + | |
| 4463 | + | |
| 4464 | + | |
| 4465 | + | |
| 4466 | + | |
| 4467 | + | |
| 4468 | + | |
| 4469 | + | |
4396 | 4470 | | |
0 commit comments