summaryrefslogtreecommitdiff
path: root/zjit
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 ()
tree297157b7801b54afd789a032b616f15f8d16e671 /zjit
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: Merged: https://.com/ruby/ruby/pull/13511
-rw-r--r--zjit/bindgen/src/main.rs2
-rw-r--r--zjit/src/cruby.rs2
-rw-r--r--zjit/src/cruby_bindings.inc.rs2
3 files changed, 3 insertions, 3 deletions
@@ -112,7 +112,7 @@ fn main() {
.allowlist_function("rb_shape_id_offset")
.allowlist_function("rb_shape_get_iv_index")
.allowlist_function("rb_shape_transition_add_ivar_no_warnings")
- .allowlist_function("rb_shape_obj_too_complex_p")
.allowlist_var("SHAPE_ID_NUM_BITS")
// From ruby/internal/intern/object.h
@@ -478,7 +478,7 @@ impl VALUE {
}
pub fn shape_too_complex(self) -> bool {
- unsafe { rb_shape_obj_too_complex_p(self) }
}
pub fn shape_id_of(self) -> u32 {
@@ -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_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;