Commit 6589315
committed
W27c python#1: emitSetupWithCommon → C body + bridge stub
Helper for emitSetupWith + emitBeforeWith. Per W27c Step A scope.
C body: hir_builder_emit_setup_with_common_c (~45 lines). Pops manager,
allocates enter+exit, emits load_attr_special_reg for both, pushes exit,
allocates enter_result, emits vectorcall_reg with CallFlags::None=0u,
sets enter as operand 0, sets frame state, emits.
PY_VERSION_HEX conditional (_Py_Identifier vs PyObject*) folded into C++
stub: ids are passed as opaque void* downward. is_async drives error
message text selection.
NEW BRIDGE: hir_builder_emit_setup_with_common_c — out-param returns
enter_result via void**.
C primitives used: hir_c_create_load_attr_special_reg + hir_c_create_vectorcall_reg
+ hir_c_set_operand + hir_deopt_set_frame_state + hir_builder_temps_alloc_stack
(all existing).
C++ HIRBuilder::emitSetupWithCommon → 6-line bridge stub returning
Register* via cast of out-param.
Verification: cmake --build target jit/phoenix_jit clean (BUILD_EXIT=0).
This is the chain-dep root for W27c python#2 (SetupWith) + python#3 (BeforeWith).1 parent 6e24cff commit 6589315
2 files changed
Lines changed: 52 additions & 32 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4531 | 4531 | | |
4532 | 4532 | | |
4533 | 4533 | | |
| 4534 | + | |
| 4535 | + | |
| 4536 | + | |
| 4537 | + | |
4534 | 4538 | | |
4535 | 4539 | | |
4536 | 4540 | | |
| |||
4541 | 4545 | | |
4542 | 4546 | | |
4543 | 4547 | | |
4544 | | - | |
4545 | | - | |
4546 | | - | |
4547 | | - | |
4548 | | - | |
4549 | | - | |
4550 | | - | |
4551 | | - | |
4552 | | - | |
4553 | | - | |
4554 | | - | |
4555 | | - | |
4556 | | - | |
4557 | | - | |
4558 | | - | |
4559 | | - | |
4560 | | - | |
4561 | | - | |
4562 | | - | |
4563 | | - | |
4564 | | - | |
4565 | | - | |
4566 | | - | |
4567 | | - | |
4568 | | - | |
4569 | | - | |
4570 | | - | |
4571 | | - | |
4572 | | - | |
4573 | | - | |
4574 | | - | |
4575 | | - | |
| 4548 | + | |
| 4549 | + | |
| 4550 | + | |
| 4551 | + | |
| 4552 | + | |
4576 | 4553 | | |
4577 | 4554 | | |
4578 | 4555 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4084 | 4084 | | |
4085 | 4085 | | |
4086 | 4086 | | |
| 4087 | + | |
| 4088 | + | |
| 4089 | + | |
| 4090 | + | |
| 4091 | + | |
| 4092 | + | |
| 4093 | + | |
| 4094 | + | |
| 4095 | + | |
| 4096 | + | |
| 4097 | + | |
| 4098 | + | |
| 4099 | + | |
| 4100 | + | |
| 4101 | + | |
| 4102 | + | |
| 4103 | + | |
| 4104 | + | |
| 4105 | + | |
| 4106 | + | |
| 4107 | + | |
| 4108 | + | |
| 4109 | + | |
| 4110 | + | |
| 4111 | + | |
| 4112 | + | |
| 4113 | + | |
| 4114 | + | |
| 4115 | + | |
| 4116 | + | |
| 4117 | + | |
| 4118 | + | |
| 4119 | + | |
| 4120 | + | |
| 4121 | + | |
| 4122 | + | |
| 4123 | + | |
| 4124 | + | |
| 4125 | + | |
| 4126 | + | |
| 4127 | + | |
| 4128 | + | |
| 4129 | + | |
4087 | 4130 | | |
0 commit comments