moved boot_class back to virtual (as things get clearer)
This commit is contained in:
parent
7d35732923
commit
41de2b5822
@ -1,4 +1,4 @@
|
|||||||
require "parfait/boot_class"
|
require "virtual/boot_class"
|
||||||
require "kernel/all"
|
require "kernel/all"
|
||||||
|
|
||||||
module Virtual
|
module Virtual
|
||||||
|
@ -3,8 +3,18 @@ module Virtual
|
|||||||
#
|
#
|
||||||
# during compilation objects are module Virtual objects, but during execution they are not scoped
|
# during compilation objects are module Virtual objects, but during execution they are not scoped
|
||||||
#
|
#
|
||||||
# functions on these classes express their functionality as function objects
|
# So compiling/linking/assembly turns ::virtual objects into binary that represents ruby objects at runtime
|
||||||
|
# The equivalence is listed below (i'll try and work on clearer correspondence later)
|
||||||
|
# ::Virtual Runtime / parfait
|
||||||
|
# Object Object
|
||||||
|
# BootClass Class
|
||||||
|
# MetaClass self/Object
|
||||||
|
# BootSpace ObjectSpace
|
||||||
|
# CompiledMethod Function
|
||||||
|
# (ruby)Array Array
|
||||||
|
# String String
|
||||||
class Object
|
class Object
|
||||||
|
# This could be in test, as it is used only there
|
||||||
def == other
|
def == other
|
||||||
return false unless other.class == self.class
|
return false unless other.class == self.class
|
||||||
Sof::Util.attributes(self).each do |a|
|
Sof::Util.attributes(self).each do |a|
|
||||||
@ -27,19 +37,5 @@ module Virtual
|
|||||||
def inspect
|
def inspect
|
||||||
Sof::Writer.write(self)
|
Sof::Writer.write(self)
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
|
||||||
|
|
||||||
class Layout < Object
|
|
||||||
def initialize members
|
|
||||||
@members = members
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
class Class < Object
|
|
||||||
def initialize name , sup = :Object
|
|
||||||
@name = name
|
|
||||||
@super_class = sup
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user