From 32e0c97dfaa7973032e6ab93260be8eb4ad1458a Mon Sep 17 00:00:00 2001 From: Takashi Kokubun Date: Sat, 18 Mar 2023 23:33:10 -0700 Subject: RJIT: Optimize String#bytesize --- rjit_c.rb | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'rjit_c.rb') diff --git a/rjit_c.rb b/rjit_c.rb index 6d855d3ad8..ea68fcf4fb 100644 --- a/rjit_c.rb +++ b/rjit_c.rb @@ -607,6 +607,10 @@ module RubyVM::RJIT # :nodoc: all Primitive.cexpr! %q{ SIZET2NUM((size_t)rb_reg_nth_match) } end + def C.rb_str_bytesize + Primitive.cexpr! %q{ SIZET2NUM((size_t)rb_str_bytesize) } + end + def C.rb_str_concat_literals Primitive.cexpr! %q{ SIZET2NUM((size_t)rb_str_concat_literals) } end -- cgit v1.2.1