move space to parfait
Also make the machine the singleton and space hang off it Many repercussions, not all fixed in this commit
This commit is contained in:
@ -16,13 +16,12 @@ module Elf
|
||||
|
||||
@text = Elf::TextSection.new(".text")
|
||||
@object.add_section @text
|
||||
|
||||
|
||||
@object_space.run_passes
|
||||
assembler = Register::Assembler.new(@object_space)
|
||||
set_text assembler.assemble
|
||||
set_text assembler.assemble
|
||||
|
||||
# for debug add labels to the block positions
|
||||
blocks = []
|
||||
# for debug add labels to the block positions
|
||||
space.classes.values.each do |clazz|
|
||||
clazz.instance_methods.each do |f|
|
||||
f.blocks.each do |b|
|
||||
@ -51,10 +50,10 @@ module Elf
|
||||
end
|
||||
|
||||
def save(filename)
|
||||
to = File.open(filename, 'wb')
|
||||
to = File.open(filename, 'wb')
|
||||
@object.write to
|
||||
to.close
|
||||
end
|
||||
|
||||
end
|
||||
end
|
||||
end
|
||||
|
Reference in New Issue
Block a user