summaryrefslogtreecommitdiff
path: root/yjit.c
diff options
context:
space:
mode:
authorTakashi Kokubun <takashikkbn@gmail.com>2023-08-02 07:15:29 -0700
committerGitHub <noreply@github.com>2023-08-02 10:15:29 -0400
commitd405410e3c6ecfdefe345f2b78cf740effe784a1 (patch)
tree6e329cfb607a2be620e4669e4b7e24eb873d294f /yjit.c
parent1d096c1e53581ed9fe94694c9760babd1e12e580 (diff)
YJIT: Move ROBJECT_OFFSET_* to yjit.c (#8157)
Notes
Notes: Merged-By: maximecb <maximecb@ruby-lang.org>
Diffstat (limited to 'yjit.c')
-rw-r--r--yjit.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/yjit.c b/yjit.c
index 50dcecae96..132c2f0959 100644
--- a/yjit.c
+++ b/yjit.c
@@ -38,6 +38,13 @@
#include <errno.h>
+// Field offsets for the RObject struct
+enum robject_offsets {
+ ROBJECT_OFFSET_AS_HEAP_IVPTR = offsetof(struct RObject, as.heap.ivptr),
+ ROBJECT_OFFSET_AS_HEAP_IV_INDEX_TBL = offsetof(struct RObject, as.heap.iv_index_tbl),
+ ROBJECT_OFFSET_AS_ARY = offsetof(struct RObject, as.ary),
+};
+
// Field offsets for the RString struct
enum rstring_offsets {
RUBY_OFFSET_RSTRING_LEN = offsetof(struct RString, len)