summaryrefslogtreecommitdiff
path: root/yjit_core.c
diff options
context:
space:
mode:
authorJohn Hawthorn <john@hawthorn.email>2021-08-07 22:49:31 -0700
committerAlan Wu <XrXr@users.noreply.github.com>2021-10-20 18:19:39 -0400
commitfbde1d9bee1da0a27ead6ce3ae7bc4411b10198d (patch)
treeb8652acded2a8793dcca73f8464cbf70db458a12 /yjit_core.c
parent9d5b3e1d0f3d44a52dffb6ec1f09c361c3b419c7 (diff)
Store block callee_cme in darray
This allows a block version to have dependencies on multiple CMEs.
Diffstat (limited to 'yjit_core.c')
-rw-r--r--yjit_core.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/yjit_core.c b/yjit_core.c
index ef6017b74d..77e5b98190 100644
--- a/yjit_core.c
+++ b/yjit_core.c
@@ -540,8 +540,11 @@ add_block_version(blockid_t blockid, block_t* block)
{
// By writing the new block to the iseq, the iseq now
// contains new references to Ruby objects. Run write barriers.
- RB_OBJ_WRITTEN(iseq, Qundef, block->receiver_klass);
- RB_OBJ_WRITTEN(iseq, Qundef, block->callee_cme);
+ cme_dependency_t *cme_dep;
+ rb_darray_foreach(block->cme_dependencies, cme_dependency_idx, cme_dep) {
+ RB_OBJ_WRITTEN(iseq, Qundef, cme_dep->receiver_klass);
+ RB_OBJ_WRITTEN(iseq, Qundef, cme_dep->callee_cme);
+ }
// Run write barriers for all objects in generated code.
uint32_t *offset_element;