function test, slow but steady

This commit is contained in:
Torsten Ruger
2014-07-14 14:06:09 +03:00
parent 122452c21b
commit db8b1488d0
7 changed files with 21 additions and 19 deletions

View File

@ -48,7 +48,7 @@ module Ast
clazz = ::Virtual::Object.space.get_or_create_class name
raise "uups #{clazz}.#{name}" unless clazz
#class qualifier, means call from metaclass
clazz = clazz.meta_class
#clazz = clazz.meta_class
clazz
end
end

View File

@ -2,7 +2,9 @@ module Ast
class FunctionExpression < Expression
# attr_reader :name, :params, :body , :receiver
def compile frame , method
method = Virtual::Method.new(name , params )
args = params.collect{ |p| p.compile(frame , method )}
r = receiver ? receiver.compile(frame,method) : Virtual::SelfReference.new
method = Virtual::Method.new(name , params , r )
end
def scratch
args = []