more work on large moves, including the notion of linking again

This commit is contained in:
Torsten Ruger
2014-09-17 17:00:19 +03:00
parent 4af93493fb
commit 49b6b99ab9
5 changed files with 45 additions and 47 deletions

View File

@ -56,6 +56,10 @@ module Virtual
def mem_length
padded(1 + string.length)
end
def set_position pos
puts "STRING #{pos} #{string}"
super
end
def position
return @position if @position
return @string.position if @string.position

View File

@ -26,7 +26,10 @@ module Virtual
@position
end
def set_position pos
raise "position set again #{pos}!=#{@position} for #{self}" if @position != nil and (@position != pos)
# resetting of position used to be error, but since relink and dynamic instruction size it is ok. in measures
if @position != nil and ((@position - pos).abs > 15)
raise "position set again #{pos}!=#{@position} for #{self}"
end
@position = pos
end
def inspect