summaryrefslogtreecommitdiff
path: root/rjit_c.rb
diff options
context:
space:
mode:
authorTakashi Kokubun <takashikkbn@gmail.com>2023-03-18 21:14:35 -0700
committerTakashi Kokubun <takashikkbn@gmail.com>2023-03-18 21:15:22 -0700
commit9f8e914943f812a5036d92648386169079daf51b (patch)
tree777a818d58cd1ebe97b6c675d9365c02da1ed2f9 /rjit_c.rb
parent67dd52d59cde0d2f1ebb3e299b605ed239b59f5b (diff)
downloadruby-9f8e914943f812a5036d92648386169079daf51b.tar.gz
RJIT: Implement checkkeyword
Diffstat (limited to 'rjit_c.rb')
-rw-r--r--rjit_c.rb16
1 files changed, 12 insertions, 4 deletions
diff --git a/rjit_c.rb b/rjit_c.rb
index 677e294ddb..32731ba4d0 100644
--- a/rjit_c.rb
+++ b/rjit_c.rb
@@ -1001,6 +1001,18 @@ module RubyVM::RJIT # :nodoc: all
)
end
+ def C.rb_iseq_param_keyword
+ @rb_iseq_param_keyword ||= CType::Struct.new(
+ "rb_iseq_param_keyword", Primitive.cexpr!("SIZEOF(struct rb_iseq_param_keyword)"),
+ num: [CType::Immediate.parse("int"), Primitive.cexpr!("OFFSETOF((*((struct rb_iseq_param_keyword *)NULL)), num)")],
+ required_num: [CType::Immediate.parse("int"), Primitive.cexpr!("OFFSETOF((*((struct rb_iseq_param_keyword *)NULL)), required_num)")],
+ bits_start: [CType::Immediate.parse("int"), Primitive.cexpr!("OFFSETOF((*((struct rb_iseq_param_keyword *)NULL)), bits_start)")],
+ rest_start: [CType::Immediate.parse("int"), Primitive.cexpr!("OFFSETOF((*((struct rb_iseq_param_keyword *)NULL)), rest_start)")],
+ table: [CType::Pointer.new { self.ID }, Primitive.cexpr!("OFFSETOF((*((struct rb_iseq_param_keyword *)NULL)), table)")],
+ default_values: [CType::Pointer.new { self.VALUE }, Primitive.cexpr!("OFFSETOF((*((struct rb_iseq_param_keyword *)NULL)), default_values)")],
+ )
+ end
+
def C.rb_iseq_struct
@rb_iseq_struct ||= CType::Struct.new(
"rb_iseq_struct", Primitive.cexpr!("SIZEOF(struct rb_iseq_struct)"),
@@ -1354,10 +1366,6 @@ module RubyVM::RJIT # :nodoc: all
CType::Stub.new(:rb_iseq_type)
end
- def C.rb_iseq_param_keyword
- CType::Stub.new(:rb_iseq_param_keyword)
- end
-
def C.iseq_insn_info
CType::Stub.new(:iseq_insn_info)
end