a long string of import order and namespace issues which is not over yet
This commit is contained in:
@ -25,17 +25,19 @@ module Virtual
|
||||
@messages = 100.times.collect{ ::Message.new } + frames
|
||||
@next_message = @messages.first
|
||||
@next_frame = frames.first
|
||||
@passes = [ Virtual::SendImplementation ]
|
||||
@passes = [ "Virtual::SendImplementation" ]
|
||||
end
|
||||
attr_reader :main , :classes , :objects , :symbols,:messages, :next_message , :next_frame
|
||||
|
||||
def run_passes
|
||||
@passes.each do |pass|
|
||||
@passes.each do |pass_class|
|
||||
all = main.blocks
|
||||
@classes.values.each do |c|
|
||||
c.instance_methods.each {|f| all += f.blocks }
|
||||
end
|
||||
all.each do |block|
|
||||
pass = eval pass_class
|
||||
raise "no such pass-class as #{pass_class}" unless pass
|
||||
pass.new.run(block)
|
||||
end
|
||||
end
|
||||
@ -46,7 +48,6 @@ module Virtual
|
||||
@@space
|
||||
else
|
||||
@@space = BootSpace.new
|
||||
@@space.boot_classes! # boot is a verb here
|
||||
@@space
|
||||
end
|
||||
end
|
||||
@ -57,7 +58,7 @@ module Virtual
|
||||
|
||||
def add_pass_after( pass , after)
|
||||
index = @passes.index(after)
|
||||
raise "No such pass to add after: #{after}" unless index
|
||||
raise "No such pass (#{pass}) to add after: #{after}" unless index
|
||||
@passes.insert(index+1 , pass)
|
||||
end
|
||||
def add_pass_before( pass , after)
|
||||
|
@ -41,6 +41,7 @@ module Virtual
|
||||
|
||||
def self.boot
|
||||
machine = Machine.new
|
||||
BootSpace.space.boot_classes! # boot is a verb here
|
||||
machine.boot
|
||||
machine
|
||||
end
|
||||
@ -87,5 +88,5 @@ require_relative "passes/send_implementation"
|
||||
require_relative "passes/get_implementation"
|
||||
require_relative "passes/frame_implementation"
|
||||
|
||||
Sof.Volotile.add(Virtual::Block , [:method])
|
||||
Sof.Volotile.add(Virtual::CompiledMethod , [:current])
|
||||
Sof::Volotile.add(Virtual::Block , [:method])
|
||||
Sof::Volotile.add(Virtual::CompiledMethod , [:current])
|
||||
|
@ -47,5 +47,5 @@ module Virtual
|
||||
end
|
||||
end
|
||||
end
|
||||
Virtual::BootSpace.space.add_pass_after FrameImplementation , GetImplementation
|
||||
Virtual::BootSpace.space.add_pass_after "Virtual::FrameImplementation" , "Virtual::GetImplementation"
|
||||
end
|
||||
|
@ -11,5 +11,5 @@ module Virtual
|
||||
end
|
||||
end
|
||||
end
|
||||
Virtual::BootSpace.space.add_pass_after GetImplementation, SendImplementation
|
||||
Virtual::BootSpace.space.add_pass_after "Virtual::GetImplementation", "Virtual::SendImplementation"
|
||||
end
|
||||
|
Reference in New Issue
Block a user