[pypy-svn] r65387 - pypy/branch/pyjitpl5-experiments/pypy/jit/metainterp/test

fijal at codespeak.net fijal at codespeak.net
Sun May 24 23:18:19 CEST 2009


Author: fijal
Date: Sun May 24 23:18:16 2009
New Revision: 65387

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 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	Sun May 24 23:18:16 2009
@@ -102,7 +102,7 @@
         return ResOperation(opnum, args, None, descr)
 
     def parse_next_op(self, line):
-        if "=" in line:
+        if "=" in line and line.find('(') > line.find('='):
             return self.parse_result_op(line)
         else:
             return self.parse_op_no_result(line)

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	Sun May 24 23:18:16 2009
@@ -52,3 +52,15 @@
     """
     loop = parse(x, None, {})
     assert len(loop.operations) == 2
+
+def test_descr_setfield():
+    class Xyz(AbstractDescr):
+        pass
+    
+    x = """
+    [p0]
+    setfield_gc(p0, 3, descr=stuff)
+    """
+    stuff = Xyz()
+    loop = parse(x, None, locals())
+    assert loop.operations[0].descr is stuff



More information about the Pypy-commit mailing list