push the name down into callable

blocks need a name too
if just for debug, and stacks
This commit is contained in:
Torsten Ruger
2018-07-30 10:21:43 +03:00
parent 1cb07a4164
commit 4055709529
8 changed files with 25 additions and 18 deletions

View File

@ -13,11 +13,14 @@ module Parfait
class Callable < Object
attr_reader :self_type , :arguments_type , :frame_type , :binary
attr_reader :blocks, :next
def initialize( self_type , arguments_type , frame_type)
attr_reader :blocks, :next , :name
def initialize( name , self_type , arguments_type , frame_type)
super()
raise "No class #{self}" unless self_type
raise "For type, not class #{self_type}" unless self_type.is_a?(Type)
raise "Mixup" unless name.is_a?(Symbol)
@name = name
@self_type = self_type
init(arguments_type, frame_type)
end