fold last of the virtual into register

This commit is contained in:
Torsten Ruger
2015-10-22 18:16:29 +03:00
parent f658ecf425
commit dcbd3c7091
67 changed files with 161 additions and 227 deletions

View File

@ -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 )

View File

@ -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