use more instances in parfait

and misc
This commit is contained in:
2019-09-10 12:33:57 +03:00
parent c3c2ab606c
commit 63323376e4
10 changed files with 54 additions and 46 deletions

View File

@ -27,13 +27,13 @@ module Parfait
raise "Empty bod" if(@source.is_a?(Vool::Statements) and @source.empty?)
end
def create_callable_method( type )
def create_callable_method_for( type )
raise "create_method #{type.inspect} is not a Type" unless type.is_a? Parfait::Type
type.create_method( @name , @args_type , @frame_type)
end
def compiler_for(self_type)
callable_method = create_callable_method(self_type)
callable_method = create_callable_method_for(self_type)
compiler = Mom::MethodCompiler.new( callable_method )
head = @source.to_mom( compiler )
compiler.add_code(head)