shift code from class to module
as class derives from module, module carries much of the code that one thinks of as class class only handles allocation really
This commit is contained in:
@ -16,12 +16,6 @@ module Parfait
|
||||
# These are the same functions that Builtin implements at run-time
|
||||
class Object
|
||||
include FakeMem
|
||||
def self.new_object *args
|
||||
# Space.space.get_class_by_name(:Word)
|
||||
#puts "I am #{self}"
|
||||
object = self.new(*args)
|
||||
object
|
||||
end
|
||||
# these internal functions are _really_ internal
|
||||
# they respresent the smallest code needed to build larger functionality
|
||||
# but should _never_ be used outside parfait. in fact that should be impossible
|
||||
|
@ -134,7 +134,7 @@ module Virtual
|
||||
def boot_classes!
|
||||
values = [ "Integer" , "Object" , "Value" , "Kernel"]
|
||||
rest = ["Word" , "Class" , "Dictionary" , "Space" , "List", "Layout"]
|
||||
(values + rest).each { |cl| @space.create_class(cl , []) }
|
||||
(values + rest).each { |cl| @space.create_class(cl) }
|
||||
value_class = @space.get_class_by_name "Value"
|
||||
@space.get_class_by_name("Integer").set_super_class( value_class )
|
||||
object_class = @space.get_class_by_name("Object")
|
||||
|
Reference in New Issue
Block a user