diff options
author | Maxime Chevalier-Boisvert <maxime.chevalierboisvert@shopify.com> | 2023-01-18 15:41:28 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-01-18 15:41:28 -0500 |
commit | 6bb576fe759e3ef86b2ea484313013c51c39f388 (patch) | |
tree | e8d4a3b721937842e8bac66d05e6e5e60131f9b1 /yjit.c | |
parent | 0fd5a664e743c2ea506a83c5abed145a0734e7e6 (diff) |
YJIT: implement codegen for `String#empty?` (#7148)
YJIT: implement codegen for String#empty?
Notes
Notes:
Merged-By: maximecb <maximecb@ruby-lang.org>
Diffstat (limited to 'yjit.c')
-rw-r--r-- | yjit.c | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -37,6 +37,12 @@ #include <errno.h> +// 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), +}; + // We need size_t to have a known size to simplify code generation and FFI. // TODO(alan): check this in configure.ac to fail fast on 32 bit platforms. STATIC_ASSERT(64b_size_t, SIZE_MAX == UINT64_MAX); |