seperate position create and register

many test fixes
This commit is contained in:
Torsten Ruger
2018-06-15 22:00:49 +03:00
parent 9c93b38b8f
commit 698c845297
16 changed files with 75 additions and 55 deletions

View File

@ -50,22 +50,10 @@ module Risc
# Write all the objects in the order that they have been positioed
def write_objects
sorted_objects.each do |objekt|
next unless is_object(objekt)
next unless Position.is_object(objekt)
write_any( objekt )
end
end
def is_object(object)
case object
when Risc::Label , Parfait::BinaryCode
return false
when Parfait::Object , Symbol
return true
when Arm::Instruction
return false
else
raise "Class #{object.class}"
end
end
# Write the BinaryCode objects of all methods to stream.
# Really like any other object, it's just about the ordering