Repository navigation
Commit 0f6117d
committed
W27a python#2: emitPrimitiveUnbox → C body + delegation stub
PRIMITIVE_UNBOX (Static Python) opcode handler. Per W27a Step A scope.
C body: hir_builder_emit_primitive_unbox_c (~25 lines). Inlines
unboxPrimitive: emit primitive_unbox_reg, then conditionally emit
IsNegativeAndErrOccurred (skipped for CBool|CDouble types — they
cannot fail). hir_type_union + hir_type_is_subtype handle the type-
class check.
C primitives used: hir_c_create_primitive_unbox_reg + hir_c_create_is_neg_and_err_reg + hir_builder_temps_alloc_stack (all existing).
C++ HIRBuilder::emitPrimitiveUnbox → 3-line delegation stub.
Verification: cmake --build target jit/phoenix_jit clean (BUILD_EXIT=0).
Sole-path validation: PRIMITIVE_UNBOX only in __static__ modules
(emitInvokeNative precedent caveat acknowledged).1 parent e61eced commit 0f6117d
2 files changed
Lines changed: 30 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3937 | 3937 | | |
3938 | 3938 | | |
3939 | 3939 | | |
| 3940 | + | |
| 3941 | + | |
| 3942 | + | |
3940 | 3943 | | |
3941 | 3944 | | |
3942 | 3945 | | |
3943 | | - | |
3944 | | - | |
3945 | | - | |
3946 | | - | |
3947 | | - | |
| 3946 | + | |
3948 | 3947 | | |
3949 | 3948 | | |
3950 | 3949 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3676 | 3676 | | |
3677 | 3677 | | |
3678 | 3678 | | |
| 3679 | + | |
| 3680 | + | |
| 3681 | + | |
| 3682 | + | |
| 3683 | + | |
| 3684 | + | |
| 3685 | + | |
| 3686 | + | |
| 3687 | + | |
| 3688 | + | |
| 3689 | + | |
| 3690 | + | |
| 3691 | + | |
| 3692 | + | |
| 3693 | + | |
| 3694 | + | |
| 3695 | + | |
| 3696 | + | |
| 3697 | + | |
| 3698 | + | |
| 3699 | + | |
| 3700 | + | |
| 3701 | + | |
| 3702 | + | |
| 3703 | + | |
| 3704 | + | |
3679 | 3705 | | |
0 commit comments