Author: Tim Felgentreff <[email protected]>
Branch: 
Changeset: r40:946a179f9eef
Date: 2013-02-18 16:09 +0100
http://bitbucket.org/pypy/lang-smalltalk/changeset/946a179f9eef/

Log:    (timfel, cfbolz) add bytecodeoffset to shadow

diff --git a/spyvm/shadow.py b/spyvm/shadow.py
--- a/spyvm/shadow.py
+++ b/spyvm/shadow.py
@@ -713,3 +713,4 @@
         self.w_compiledmethod = w_compiledmethod
         self.bytecode = "".join(w_compiledmethod.bytes)
         self.literals = w_compiledmethod.literals
+        self.bytecodeoffset = w_compiledmethod.bytecodeoffset()
diff --git a/spyvm/test/test_shadow.py b/spyvm/test/test_shadow.py
--- a/spyvm/test/test_shadow.py
+++ b/spyvm/test/test_shadow.py
@@ -190,6 +190,7 @@
     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)
_______________________________________________
pypy-commit mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to