Skip to content

Commit f4d391b

Browse files
committed
comment copyedit
1 parent 50e78d3 commit f4d391b

2 files changed

Lines changed: 6 additions & 10 deletions

File tree

zjit/src/codegen.rs

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3513,14 +3513,10 @@ fn build_stack_map(jit: &JITState, function: &Function, state: &FrameState) -> V
35133513
stack.extend(current_state.stack().rev().copied().map(to_entry));
35143514
// Frame environment data (me/cref, specval, flags) already lives in memory.
35153515
stack.push(StackMapEntry::Skip(VM_ENV_DATA_SIZE.to_usize()));
3516-
// Locals, top-down (local[L-1] .. local[0]). They land at fixed
3517-
// EP-relative slots because we write down from cfp->sp.
3518-
//
3519-
// Locals backed by memory are accessed in mainline code,
3520-
// so we skip over those slots to not interfere and clobber.
3521-
// (The stack map is not the 1st write to the slot.)
3516+
// Locals, top-down (local[L-1] .. local[0]).
35223517
let spilled_locals = current_state.spilled_locals();
35233518
for (idx, &insn_id) in current_state.locals().enumerate().rev() {
3519+
// Skip spilled slots which are already initialized on entry.
35243520
if spilled_locals.get(idx) {
35253521
stack.push(StackMapEntry::Skip(1));
35263522
} else {
@@ -3531,9 +3527,9 @@ fn build_stack_map(jit: &JITState, function: &Function, state: &FrameState) -> V
35313527
let Some(caller) = current_state.caller() else {
35323528
break;
35333529
};
3534-
// Skip the callee's receiver slot below its local table. We currently
3535-
// never map out the stack for `invokeblock`, which doesn't put a
3536-
// receiver on cfp->sp stack.
3530+
// Skip the callee's receiver slot below its local table.
3531+
// We currently never map out the stack for `invokeblock`, which doesn't
3532+
// put a receiver on cfp->sp stack.
35373533
stack.push(StackMapEntry::Skip(1));
35383534
current_state = function.frame_state(caller);
35393535
}

zjit/src/hir.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3278,7 +3278,7 @@ impl Function {
32783278

32793279
/// Record on the `Snapshot` at `insn_id` the locals that must stay in EP
32803280
/// across a block-passing call (block-modifiable locals), so codegen keeps
3281-
/// them out of the register-based stack map. See [`FrameState::spilled_locals`].
3281+
/// them out of the register-based stack map. See [`field@FrameState::spilled_locals`].
32823282
fn set_snapshot_spilled_locals(&mut self, insn_id: InsnId, spilled: LocalSet) {
32833283
let insn_id = self.union_find.borrow().find_const(insn_id);
32843284
match &mut self.insns[insn_id] {

0 commit comments

Comments
 (0)