summaryrefslogtreecommitdiff
path: root/mjit_c.rb
diff options
context:
space:
mode:
authorTakashi Kokubun <[email protected]>2023-03-04 00:01:30 -0800
committerTakashi Kokubun <[email protected]>2023-03-05 23:28:59 -0800
commitc587666f68bc3cd21d8dde9b759ef19574c50ca3 ()
treeaa5726afe4edc657d995534bd898951cc8fe51c4 /mjit_c.rb
parent9ee724408c1da10c7323c07405d5e01182aeb0bd (diff)
Optimize Thread.current
Notes: Merged: https://.com/ruby/ruby/pull/7448
-rw-r--r--mjit_c.rb103
1 files changed, 99 insertions, 4 deletions
@@ -384,6 +384,10 @@ module RubyVM::MJIT # :nodoc: all
Primitive.cexpr! 'SIZET2NUM((size_t)rb_vm_bh_to_procval)'
end
#========================================================================================
#
# Old stuff
@@ -1529,6 +1533,57 @@ module RubyVM::MJIT # :nodoc: all
@rb_shape_t ||= self.rb_shape
end
def C.VALUE
@VALUE ||= CType::Immediate.find(Primitive.cexpr!("SIZEOF(VALUE)"), Primitive.cexpr!("SIGNED_TYPE_P(VALUE)"))
end
@@ -1545,10 +1600,6 @@ module RubyVM::MJIT # :nodoc: all
CType::Bool.new
end
- def C.rb_thread_struct
- CType::Stub.new(:rb_thread_struct)
- end
-
def C.vm_call_handler
CType::Stub.new(:vm_call_handler)
end
@@ -1653,5 +1704,49 @@ module RubyVM::MJIT # :nodoc: all
CType::Stub.new(:rb_mjit_unit_list)
end
### MJIT bindgen end ###
end if Primitive.mjit_enabled_p