diff options
author | Aaron Patterson <[email protected]> | 2020-05-07 10:07:57 -0700 |
---|---|---|
committer | Aaron Patterson <[email protected]> | 2020-05-07 11:42:39 -0700 |
commit | ff4f9cf95d73cc2730949df583bf0e41702d7aae (patch) | |
tree | 42101ad25cc3eb8d91ddc21162262812c41dc7b3 /gc.c | |
parent | 7ded8fd29a9dc5c481cadff7e94079009bce9e6c (diff) |
Allow global variables to move
This patch allows global variables that have been assigned in Ruby to
move. I added a new function for the GC to call that will update
global references and introduced a new callback in the global variable
struct for updating references.
Only pure Ruby global variables are supported right now, other
references will be pinned.
Diffstat (limited to 'gc.c')
-rw-r--r-- | gc.c | 1 |
1 files changed, 1 insertions, 0 deletions
@@ -8491,6 +8491,7 @@ gc_update_references(rb_objspace_t * objspace) objspace_each_objects_without_setup(objspace, gc_ref_update, objspace); rb_vm_update_references(vm); rb_transient_heap_update_references(); + rb_gc_update_global_tbl(); global_symbols.ids = rb_gc_location(global_symbols.ids); global_symbols.dsymbol_fstr_hash = rb_gc_location(global_symbols.dsymbol_fstr_hash); gc_update_tbl_refs(objspace, objspace->obj_to_id_tbl); |