From bb3d211c0424b0b5cf6c9536d1c5256c74a8dde5 Mon Sep 17 00:00:00 2001 From: Torsten Ruger Date: Sun, 25 Oct 2015 20:44:30 +0200 Subject: [PATCH] layout moves to 0 no more type word, only layout --- lib/parfait/object.rb | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/lib/parfait/object.rb b/lib/parfait/object.rb index 05e462c0..6001953d 100644 --- a/lib/parfait/object.rb +++ b/lib/parfait/object.rb @@ -13,9 +13,8 @@ module Parfait class Object < Value - TYPE_WORD = 0 - LAYOUT_INDEX = 1 - CLASS_INDEX = 2 #only used in class, but keep constants together + LAYOUT_INDEX = 0 + CLASS_INDEX = 1 #only used in class, but keep constants together def self.new *args object = self.allocate @@ -43,13 +42,6 @@ module Parfait self.object_id == other.object_id end - def get_type_of( index ) - type_word = internal_object_get( TYPE_WORD ) - res = type_word >> (index*4) - # least significant nibble, this is still adhoc, not tested. but the idea is there - res & 0xF - end - # This is the crux of the object system. The class of an object is stored in the objects # memory (as opposed to an integer that has no memory and so always has the same class) #