diff options
author | Aaron Patterson <[email protected]> | 2019-05-31 13:25:24 -0700 |
---|---|---|
committer | Aaron Patterson <[email protected]> | 2019-06-11 09:16:14 -0700 |
commit | 6db2d6d8520f88e25d97af77495eb6c879f90b21 (patch) | |
tree | 25c42ae8e1a14a019a37401d65ad32f10aa506c6 /proc.c | |
parent | c4cbaef216ffcc9bda70cc328a805ad679ccaa8c (diff) |
Add compaction support for more types.
This commit adds compaction support for:
* Fibers
* Continuations
* Autoload Constants
Diffstat (limited to 'proc.c')
-rw-r--r-- | proc.c | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -64,7 +64,7 @@ block_mark(const struct rb_block *block) RUBY_MARK_NO_PIN_UNLESS_NULL(captured->self); RUBY_MARK_NO_PIN_UNLESS_NULL((VALUE)captured->code.val); if (captured->ep && captured->ep[VM_ENV_DATA_INDEX_ENV] != Qundef /* cfunc_proc_t */) { - RUBY_MARK_UNLESS_NULL(VM_ENV_ENVVAL(captured->ep)); + RUBY_MARK_NO_PIN_UNLESS_NULL(VM_ENV_ENVVAL(captured->ep)); } } break; @@ -87,6 +87,9 @@ block_compact(struct rb_block *block) struct rb_captured_block *captured = &block->as.captured; captured->self = rb_gc_location(captured->self); captured->code.val = rb_gc_location(captured->code.val); + if (captured->ep && captured->ep[VM_ENV_DATA_INDEX_ENV] != Qundef /* cfunc_proc_t */) { + UPDATE_REFERENCE(captured->ep[VM_ENV_DATA_INDEX_ENV]); + } } break; case block_type_symbol: |