fold last of the virtual into register
This commit is contained in:
@ -34,10 +34,10 @@ module Phisol
|
||||
end
|
||||
|
||||
# now we have to resolve the method name (+ receiver) into a callable method
|
||||
clazz = Virtual.machine.space.get_class_by_name(me.type)
|
||||
clazz = Register.machine.space.get_class_by_name(me.type)
|
||||
raise "No such class #{me.type}" unless clazz
|
||||
method = clazz.get_instance_method(name)
|
||||
#puts Virtual.machine.space.get_class_by_name(:Integer).method_names.to_a
|
||||
#puts Register.machine.space.get_class_by_name(:Integer).method_names.to_a
|
||||
raise "Method not implemented #{me.type}.#{name}" unless method
|
||||
Register.issue_call( @method , method )
|
||||
ret = use_reg( method.source.return_type )
|
||||
|
@ -19,7 +19,7 @@ module Phisol
|
||||
if( r != :self)
|
||||
raise "unimplemented case in function #{r}"
|
||||
else
|
||||
r = Virtual::Self.new()
|
||||
r = Register::Self.new()
|
||||
class_name = method.for_class.name
|
||||
end
|
||||
end
|
||||
@ -34,7 +34,7 @@ module Phisol
|
||||
#TODO check args / type compatibility
|
||||
@method.source.init @method
|
||||
else
|
||||
@method = Virtual::MethodSource.create_method(class_name, return_type, name , args )
|
||||
@method = Register::MethodSource.create_method(class_name, return_type, name , args )
|
||||
@method.for_class.add_instance_method @method
|
||||
end
|
||||
@method.source.receiver = r
|
||||
|
Reference in New Issue
Block a user