debugging positions

This commit is contained in:
Torsten Ruger
2018-05-05 19:32:01 +03:00
parent d49d2665c5
commit 43d5521cfc
9 changed files with 30 additions and 17 deletions

View File

@ -11,7 +11,7 @@ module Arm
# Riscs 0-6 hold the call values as for a normal c call
class CallInstruction < Instruction
attr_reader :first
def initialize(first, attributes)
super(nil, nil)
@attributes = attributes
@ -51,8 +51,8 @@ module Arm
when Parfait::BinaryCode
# But, for methods, this happens to be the size of the object header,
# so there it balances out, but not blocks
# have to use the code, not the mthod object for methods
arg = Positioned.position(@first) - Positioned.position(self)
# have to use the code, not the method object for methods
arg = Positioned.position(@first) - Positioned.position(self) + 4
else
arg = @first
end