get some old builtin code backonline and improve imports
This commit is contained in:
@ -28,7 +28,7 @@ module Virtual
|
||||
|
||||
# get the method and if not found, try superclasses. raise error if not found
|
||||
def resolve_method name
|
||||
fun = get_method name
|
||||
fun = get_instance_method name
|
||||
unless fun or name == :Object
|
||||
supr = @context.object_space.get_or_create_class(@super_class_name)
|
||||
fun = supr.get_method name
|
||||
|
@ -43,6 +43,7 @@ module Virtual
|
||||
else
|
||||
@@space = BootSpace.new
|
||||
@@space.boot_classes! # boot is a verb here
|
||||
@@space
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -160,7 +160,7 @@ module Virtual
|
||||
# to the current block
|
||||
# also symbols are supported and wrapped as register usages (for bare metal programming)
|
||||
def method_missing(meth, *args, &block)
|
||||
add_code Register::RegisterMachine.instance.send(meth , *args)
|
||||
add_code ::Register::RegisterMachine.instance.send(meth , *args)
|
||||
end
|
||||
|
||||
# position of the function is the position of the entry block, is where we call
|
||||
|
@ -1,4 +1,4 @@
|
||||
module Register
|
||||
module Virtual
|
||||
# This implements instance variable get (not the opposite of Set, such a thing does not exists, their slots)
|
||||
|
||||
# Ivar get needs to acces the layout, find the index of the name, and shuffle the data to return register
|
||||
@ -11,5 +11,5 @@ module Register
|
||||
end
|
||||
end
|
||||
end
|
||||
Virtual::BootSpace.space.add_pass_after GetImplementation, Virtual::SendImplementation
|
||||
Virtual::BootSpace.space.add_pass_after GetImplementation, SendImplementation
|
||||
end
|
||||
|
@ -39,7 +39,7 @@ module Virtual
|
||||
end
|
||||
|
||||
# get the function and if not found, try superclasses. raise error if not found
|
||||
def resolve_function name
|
||||
def resolve_method name
|
||||
fun = get_function name
|
||||
# TODO THE BOOK says is class A derives from B , then the metaclass of A derives from the metaclass of B
|
||||
# just get to it ! (and stop whimpering)
|
||||
|
Reference in New Issue
Block a user