summaryrefslogtreecommitdiff
path: root/mjit_c.rb
diff options
context:
space:
mode:
Diffstat (limited to 'mjit_c.rb')
-rw-r--r--mjit_c.rb8
1 files changed, 8 insertions, 0 deletions
diff --git a/mjit_c.rb b/mjit_c.rb
index 7c10b70078..be79d329a1 100644
--- a/mjit_c.rb
+++ b/mjit_c.rb
@@ -104,6 +104,10 @@ module RubyVM::MJIT # :nodoc: all
Primitive.cexpr! 'INT2NUM(BUILTIN_TYPE((VALUE)NUM2SIZET(_value)))'
end
+ def RB_TYPE_P(obj, type)
+ Primitive.cexpr! 'RBOOL(RB_TYPE_P(obj, NUM2UINT(type)))'
+ end
+
def rb_shape_get_shape_id(obj)
_value = to_value(obj)
Primitive.cexpr! 'UINT2NUM((unsigned int)rb_shape_get_shape_id((VALUE)NUM2SIZET(_value)))'
@@ -837,6 +841,10 @@ module RubyVM::MJIT # :nodoc: all
Primitive.cexpr! %q{ ULONG2NUM(RUBY_T_MODULE) }
end
+ def C.RUBY_T_STRING
+ Primitive.cexpr! %q{ ULONG2NUM(RUBY_T_STRING) }
+ end
+
def C.SHAPE_MASK
Primitive.cexpr! %q{ ULONG2NUM(SHAPE_MASK) }
end