aboutsummaryrefslogtreecommitdiffstats
path: root/yjit.c
diff options
context:
space:
mode:
authorPeter Zhu <peter@peterzhu.ca>2023-06-06 10:19:20 -0400
committerGitHub <noreply@github.com>2023-06-06 10:19:20 -0400
commit7577c101ed6452de3e72fadb43db595946acc701 (patch)
treedeed85a09fc431132145897d7e1982fd61c74e0c /yjit.c
parentfae2f80d06f5058b40e91f62ba27fb01f2463d12 (diff)
downloadruby-7577c101ed6452de3e72fadb43db595946acc701.tar.gz
Unify length field for embedded and heap strings (#7908)
* Unify length field for embedded and heap strings The length field is of the same type and position in RString for both embedded and heap allocated strings, so we can unify it. * Remove RSTRING_EMBED_LEN
Diffstat (limited to 'yjit.c')
-rw-r--r--yjit.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/yjit.c b/yjit.c
index 2f8abd4567..8e0c43f1bd 100644
--- a/yjit.c
+++ b/yjit.c
@@ -40,8 +40,7 @@
// Field offsets for the RString struct
enum rstring_offsets {
- RUBY_OFFSET_RSTRING_AS_HEAP_LEN = offsetof(struct RString, as.heap.len),
- RUBY_OFFSET_RSTRING_EMBED_LEN = offsetof(struct RString, as.embed.len),
+ RUBY_OFFSET_RSTRING_LEN = offsetof(struct RString, len)
};
// We need size_t to have a known size to simplify code generation and FFI.