and another one, and another one....
This commit is contained in:
@ -35,9 +35,9 @@ module Ast
|
||||
# this makes the namespace static, ie when eval and co are implemented method needs recompilation
|
||||
def compile frame , method
|
||||
if method.has_var(name)
|
||||
frame.compile_get(name , method )
|
||||
frame.compile_get(method , name )
|
||||
else
|
||||
frame.compile_send( name , method )
|
||||
frame.compile_send( method , name )
|
||||
end
|
||||
end
|
||||
end
|
||||
|
@ -5,6 +5,11 @@ module Ast
|
||||
# attr_reader :name, :args , :receiver
|
||||
@@counter = 0
|
||||
def compile frame , method
|
||||
with = args.collect{|a| a.compile(frame , method)}
|
||||
frame.compile_send( method , @name , with )
|
||||
end
|
||||
|
||||
def scratch
|
||||
into = context.function
|
||||
params = args.collect{ |a| a.compile(context) }
|
||||
puts "compiling receiver #{receiver} (call #{name})"
|
||||
|
Reference in New Issue
Block a user