This commit is contained in:
Torsten Ruger 2014-06-12 21:27:47 +03:00
parent 6d6c7ddb68
commit dcd691fe00
2 changed files with 2 additions and 2 deletions

View File

@ -76,7 +76,7 @@ module Arm
def main_start context def main_start context
entry = Vm::Block.new("main_entry",nil,nil) entry = Vm::Block.new("main_entry",nil,nil)
entry.do_add mov( :fp , 0 ) entry.do_add mov( :fp , 0 )
entry.do_add call( context.function.entry ) entry.do_add call( context.function )
entry entry
end end
def main_exit context def main_exit context

View File

@ -27,7 +27,7 @@ module Ast
call.load_args into call.load_args into
call.do_call into call.do_call into
after = into.new_block("call#{@@counter+=1}") after = into.new_block("#{name}#{@@counter+=1}")
into.insert_at after into.insert_at after
into.pop([]) unless current_function.nil? into.pop([]) unless current_function.nil?
puts "compile call #{function.return_type}" puts "compile call #{function.return_type}"