diff options
author | Jean Boussier <[email protected]> | 2025-06-04 09:05:55 +0200 |
---|---|---|
committer | Jean Boussier <[email protected]> | 2025-06-04 13:13:50 +0200 |
commit | 675f33508cc08cbd17ff8dc1b14bbbe256a709ba (patch) | |
tree | 297157b7801b54afd789a032b616f15f8d16e671 /zjit/src | |
parent | 8d49c05c134702c321198b70fbbf34dd80cc1ba6 (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 'zjit/src')
-rw-r--r-- | zjit/src/cruby.rs | 2 | ||||
-rw-r--r-- | zjit/src/cruby_bindings.inc.rs | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/zjit/src/cruby.rs b/zjit/src/cruby.rs index e57926014f..d5be47e026 100644 --- a/zjit/src/cruby.rs +++ b/zjit/src/cruby.rs @@ -478,7 +478,7 @@ impl VALUE { } pub fn shape_too_complex(self) -> bool { - unsafe { rb_shape_obj_too_complex_p(self) } + unsafe { rb_zjit_shape_obj_too_complex_p(self) } } pub fn shape_id_of(self) -> u32 { diff --git a/zjit/src/cruby_bindings.inc.rs b/zjit/src/cruby_bindings.inc.rs index 95fb8c5213..58e8d40493 100644 --- a/zjit/src/cruby_bindings.inc.rs +++ b/zjit/src/cruby_bindings.inc.rs @@ -868,7 +868,6 @@ unsafe extern "C" { pub fn rb_shape_lookup(shape_id: shape_id_t) -> *mut rb_shape_t; pub fn rb_obj_shape_id(obj: VALUE) -> shape_id_t; pub fn rb_shape_get_iv_index(shape_id: shape_id_t, id: ID, value: *mut attr_index_t) -> bool; - pub fn rb_shape_obj_too_complex_p(obj: VALUE) -> bool; pub fn rb_shape_transition_add_ivar_no_warnings(obj: VALUE, id: ID) -> shape_id_t; pub fn rb_gvar_get(arg1: ID) -> VALUE; pub fn rb_gvar_set(arg1: ID, arg2: VALUE) -> VALUE; @@ -945,6 +944,7 @@ unsafe extern "C" { pub fn rb_iseq_get_zjit_payload(iseq: *const rb_iseq_t) -> *mut ::std::os::raw::c_void; pub fn rb_iseq_set_zjit_payload(iseq: *const rb_iseq_t, payload: *mut ::std::os::raw::c_void); pub fn rb_zjit_print_exception(); + pub fn rb_zjit_shape_obj_too_complex_p(obj: VALUE) -> bool; pub fn rb_iseq_encoded_size(iseq: *const rb_iseq_t) -> ::std::os::raw::c_uint; pub fn rb_iseq_pc_at_idx(iseq: *const rb_iseq_t, insn_idx: u32) -> *mut VALUE; pub fn rb_iseq_opcode_at_pc(iseq: *const rb_iseq_t, pc: *const VALUE) -> ::std::os::raw::c_int; |