more work on send

This commit is contained in:
Torsten Ruger
2014-08-22 09:21:59 +03:00
parent 5b1e86da49
commit b305a56576
6 changed files with 21 additions and 16 deletions

View File

@ -12,7 +12,7 @@ module Boot
@super_class_name = super_class_name.to_sym
@meta_class = MetaClass.new(self)
end
attr_reader :name , :methods , :meta_class , :context , :super_class_name
attr_reader :name , :method_definitions , :meta_class , :context , :super_class_name
def add_method_definition method
raise "not a method #{method.class} #{method.inspect}" unless method.is_a? Virtual::MethodDefinition
raise "syserr " unless method.name.is_a? Symbol

View File

@ -3,7 +3,7 @@ require "boot/boot_class"
require "kernel/all"
require "boot/object"
require "boot/string"
require "trickle/send"
module Boot
# The BootSpace contains all objects for a program. In functional terms it is a program, but in oo
# it is a collection of objects, some of which are data, some classes, some functions
@ -25,7 +25,7 @@ module Boot
#global objects (data)
@objects = []
boot_classes
@passes = [ ]
@passes = [ Trickle::Send ]
end
attr_reader :context , :main , :classes , :entry , :exit
@ -33,10 +33,10 @@ module Boot
@passes.each do |pass|
all = main.blocks
@classes.each_value do |c|
c.functions.each {|f| all += f.blocks }
c.method_definitions.each {|f| all += f.blocks }
end
all.each do |block|
pass.run(block)
pass.new.run(block)
end
end
end