[pypy-svn] r65391 - pypy/branch/pyjitpl5-experiments/pypy/jit/metainterp/test
fijal at codespeak.net
fijal at codespeak.net
Mon May 25 00:47:26 CEST 2009
Author: fijal
Date: Mon May 25 00:47:25 2009
New Revision: 65391
Modified:
pypy/branch/pyjitpl5-experiments/pypy/jit/metainterp/test/oparser.py
pypy/branch/pyjitpl5-experiments/pypy/jit/metainterp/test/test_oparser.py
Log:
A test and a proper fix
Modified: pypy/branch/pyjitpl5-experiments/pypy/jit/metainterp/test/oparser.py
==============================================================================
--- pypy/branch/pyjitpl5-experiments/pypy/jit/metainterp/test/oparser.py (original)
+++ pypy/branch/pyjitpl5-experiments/pypy/jit/metainterp/test/oparser.py Mon May 25 00:47:25 2009
@@ -81,7 +81,7 @@
allargs = allargs[:-1]
poss_vdesc = allargs[-1].strip()
if poss_vdesc.startswith('vdesc='):
- descr = self.consts[poss_descr[len('vdesc='):]]
+ vdesc = self.consts[poss_descr[len('vdesc='):]]
allargs = allargs[:-1]
for arg in allargs:
arg = arg.strip()
Modified: pypy/branch/pyjitpl5-experiments/pypy/jit/metainterp/test/test_oparser.py
==============================================================================
--- pypy/branch/pyjitpl5-experiments/pypy/jit/metainterp/test/test_oparser.py (original)
+++ pypy/branch/pyjitpl5-experiments/pypy/jit/metainterp/test/test_oparser.py Mon May 25 00:47:25 2009
@@ -64,3 +64,18 @@
stuff = Xyz()
loop = parse(x, None, locals())
assert loop.operations[0].descr is stuff
+
+def test_vdesc():
+ class Xyz(AbstractDescr):
+ pass
+
+ x = """
+ [p0]
+ guard_nonvirtualized(p0, vdesc=stuff)
+ fail()
+ """
+ stuff = Xyz()
+ loop = parse(x, None, locals())
+ assert loop.operations[0].vdesc is stuff
+
+
More information about the Pypy-commit
mailing list