mirror of
https://github.com/ruby/ruby.git
synced 2025-08-15 13:39:04 +02:00
Rename rb_shape_get_shape_id
-> RB_OBJ_SHAPE_ID
And `rb_shape_get_shape` -> `RB_OBJ_SHAPE`.
This commit is contained in:
parent
a007575497
commit
5782561fc1
Notes:
git
2025-05-09 08:23:07 +00:00
14 changed files with 46 additions and 46 deletions
|
@ -94,7 +94,7 @@ fn main() {
|
|||
.allowlist_function("rb_bug")
|
||||
|
||||
// From shape.h
|
||||
.allowlist_function("rb_shape_get_shape_id")
|
||||
.allowlist_function("RB_OBJ_SHAPE_ID")
|
||||
.allowlist_function("RSHAPE")
|
||||
.allowlist_function("rb_shape_id_offset")
|
||||
.allowlist_function("rb_shape_get_iv_index")
|
||||
|
|
|
@ -2909,7 +2909,7 @@ fn gen_get_ivar(
|
|||
// Compile time self is embedded and the ivar index lands within the object
|
||||
let embed_test_result = unsafe { FL_TEST_RAW(comptime_receiver, VALUE(ROBJECT_EMBED.as_usize())) != VALUE(0) };
|
||||
|
||||
let expected_shape = unsafe { rb_shape_get_shape_id(comptime_receiver) };
|
||||
let expected_shape = unsafe { RB_OBJ_SHAPE_ID(comptime_receiver) };
|
||||
let shape_id_offset = unsafe { rb_shape_id_offset() };
|
||||
let shape_opnd = Opnd::mem(SHAPE_ID_NUM_BITS as u8, recv, shape_id_offset);
|
||||
|
||||
|
@ -3187,7 +3187,7 @@ fn gen_set_ivar(
|
|||
// Upgrade type
|
||||
guard_object_is_heap(asm, recv, recv_opnd, Counter::setivar_not_heap);
|
||||
|
||||
let expected_shape = unsafe { rb_shape_get_shape_id(comptime_receiver) };
|
||||
let expected_shape = unsafe { RB_OBJ_SHAPE_ID(comptime_receiver) };
|
||||
let shape_id_offset = unsafe { rb_shape_id_offset() };
|
||||
let shape_opnd = Opnd::mem(SHAPE_ID_NUM_BITS as u8, recv, shape_id_offset);
|
||||
|
||||
|
|
|
@ -445,7 +445,7 @@ impl VALUE {
|
|||
}
|
||||
|
||||
pub fn shape_id_of(self) -> u32 {
|
||||
unsafe { rb_shape_get_shape_id(self) }
|
||||
unsafe { RB_OBJ_SHAPE_ID(self) }
|
||||
}
|
||||
|
||||
pub fn shape_of(self) -> *mut rb_shape {
|
||||
|
|
2
yjit/src/cruby_bindings.inc.rs
generated
2
yjit/src/cruby_bindings.inc.rs
generated
|
@ -1089,7 +1089,7 @@ extern "C" {
|
|||
pub fn rb_ec_stack_check(ec: *mut rb_execution_context_struct) -> ::std::os::raw::c_int;
|
||||
pub fn rb_shape_id_offset() -> i32;
|
||||
pub fn RSHAPE(shape_id: shape_id_t) -> *mut rb_shape_t;
|
||||
pub fn rb_shape_get_shape_id(obj: VALUE) -> shape_id_t;
|
||||
pub fn RB_OBJ_SHAPE_ID(obj: VALUE) -> shape_id_t;
|
||||
pub fn rb_shape_get_iv_index(shape: *mut rb_shape_t, id: ID, value: *mut attr_index_t) -> bool;
|
||||
pub fn rb_shape_obj_too_complex_p(obj: VALUE) -> bool;
|
||||
pub fn rb_shape_too_complex_p(shape: *mut rb_shape_t) -> bool;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue