Move global symbol reference updating to rb_sym_global_symbols_update_references
This commit is contained in:
parent
8d0416ae0b
commit
3fb455adab
Notes:
git
2025-02-10 13:48:01 +00:00
3
gc.c
3
gc.c
@ -3618,8 +3618,7 @@ rb_gc_update_vm_references(void *objspace)
|
|||||||
|
|
||||||
rb_vm_update_references(vm);
|
rb_vm_update_references(vm);
|
||||||
rb_gc_update_global_tbl();
|
rb_gc_update_global_tbl();
|
||||||
global_symbols.ids = gc_location_internal(objspace, global_symbols.ids);
|
rb_sym_global_symbols_update_references();
|
||||||
global_symbols.dsymbol_fstr_hash = gc_location_internal(objspace, global_symbols.dsymbol_fstr_hash);
|
|
||||||
|
|
||||||
#if USE_YJIT
|
#if USE_YJIT
|
||||||
void rb_yjit_root_update_references(void); // in Rust
|
void rb_yjit_root_update_references(void); // in Rust
|
||||||
|
@ -18,6 +18,7 @@
|
|||||||
|
|
||||||
/* symbol.c */
|
/* symbol.c */
|
||||||
void rb_sym_global_symbols_mark(void);
|
void rb_sym_global_symbols_mark(void);
|
||||||
|
void rb_sym_global_symbols_update_references(void);
|
||||||
VALUE rb_to_symbol_type(VALUE obj);
|
VALUE rb_to_symbol_type(VALUE obj);
|
||||||
VALUE rb_sym_intern(const char *ptr, long len, rb_encoding *enc);
|
VALUE rb_sym_intern(const char *ptr, long len, rb_encoding *enc);
|
||||||
VALUE rb_sym_intern_ascii(const char *ptr, long len);
|
VALUE rb_sym_intern_ascii(const char *ptr, long len);
|
||||||
|
9
symbol.c
9
symbol.c
@ -113,6 +113,15 @@ rb_sym_global_symbols_mark(void)
|
|||||||
rb_gc_mark_movable(symbols->dsymbol_fstr_hash);
|
rb_gc_mark_movable(symbols->dsymbol_fstr_hash);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
rb_sym_global_symbols_update_references(void)
|
||||||
|
{
|
||||||
|
rb_symbols_t *symbols = &ruby_global_symbols;
|
||||||
|
|
||||||
|
symbols->ids = rb_gc_location(symbols->ids);
|
||||||
|
symbols->dsymbol_fstr_hash = rb_gc_location(symbols->dsymbol_fstr_hash);
|
||||||
|
}
|
||||||
|
|
||||||
WARN_UNUSED_RESULT(static VALUE dsymbol_alloc(rb_symbols_t *symbols, const VALUE klass, const VALUE str, rb_encoding *const enc, const ID type));
|
WARN_UNUSED_RESULT(static VALUE dsymbol_alloc(rb_symbols_t *symbols, const VALUE klass, const VALUE str, rb_encoding *const enc, const ID type));
|
||||||
WARN_UNUSED_RESULT(static VALUE dsymbol_check(rb_symbols_t *symbols, const VALUE sym));
|
WARN_UNUSED_RESULT(static VALUE dsymbol_check(rb_symbols_t *symbols, const VALUE sym));
|
||||||
WARN_UNUSED_RESULT(static ID lookup_str_id(VALUE str));
|
WARN_UNUSED_RESULT(static ID lookup_str_id(VALUE str));
|
||||||
|
Loading…
x
Reference in New Issue
Block a user