summaryrefslogtreecommitdiff
path: root/yjit.c
diff options
context:
space:
mode:
authorJean Boussier <[email protected]>2025-06-04 09:05:55 +0200
committerJean Boussier <[email protected]>2025-06-04 13:13:50 +0200
commit675f33508cc08cbd17ff8dc1b14bbbe256a709ba (patch)
tree297157b7801b54afd789a032b616f15f8d16e671 /yjit.c
parent8d49c05c134702c321198b70fbbf34dd80cc1ba6 (diff)
Get rid of TOO_COMPLEX shape type
Instead it's now a `shape_id` flag. This allows to check if an object is complex without having to chase the `rb_shape_t` pointer.
Notes
Notes: Merged: https://github.com/ruby/ruby/pull/13511
Diffstat (limited to 'yjit.c')
-rw-r--r--yjit.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/yjit.c b/yjit.c
index 95b5f1f2f0..d1fb97cea4 100644
--- a/yjit.c
+++ b/yjit.c
@@ -781,6 +781,18 @@ rb_object_shape_count(void)
return ULONG2NUM((unsigned long)GET_SHAPE_TREE()->next_shape_id);
}
+bool
+rb_yjit_shape_too_complex_p(shape_id_t shape_id)
+{
+ return rb_shape_too_complex_p(shape_id);
+}
+
+bool
+rb_yjit_shape_obj_too_complex_p(VALUE obj)
+{
+ return rb_shape_obj_too_complex_p(obj);
+}
+
// Assert that we have the VM lock. Relevant mostly for multi ractor situations.
// The GC takes the lock before calling us, and this asserts that it indeed happens.
void