summaryrefslogtreecommitdiff
path: root/vm_core.h
diff options
context:
space:
mode:
authorAlan Wu <XrXr@users.noreply.github.com>2021-02-12 17:12:18 -0500
committerAlan Wu <XrXr@users.noreply.github.com>2021-10-20 18:19:29 -0400
commitc02517bacb0a9441161342a5973a418039955764 (patch)
treedc7aab62502e0527f1794384f23abe83b832adc8 /vm_core.h
parent148ab79cd7a3d17f310c444041e93f30c1f1acac (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 'vm_core.h')
-rw-r--r--vm_core.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/vm_core.h b/vm_core.h
index 23ebf37b1a..e984be781e 100644
--- a/vm_core.h
+++ b/vm_core.h
@@ -77,6 +77,7 @@
#include "ruby/st.h"
#include "ruby_atomic.h"
#include "vm_opts.h"
+#include "darray.h"
#include "ruby/thread_native.h"
#if defined(_WIN32)
@@ -311,6 +312,8 @@ pathobj_realpath(VALUE pathobj)
/* Forward declarations */
struct rb_mjit_unit;
+typedef rb_darray(struct ujit_block_version *) rb_ujit_block_array_t;
+
struct rb_iseq_constant_body {
enum iseq_type {
ISEQ_TYPE_TOP,
@@ -449,6 +452,8 @@ struct rb_iseq_constant_body {
long unsigned total_calls; /* number of total calls with `mjit_exec()` */
struct rb_mjit_unit *jit_unit;
#endif
+
+ rb_ujit_block_array_t ujit_blocks; // empty, or has a size equal to iseq_size
};
/* T_IMEMO/iseq */