From aaf6da88080d4b5a17e8cf6c6ef0cd72070b1d8a Mon Sep 17 00:00:00 2001 From: Torsten Ruger Date: Wed, 8 Apr 2015 20:33:15 +0300 Subject: [PATCH] make object derivation explicit in parfait --- lib/parfait/array.rb | 2 +- lib/parfait/class.rb | 2 +- lib/parfait/frame.rb | 2 +- lib/parfait/hash.rb | 2 +- lib/parfait/message.rb | 2 +- lib/parfait/page.rb | 2 +- lib/parfait/space.rb | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) diff --git a/lib/parfait/array.rb b/lib/parfait/array.rb index 91ec5e4d..96a1ac28 100644 --- a/lib/parfait/array.rb +++ b/lib/parfait/array.rb @@ -1,5 +1,5 @@ -class Array < BaseObject +class Array < Object #many basic array functions can not be defined in ruby, such as # get/set/length/add/delete # so they must be defined as CompiledMethods in Builtin::Kernel diff --git a/lib/parfait/class.rb b/lib/parfait/class.rb index c6f712e0..c27ee133 100644 --- a/lib/parfait/class.rb +++ b/lib/parfait/class.rb @@ -13,6 +13,6 @@ # In fact this property is implemented in the Object, as methods # may be added to any object at run-time -class Class +class Class < Object end diff --git a/lib/parfait/frame.rb b/lib/parfait/frame.rb index 49edb173..d0419674 100644 --- a/lib/parfait/frame.rb +++ b/lib/parfait/frame.rb @@ -4,6 +4,6 @@ # It allows for access to those variables basically -class Frame +class Frame < Object end diff --git a/lib/parfait/hash.rb b/lib/parfait/hash.rb index 2875c77d..8c5747c2 100644 --- a/lib/parfait/hash.rb +++ b/lib/parfait/hash.rb @@ -1,6 +1,6 @@ # almost simplest hash imaginable. make good use of arrays -class Hash +class Hash < Object def initialize @keys = Array.new() @values = Array.new() diff --git a/lib/parfait/message.rb b/lib/parfait/message.rb index 65f2533a..ddd3f02d 100644 --- a/lib/parfait/message.rb +++ b/lib/parfait/message.rb @@ -2,7 +2,7 @@ # A message is what is sent when you invoke a method. Args and stuff are packed up in to a Message # and the Message is sent to the receiver. -class Message +class Message < Object def get_type_for(name) index = @layout.get_index(name) diff --git a/lib/parfait/page.rb b/lib/parfait/page.rb index 51802eb4..6c9c299e 100644 --- a/lib/parfait/page.rb +++ b/lib/parfait/page.rb @@ -8,6 +8,6 @@ # object. The smallest object is usually a cache line, 16 bytes or # an exponent of two larger. -class Page +class Page < Object end diff --git a/lib/parfait/space.rb b/lib/parfait/space.rb index e3c03b8e..babe15ec 100644 --- a/lib/parfait/space.rb +++ b/lib/parfait/space.rb @@ -8,6 +8,6 @@ # "New" is slightly misleading in that normal operation only ever # recycles objects. -class Space +class Space < Object end