seperate position create and register
many test fixes
This commit is contained in:
@ -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
|
||||
|
Reference in New Issue
Block a user