File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -5094,11 +5094,16 @@ impl Function {
50945094 state: &mut FrameState,
50955095 ep_escaped: bool,
50965096 ) {
5097- let to_reload = (0..state.locals.len())
5098- .filter(|&local_idx| {
5097+ let to_reload: &mut dyn Iterator<Item = usize> = if ep_escaped {
5098+ // Reload everything when working with an escaped environment
5099+ &mut (0..state.locals.len())
5100+ } else {
5101+ // When not escaped, only reload the ones syntactically written to
5102+ &mut (0..state.locals.len()).filter(|&local_idx| {
50995103 let id = unsafe { rb_zjit_local_id(iseq, local_idx.try_into().unwrap()) };
51005104 unsafe { rb_zjit_iseq_writes_outer_local_p(blockiseq, id) }
5101- });
5105+ })
5106+ };
51025107 let mut base: Option<InsnId> = None;
51035108 for local_idx in to_reload {
51045109 let ep_offset = local_idx_to_ep_offset(iseq, local_idx);
You can’t perform that action at this time.
0 commit comments