make the instructions jump over the BinaryCode end
This commit is contained in:
@ -108,6 +108,12 @@ module Risc
|
||||
"0x#{@at.to_s(16)}"
|
||||
end
|
||||
|
||||
def object_class
|
||||
return :object if @object.is_a?(Parfait::Object)
|
||||
return :object if @object.class.name.include?("Test")
|
||||
:instruction
|
||||
end
|
||||
|
||||
def next_slot
|
||||
return -1 if at < 0
|
||||
self.log.debug "Next Slot @#{at.to_s(16)} for #{object.class} == #{(at + object.byte_length).to_s(16)}"
|
||||
@ -159,12 +165,12 @@ module Risc
|
||||
raise "Mismatch #{position}" if postest and postest != position
|
||||
@reverse_cache.delete(position.at) unless position.object.is_a?(Label)
|
||||
testing = self.at( position.at ) unless position.at < 0
|
||||
if testing and testing.object.class != position.object.class
|
||||
raise "Mismatch (at #{to.to_s(16)}) was:#{position} #{position.class} #{position.object} , should #{testing}#{testing.class}"
|
||||
if testing and testing.object_class != position.object_class
|
||||
raise "Mismatch (at #{to.to_s(16)}) new:#{position} #{position.object.class} , was:#{testing}#{testing.object.class}"
|
||||
end
|
||||
self.positions[position.object] = position
|
||||
@reverse_cache[to] = position unless position.object.is_a?(Label)
|
||||
log.debug "Set #{position} (#{to.to_s(16)}) for #{position.object.class} #{position.object.object_id.to_s(16)}"
|
||||
log.debug "Set #{position} to 0x#{to.to_s(16)} for #{position.object.class} #{position.object.object_id.to_s(16)}"
|
||||
position
|
||||
end
|
||||
end
|
||||
|
Reference in New Issue
Block a user