objects didn't get positions

positions.empty? was wrong check
This commit is contained in:
Torsten Ruger
2018-06-16 10:58:54 +03:00
parent 698c845297
commit 7543236f4f
9 changed files with 17 additions and 28 deletions

View File

@ -33,6 +33,7 @@ module Risc
sorted_objects = @text_writer.sorted_objects
sorted_objects.each_slice(2) do |l,r|
next unless r
next if l.is_a?(Label) or r.is_a?(Label)
assert Position.get(l).at < Position.get(r).at , "#{Position.get(l)} < #{Position.get(r)} , #{l.object_id.to_s(16)}, #{r.object_id.to_s(16)}"
end
end
@ -41,6 +42,7 @@ module Risc
sorted_objects.shift
sorted_objects.each_slice(2) do |l,r|
next unless r
next if l.is_a?(Label) or r.is_a?(Label)
assert Position.get(l).at < Position.get(r).at , "#{Position.get(l)} < #{Position.get(r)} , #{l.object_id.to_s(16)}, #{r.object_id.to_s(16)}"
end
end