summaryrefslogtreecommitdiff
path: root/rjit_c.rb
diff options
context:
space:
mode:
authoreileencodes <eileencodes@gmail.com>2023-04-04 13:18:13 -0400
committerAaron Patterson <aaron.patterson@gmail.com>2023-04-11 10:47:58 -0700
commitce99e50ede4e4981d7b008bbe17f72fa351a5978 (patch)
tree2d67273d3cc5076f3118918c41dbe6f57802eeb0 /rjit_c.rb
parentb4571097df4a6bd848f1195026d82a92f3a7f9d8 (diff)
downloadruby-ce99e50ede4e4981d7b008bbe17f72fa351a5978.tar.gz
Move `catch_except_p` to `compile_data`
The `catch_except_p` flag is used for communicating between parent and child iseq's that a throw instruction was emitted. So for example if a child iseq has a throw in it and the parent wants to catch the throw, we use this flag to communicate to the parent iseq that a throw instruction was emitted. This flag is only useful at compile time, it only impacts the compilation process so it seems to be fine to move it from the iseq body to the compile_data struct. Co-authored-by: Aaron Patterson <tenderlove@ruby-lang.org>
Diffstat (limited to 'rjit_c.rb')
-rw-r--r--rjit_c.rb9
1 files changed, 4 insertions, 5 deletions
diff --git a/rjit_c.rb b/rjit_c.rb
index 917e0f8772..591b53b89c 100644
--- a/rjit_c.rb
+++ b/rjit_c.rb
@@ -1159,7 +1159,6 @@ module RubyVM::RJIT # :nodoc: all
icvarc_size: [CType::Immediate.parse("unsigned int"), Primitive.cexpr!("OFFSETOF((*((struct rb_iseq_constant_body *)NULL)), icvarc_size)")],
ci_size: [CType::Immediate.parse("unsigned int"), Primitive.cexpr!("OFFSETOF((*((struct rb_iseq_constant_body *)NULL)), ci_size)")],
stack_max: [CType::Immediate.parse("unsigned int"), Primitive.cexpr!("OFFSETOF((*((struct rb_iseq_constant_body *)NULL)), stack_max)")],
- catch_except_p: [self._Bool, Primitive.cexpr!("OFFSETOF((*((struct rb_iseq_constant_body *)NULL)), catch_except_p)")],
builtin_attrs: [CType::Immediate.parse("unsigned int"), Primitive.cexpr!("OFFSETOF((*((struct rb_iseq_constant_body *)NULL)), builtin_attrs)")],
mark_bits: [CType::Union.new(
"", Primitive.cexpr!("SIZEOF(((struct rb_iseq_constant_body *)NULL)->mark_bits)"),
@@ -1599,10 +1598,6 @@ module RubyVM::RJIT # :nodoc: all
CType::Stub.new(:rb_snum_t)
end
- def C._Bool
- CType::Bool.new
- end
-
def C.iseq_bits_t
CType::Stub.new(:iseq_bits_t)
end
@@ -1631,6 +1626,10 @@ module RubyVM::RJIT # :nodoc: all
CType::Stub.new(:rb_method_refined_t)
end
+ def C._Bool
+ CType::Bool.new
+ end
+
def C.ccan_list_node
CType::Stub.new(:ccan_list_node)
end