summaryrefslogtreecommitdiff
path: root/rjit_c.rb
diff options
context:
space:
mode:
authorTakashi Kokubun <takashikkbn@gmail.com>2023-03-18 23:33:10 -0700
committerTakashi Kokubun <takashikkbn@gmail.com>2023-03-18 23:35:42 -0700
commit32e0c97dfaa7973032e6ab93260be8eb4ad1458a (patch)
tree267a6f988cd4d3f1922f1a27c65114bbfd4c82e5 /rjit_c.rb
parent106cca5111981ce30bb6f4534ff72e8c09ace162 (diff)
downloadruby-32e0c97dfaa7973032e6ab93260be8eb4ad1458a.tar.gz
RJIT: Optimize String#bytesize
Diffstat (limited to 'rjit_c.rb')
-rw-r--r--rjit_c.rb4
1 files changed, 4 insertions, 0 deletions
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