Commits

timfel committed 946a179

(timfel, cfbolz) add bytecodeoffset to shadow

Comments (0)

Files changed (2)

         self.w_compiledmethod = w_compiledmethod
         self.bytecode = "".join(w_compiledmethod.bytes)
         self.literals = w_compiledmethod.literals
+        self.bytecodeoffset = w_compiledmethod.bytecodeoffset()

spyvm/test/test_shadow.py

     w_compiledmethod.setbytes(list("abc"))
     shadow = w_compiledmethod.as_compiledmethod_get_shadow(space)
     assert shadow.bytecode == "abc"
+    assert shadow.bytecodeoffset == 12
 
     w_compiledmethod.literalatput0(space, 1, 17)
     w_compiledmethod.literalatput0(space, 2, 41)