rename (corrected) method def to instance methods in class
This commit is contained in:
@ -40,7 +40,7 @@ module Ast
|
||||
if method.has_var(name)
|
||||
message.compile_get(method , name )
|
||||
else
|
||||
raise "Unimplemented"
|
||||
raise "Unimplemented #{self}"
|
||||
message.compile_send( method , name , Virtual::Self.new( Virtual::Mystery ) )
|
||||
end
|
||||
end
|
||||
|
@ -10,7 +10,7 @@ module Ast
|
||||
new_method = Virtual::MethodDefinition.new(name , args , r )
|
||||
new_method.class_name = r.is_a?(Boot::BootClass) ? r.name : method.class_name
|
||||
clazz = Virtual::Object.space.get_or_create_class(new_method.class_name)
|
||||
clazz.add_method_definition new_method
|
||||
clazz.add_instance_method new_method
|
||||
|
||||
#frame = frame.new_frame
|
||||
return_type = nil
|
||||
|
@ -29,7 +29,7 @@ module Ast
|
||||
raise "only functions for now #{expression.inspect}" unless expression.is_a? Ast::FunctionExpression
|
||||
#puts "compiling expression #{expression}"
|
||||
expression_value = expression.compile(method,message )
|
||||
clazz.add_method_definition(expression_value)
|
||||
clazz.add_instance_method(expression_value)
|
||||
#puts "compiled expression #{expression_value.inspect}"
|
||||
end
|
||||
|
||||
|
Reference in New Issue
Block a user