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|
|
@objects.each do |id , slot|
|
||||||
next unless slot.object.is_a? Virtual::CompiledMethod
|
next unless slot.object.is_a? Virtual::CompiledMethod
|
||||||
slot.position = at
|
slot.position = at
|
||||||
|
slot.object.set_position at
|
||||||
at += slot.length
|
at += slot.length
|
||||||
end
|
end
|
||||||
@objects.each do |id , slot|
|
@objects.each do |id , slot|
|
||||||
|
@ -17,6 +17,7 @@ module Register
|
|||||||
@attributes = options
|
@attributes = options
|
||||||
end
|
end
|
||||||
attr_reader :attributes
|
attr_reader :attributes
|
||||||
|
attr_accessor :position
|
||||||
def opcode
|
def opcode
|
||||||
@attributes[:opcode]
|
@attributes[:opcode]
|
||||||
end
|
end
|
||||||
|
Loading…
x
Reference in New Issue
Block a user