add position to instruction (for relative calculations)
This commit is contained in:
parent
18f33770b5
commit
48b33e5f9d
@ -29,6 +29,7 @@ module Register
|
||||
@objects.each do |id , slot|
|
||||
next unless slot.object.is_a? Virtual::CompiledMethod
|
||||
slot.position = at
|
||||
slot.object.set_position at
|
||||
at += slot.length
|
||||
end
|
||||
@objects.each do |id , slot|
|
||||
|
@ -17,6 +17,7 @@ module Register
|
||||
@attributes = options
|
||||
end
|
||||
attr_reader :attributes
|
||||
attr_accessor :position
|
||||
def opcode
|
||||
@attributes[:opcode]
|
||||
end
|
||||
|
Loading…
Reference in New Issue
Block a user