Commit 2ca2865
authored
ZJIT: Remove eager nil-fill of locals in JIT-to-JIT calls (ruby#16544)
The caller in gen_send_iseq_direct was eagerly writing Qnil to all
non-parameter local slots of the callee's frame before every JIT-to-JIT
call. This is unnecessary because compile_jit_entry_state already
initializes non-parameter locals to Const(Qnil) in the JIT entry block,
and these values are propagated to the target block via branch edges.
Before any non-leaf call (including eval/binding), gen_spill_locals
writes these nil values from the FrameState to the stack, ensuring
that eval can correctly read uninitialized locals as nil.
The nil-fill in function_stub_hit's prepare_for_exit is kept because
that path handles compilation failures where JIT code never runs.1 parent ff89d56 commit 2ca2865
1 file changed
+1
-11
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1619 | 1619 | | |
1620 | 1620 | | |
1621 | 1621 | | |
1622 | | - | |
1623 | | - | |
1624 | | - | |
1625 | | - | |
1626 | | - | |
1627 | | - | |
1628 | | - | |
1629 | | - | |
1630 | | - | |
1631 | | - | |
1632 | 1622 | | |
1633 | 1623 | | |
1634 | 1624 | | |
| |||
2876 | 2866 | | |
2877 | 2867 | | |
2878 | 2868 | | |
2879 | | - | |
| 2869 | + | |
2880 | 2870 | | |
2881 | 2871 | | |
2882 | 2872 | | |
| |||
0 commit comments