summaryrefslogtreecommitdiff
path: root/rjit_c.rb
diff options
context:
space:
mode:
authorTakashi Kokubun <takashikkbn@gmail.com>2023-03-18 21:27:07 -0700
committerTakashi Kokubun <takashikkbn@gmail.com>2023-03-18 21:28:55 -0700
commitd189f8d870aee69e43697415a4840a4d9cdf5a62 (patch)
treed62ad75306eb9089c3e36d4441b4de1be1dace6f /rjit_c.rb
parent4e440d6990a1095149a83662f1238d31047c1032 (diff)
downloadruby-d189f8d870aee69e43697415a4840a4d9cdf5a62.tar.gz
RJIT: Prefix rjit_options with rb_
Diffstat (limited to 'rjit_c.rb')
-rw-r--r--rjit_c.rb28
1 files changed, 14 insertions, 14 deletions
diff --git a/rjit_c.rb b/rjit_c.rb
index cc0b8b8541..d2e342a24e 100644
--- a/rjit_c.rb
+++ b/rjit_c.rb
@@ -251,7 +251,7 @@ module RubyVM::RJIT # :nodoc: all
def rjit_opts
addr = Primitive.cexpr! 'SIZET2NUM((VALUE)&rb_rjit_opts)'
- rjit_options.new(addr)
+ rb_rjit_options.new(addr)
end
def rjit_cancel_all(reason)
@@ -1139,6 +1139,19 @@ module RubyVM::RJIT # :nodoc: all
)
end
+ def C.rb_rjit_options
+ @rb_rjit_options ||= CType::Struct.new(
+ "rb_rjit_options", Primitive.cexpr!("SIZEOF(struct rb_rjit_options)"),
+ on: [self._Bool, Primitive.cexpr!("OFFSETOF((*((struct rb_rjit_options *)NULL)), on)")],
+ call_threshold: [CType::Immediate.parse("unsigned int"), Primitive.cexpr!("OFFSETOF((*((struct rb_rjit_options *)NULL)), call_threshold)")],
+ exec_mem_size: [CType::Immediate.parse("unsigned int"), Primitive.cexpr!("OFFSETOF((*((struct rb_rjit_options *)NULL)), exec_mem_size)")],
+ stats: [self._Bool, Primitive.cexpr!("OFFSETOF((*((struct rb_rjit_options *)NULL)), stats)")],
+ trace_exits: [self._Bool, Primitive.cexpr!("OFFSETOF((*((struct rb_rjit_options *)NULL)), trace_exits)")],
+ dump_disasm: [self._Bool, Primitive.cexpr!("OFFSETOF((*((struct rb_rjit_options *)NULL)), dump_disasm)")],
+ pause: [self._Bool, Primitive.cexpr!("OFFSETOF((*((struct rb_rjit_options *)NULL)), pause)")],
+ )
+ end
+
def C.rb_rjit_runtime_counters
@rb_rjit_runtime_counters ||= CType::Struct.new(
"rb_rjit_runtime_counters", Primitive.cexpr!("SIZEOF(struct rb_rjit_runtime_counters)"),
@@ -1301,19 +1314,6 @@ module RubyVM::RJIT # :nodoc: all
)
end
- def C.rjit_options
- @rjit_options ||= CType::Struct.new(
- "rjit_options", Primitive.cexpr!("SIZEOF(struct rjit_options)"),
- on: [self._Bool, Primitive.cexpr!("OFFSETOF((*((struct rjit_options *)NULL)), on)")],
- call_threshold: [CType::Immediate.parse("unsigned int"), Primitive.cexpr!("OFFSETOF((*((struct rjit_options *)NULL)), call_threshold)")],
- exec_mem_size: [CType::Immediate.parse("unsigned int"), Primitive.cexpr!("OFFSETOF((*((struct rjit_options *)NULL)), exec_mem_size)")],
- stats: [self._Bool, Primitive.cexpr!("OFFSETOF((*((struct rjit_options *)NULL)), stats)")],
- trace_exits: [self._Bool, Primitive.cexpr!("OFFSETOF((*((struct rjit_options *)NULL)), trace_exits)")],
- dump_disasm: [self._Bool, Primitive.cexpr!("OFFSETOF((*((struct rjit_options *)NULL)), dump_disasm)")],
- pause: [self._Bool, Primitive.cexpr!("OFFSETOF((*((struct rjit_options *)NULL)), pause)")],
- )
- end
-
def C.VALUE
@VALUE ||= CType::Immediate.find(Primitive.cexpr!("SIZEOF(VALUE)"), Primitive.cexpr!("SIGNED_TYPE_P(VALUE)"))
end