[pypy-commit] lang-smalltalk default: (timfel, cfbolz) add bytecodeoffset to shadow
timfel
noreply at buildbot.pypy.org
Mon Feb 18 16:12:55 CET 2013
Author: Tim Felgentreff <timfelgentreff at gmail.com>
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)
More information about the pypy-commit
mailing list