fix method seperation
Since Compiled method split into Method and CompiledMethodInfo (parfait/vm) lots of call syntax changes
This commit is contained in:
@ -48,17 +48,17 @@ module Parfait
|
||||
end
|
||||
|
||||
def get_instance_method fname
|
||||
fname = fname.to_sym
|
||||
raise "uups #{fname}.#{fname.class}" unless fname.is_a? Word
|
||||
@instance_methods.detect{ |fun| fun.name == fname }
|
||||
end
|
||||
|
||||
# get the method and if not found, try superclasses. raise error if not found
|
||||
def resolve_method m_name
|
||||
raise "uups #{m_name}.#{m_name.class}" unless m_name.is_a? Word
|
||||
method = get_instance_method(m_name)
|
||||
unless method
|
||||
unless( @name == "Object" )
|
||||
supr = Space.space.get_class_by_name(@super_class_name)
|
||||
method = supr.resolve_method(m_name)
|
||||
method = @super_class.resolve_method(m_name)
|
||||
end
|
||||
end
|
||||
raise "Method not found #{m_name}, for #{@name}" unless method
|
||||
|
@ -31,13 +31,9 @@ module Parfait
|
||||
# all is good after this init
|
||||
#global objects (data)
|
||||
@objects = Parfait::List.new_object
|
||||
#@symbols = Parfait::List.new_object
|
||||
end
|
||||
attr_reader :classes , :objects , :symbols, :messages, :next_message , :next_frame
|
||||
|
||||
@@SPACE = { :names => [:classes,:objects,:symbols,:messages, :next_message , :next_frame] ,
|
||||
:types => [Virtual::Reference,Virtual::Reference,Virtual::Reference,Virtual::Reference,Virtual::Reference]}
|
||||
|
||||
# need a two phase init for the object space (and generally parfait) because the space
|
||||
# is an interconnected graph, so not everthing is ready
|
||||
def late_init
|
||||
@ -46,9 +42,6 @@ module Parfait
|
||||
@next_message = @messages.first
|
||||
@next_frame = @frames.first
|
||||
end
|
||||
def old_layout
|
||||
@@SPACE
|
||||
end
|
||||
|
||||
@@object_space = nil
|
||||
# Make the object space globally available
|
||||
@ -64,9 +57,6 @@ module Parfait
|
||||
def add_object o
|
||||
return if @objects.include?(o)
|
||||
@objects.push o
|
||||
if o.is_a? Symbol
|
||||
@symbols << o
|
||||
end
|
||||
end
|
||||
|
||||
# this is the way to instantiate classes (not Parfait::Class.new)
|
||||
|
Reference in New Issue
Block a user