fixing assembly (wip)

main entry is the main problem, still polishing
This commit is contained in:
Torsten Ruger
2015-05-26 20:17:03 +03:00
parent 8413f6b470
commit 96c59ac144
4 changed files with 14 additions and 29 deletions

View File

@ -36,14 +36,12 @@ module Virtual
@parser = Parser::Salama.new
@passes = [ "Virtual::SendImplementation" ]
end
attr_reader :message , :passes , :space , :class_mappings
attr_reader :message , :passes , :space , :class_mappings , :init
def run_passes
#TODO puts "INIT #{@init}"
@passes.each do |pass_class|
puts "run pass #{pass_class}"
blocks = []#[@init] #TODO + @main.blocks
blocks = [@init]
@space.classes.values.each do |c|
c.instance_methods.each do |f|
nb = f.info.blocks
@ -98,8 +96,7 @@ module Virtual
def compile_main bytes
syntax = @parser.parse_with_debug(bytes)
parts = Parser::Transform.new.apply(syntax)
main = Virtual::CompiledMethodInfo.main
Compiler.compile( parts , main )
Compiler.compile( parts , @space.get_main )
end
end
end