Skip to content

Commit b2fc406

Browse files
committed
ZJIT: Remove rb_zjit_writebarrier_check_immediate
1 parent 35b9f9d commit b2fc406

File tree

4 files changed

+1
-11
lines changed

4 files changed

+1
-11
lines changed

zjit.c

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -304,14 +304,6 @@ rb_zjit_class_has_default_allocator(VALUE klass)
304304
VALUE rb_vm_untag_block_handler(VALUE block_handler);
305305
VALUE rb_vm_get_untagged_block_handler(rb_control_frame_t *reg_cfp);
306306

307-
void
308-
rb_zjit_writebarrier_check_immediate(VALUE recv, VALUE val)
309-
{
310-
if (!RB_SPECIAL_CONST_P(val)) {
311-
rb_gc_writebarrier(recv, val);
312-
}
313-
}
314-
315307
// Primitives used by zjit.rb. Don't put other functions below, which wouldn't use them.
316308
VALUE rb_zjit_enable(rb_execution_context_t *ec, VALUE self);
317309
VALUE rb_zjit_assert_compiles(rb_execution_context_t *ec, VALUE self);

zjit/bindgen/src/main.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,6 @@ fn main() {
146146
.allowlist_function("rb_gc_writebarrier")
147147
.allowlist_function("rb_gc_writebarrier_remember")
148148
.allowlist_function("rb_gc_register_mark_object")
149-
.allowlist_function("rb_zjit_writebarrier_check_immediate")
150149

151150
// VALUE variables for Ruby class objects
152151
.allowlist_var("rb_cBasicObject")

zjit/src/codegen.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1308,7 +1308,7 @@ fn gen_write_barrier(jit: &mut JITState, asm: &mut Assembler, recv: Opnd, val: O
13081308
asm.je(jit, result_edge.clone());
13091309

13101310
// Heap object; fire the write barrier
1311-
asm_ccall!(asm, rb_zjit_writebarrier_check_immediate, recv, val);
1311+
asm_ccall!(asm, rb_gc_writebarrier, recv, val);
13121312
asm.jmp(result_edge);
13131313

13141314
// Join block

zjit/src/cruby_bindings.inc.rs

Lines changed: 0 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)