summaryrefslogtreecommitdiff
path: root/yjit/src/cruby.rs
diff options
context:
space:
mode:
authorAaron Patterson <[email protected]>2022-09-30 16:01:50 -0700
committerAaron Patterson <[email protected]>2022-09-30 16:01:50 -0700
commit9a6803c90b817f70389cae10d60b50ad752da48f ()
treefd03366733e1d8198c74592474adf18bb841b1a5 /yjit/src/cruby.rs
parent0ab0229c1162308509b36cafbf6eaafd7ae054d7 (diff)
Revert "This commit implements the Object Shapes technique in CRuby."
This reverts commit 68bc9e2e97d12f80df0d113e284864e225f771c2.
-rw-r--r--yjit/src/cruby.rs12
1 files changed, 2 insertions, 10 deletions
@@ -120,7 +120,7 @@ extern "C" {
obj: VALUE,
v: VALUE,
) -> bool;
- pub fn rb_vm_set_ivar_id(obj: VALUE, idx: u32, val: VALUE) -> VALUE;
pub fn rb_vm_setinstancevariable(iseq: IseqPtr, obj: VALUE, id: ID, val: VALUE, ic: IVC);
pub fn rb_aliased_callable_method_entry(
me: *const rb_callable_method_entry_t,
@@ -354,26 +354,18 @@ impl VALUE {
/// Read the flags bits from the RBasic object, then return a Ruby type enum (e.g. RUBY_T_ARRAY)
pub fn builtin_type(self) -> ruby_value_type {
- (self.builtin_flags() & (RUBY_T_MASK as usize)) as ruby_value_type
- }
-
- pub fn builtin_flags(self) -> usize {
assert!(!self.special_const_p());
let VALUE(cval) = self;
let rbasic_ptr = cval as *const RBasic;
let flags_bits: usize = unsafe { (*rbasic_ptr).flags }.as_usize();
- return flags_bits;
}
pub fn class_of(self) -> VALUE {
unsafe { CLASS_OF(self) }
}
- pub fn shape_of(self) -> u32 {
- unsafe { rb_shape_get_shape_id(self) }
- }
-
pub fn as_isize(self) -> isize {
let VALUE(is) = self;
is as isize