fix offsets, debugging revealed them to be 1 off
This commit is contained in:
parent
4ca15449be
commit
3895ac624c
@ -29,7 +29,7 @@ module Parfait
|
|||||||
attribute :next_frame
|
attribute :next_frame
|
||||||
|
|
||||||
def self.offset
|
def self.offset
|
||||||
Space.object_space.get_class_by_name(:Frame).object_layout.object_instance_length
|
1 + Space.object_space.get_class_by_name(:Frame).object_layout.object_instance_length
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
@ -30,7 +30,7 @@ module Parfait
|
|||||||
end
|
end
|
||||||
|
|
||||||
def self.offset
|
def self.offset
|
||||||
Space.object_space.get_class_by_name(:Message).object_layout.object_instance_length
|
1 + Space.object_space.get_class_by_name(:Message).object_layout.object_instance_length
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -73,7 +73,7 @@ HERE
|
|||||||
was = check
|
was = check
|
||||||
get = was[0].codes[5]
|
get = was[0].codes[5]
|
||||||
assert_equal GetSlot , get.class
|
assert_equal GetSlot , get.class
|
||||||
assert_equal 2, get.index , "Get to frame index must be offset, not #{get.index}"
|
assert_equal 3, get.index , "Get to frame index must be offset, not #{get.index}"
|
||||||
end
|
end
|
||||||
|
|
||||||
def test_assign_arg
|
def test_assign_arg
|
||||||
@ -89,7 +89,7 @@ HERE
|
|||||||
was = check
|
was = check
|
||||||
set = was[0].codes[2]
|
set = was[0].codes[2]
|
||||||
assert_equal SetSlot , set.class
|
assert_equal SetSlot , set.class
|
||||||
assert_equal 8, set.index , "Set to args index must be offset, not #{set.index}"
|
assert_equal 9, set.index , "Set to args index must be offset, not #{set.index}"
|
||||||
end
|
end
|
||||||
|
|
||||||
def test_assign_int
|
def test_assign_int
|
||||||
@ -104,7 +104,7 @@ HERE
|
|||||||
was = check
|
was = check
|
||||||
set = was[0].codes[3]
|
set = was[0].codes[3]
|
||||||
assert_equal SetSlot , set.class
|
assert_equal SetSlot , set.class
|
||||||
assert_equal 2, set.index , "Set to frame index must be offset, not #{set.index}"
|
assert_equal 3, set.index , "Set to frame index must be offset, not #{set.index}"
|
||||||
end
|
end
|
||||||
|
|
||||||
def test_arg_get
|
def test_arg_get
|
||||||
@ -122,7 +122,7 @@ HERE
|
|||||||
was = check
|
was = check
|
||||||
get = was[0].codes[1]
|
get = was[0].codes[1]
|
||||||
assert_equal GetSlot , get.class
|
assert_equal GetSlot , get.class
|
||||||
assert_equal 8, get.index , "Get to frame index must be offset, not #{get.index}"
|
assert_equal 9, get.index , "Get to frame index must be offset, not #{get.index}"
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -100,7 +100,7 @@ HERE
|
|||||||
was = check
|
was = check
|
||||||
set = was[0].codes[7]
|
set = was[0].codes[7]
|
||||||
assert_equal SetSlot , set.class
|
assert_equal SetSlot , set.class
|
||||||
assert_equal 8, set.index , "Set to message must be offset, not #{set.index}"
|
assert_equal 9, set.index , "Set to message must be offset, not #{set.index}"
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user