move the pass running out of elf

and leave it up to user
later partial running planned
This commit is contained in:
Torsten Ruger 2015-06-11 07:04:55 +02:00
parent ee6f9d733b
commit 9b89f6cb16
2 changed files with 2 additions and 3 deletions

View File

@ -17,7 +17,6 @@ module Elf
@text = Elf::TextSection.new(".text")
@object.add_section @text
@object_machine.run_passes
assembler = Register::Assembler.new(@object_machine)
set_text assembler.write_as_string

View File

@ -6,11 +6,11 @@ class HelloTest < MiniTest::Test
def check
machine = Virtual::Machine.boot
expressions = machine.compile_main @string_input
puts Sof::Writer.write(machine.space)
machine.run_passes
writer = Elf::ObjectWriter.new(machine)
writer.save "hello.o"
# puts Sof::Writer.write(expressions)
puts Sof::Writer.write(machine.space)
end
def qtest_simplest_function