Skip to content

Commit 7c769ce

Browse files
committed
ZJIT: Make sure to add a LIR basic block in compile failure entrypoint
We need to add a dummy block for this stub otherwise it won't be able to push any instructions. Without this, `--zjit-stats` is broken.
1 parent a7a0c36 commit 7c769ce

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

zjit/src/codegen.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2899,6 +2899,7 @@ fn gen_string_append_codepoint(jit: &mut JITState, asm: &mut Assembler, string:
28992899
/// Generate a JIT entry that just increments exit_compilation_failure and exits
29002900
fn gen_compile_error_counter(cb: &mut CodeBlock, compile_error: &CompileError) -> Result<CodePtr, CompileError> {
29012901
let mut asm = Assembler::new();
2902+
asm.new_block_without_id();
29022903
gen_incr_counter(&mut asm, exit_compile_error);
29032904
gen_incr_counter(&mut asm, exit_counter_for_compile_error(compile_error));
29042905
asm.cret(Qundef.into());

0 commit comments

Comments
 (0)