Skip to content

Commit f3ee4bd

Browse files
authored
ZJIT: Remove redundant snapshot for opt_getconstant_path (ruby#16229)
1 parent 070b7d4 commit f3ee4bd

3 files changed

Lines changed: 227 additions & 229 deletions

File tree

zjit/src/hir.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6714,9 +6714,7 @@ pub fn iseq_to_hir(iseq: *const rb_iseq_t) -> Result<Function, ParseError> {
67146714
}
67156715
YARVINSN_opt_getconstant_path => {
67166716
let ic = get_arg(pc, 0).as_ptr();
6717-
// TODO: Remove this extra Snapshot and pass `exit_id` to `GetConstantPath` instead.
6718-
let snapshot = fun.push_insn(block, Insn::Snapshot { state: exit_state });
6719-
state.stack_push(fun.push_insn(block, Insn::GetConstantPath { ic, state: snapshot }));
6717+
state.stack_push(fun.push_insn(block, Insn::GetConstantPath { ic, state: exit_id }));
67206718
}
67216719
YARVINSN_branchunless | YARVINSN_branchunless_without_ints => {
67226720
if opcode == YARVINSN_branchunless {

0 commit comments

Comments
 (0)