diff options
author | Alan Wu <[email protected]> | 2021-02-12 17:12:18 -0500 |
---|---|---|
committer | Alan Wu <[email protected]> | 2021-10-20 18:19:29 -0400 |
commit | c02517bacb0a9441161342a5973a418039955764 (patch) | |
tree | dc7aab62502e0527f1794384f23abe83b832adc8 /iseq.c | |
parent | 148ab79cd7a3d17f310c444041e93f30c1f1acac (diff) |
Tie lifetime of uJIT blocks to iseqs
* Tie lifetime of uJIT blocks to iseqs
Blocks weren't being freed when iseqs are collected.
* Add rb_dary. Use it for method dependency table
* Keep track of blocks per iseq
Remove global version_tbl
* Block version bookkeeping fix
* dary -> darray
* free ujit_blocks
* comment about size of ujit_blocks
Diffstat (limited to 'iseq.c')
-rw-r--r-- | iseq.c | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -109,6 +109,7 @@ rb_iseq_free(const rb_iseq_t *iseq) if (iseq && iseq->body) { struct rb_iseq_constant_body *const body = iseq->body; mjit_free_iseq(iseq); /* Notify MJIT */ + rb_ujit_iseq_free(body); ruby_xfree((void *)body->iseq_encoded); ruby_xfree((void *)body->insns_info.body); if (body->insns_info.positions) ruby_xfree((void *)body->insns_info.positions); @@ -321,6 +322,7 @@ rb_iseq_update_references(rb_iseq_t *iseq) #if USE_MJIT mjit_update_references(iseq); #endif + rb_ujit_iseq_update_references(body); } } @@ -401,6 +403,7 @@ rb_iseq_mark(const rb_iseq_t *iseq) #if USE_MJIT mjit_mark_cc_entries(body); #endif + rb_ujit_iseq_mark(body); } if (FL_TEST_RAW((VALUE)iseq, ISEQ_NOT_LOADED_YET)) { |