From d189f8d870aee69e43697415a4840a4d9cdf5a62 Mon Sep 17 00:00:00 2001 From: Takashi Kokubun Date: Sat, 18 Mar 2023 21:27:07 -0700 Subject: RJIT: Prefix rjit_options with rb_ --- rjit_c.rb | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) (limited to 'rjit_c.rb') 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 -- cgit v1.2.1