[pypy-svn] r66359 - in pypy/branch/pyjitpl5-optimize4/pypy/jit/metainterp: . test

arigo at codespeak.net arigo at codespeak.net
Sat Jul 18 15:49:42 CEST 2009


Author: arigo
Date: Sat Jul 18 15:49:42 2009
New Revision: 66359

Modified:
   pypy/branch/pyjitpl5-optimize4/pypy/jit/metainterp/optimize.py
   pypy/branch/pyjitpl5-optimize4/pypy/jit/metainterp/test/test_optimize.py
Log:
Another test and fix.


Modified: pypy/branch/pyjitpl5-optimize4/pypy/jit/metainterp/optimize.py
==============================================================================
--- pypy/branch/pyjitpl5-optimize4/pypy/jit/metainterp/optimize.py	(original)
+++ pypy/branch/pyjitpl5-optimize4/pypy/jit/metainterp/optimize.py	Sat Jul 18 15:49:42 2009
@@ -181,7 +181,7 @@
 
     def intersect(self, inputnode, exitnode):
         assert inputnode.fromstart
-        if exitnode.unique == UNIQUE_NO:
+        if exitnode.unique == UNIQUE_NO or inputnode.escaped:
             # give a NotSpecNode or a FixedClassSpecNode
             if (inputnode.knownclsbox is not None and
                 exitnode.knownclsbox is not None and

Modified: pypy/branch/pyjitpl5-optimize4/pypy/jit/metainterp/test/test_optimize.py
==============================================================================
--- pypy/branch/pyjitpl5-optimize4/pypy/jit/metainterp/test/test_optimize.py	(original)
+++ pypy/branch/pyjitpl5-optimize4/pypy/jit/metainterp/test/test_optimize.py	Sat Jul 18 15:49:42 2009
@@ -457,6 +457,15 @@
         """
         self.find_nodes(ops, 'Not, Fixed(node_vtable2)')
 
+    def test_find_nodes_new_escapes(self):
+        ops = """
+        [p0]
+        escape(p0)
+        p1 = new_with_vtable(ConstClass(node_vtable), descr=nodesize)
+        jump(p1)
+        """
+        self.find_nodes(ops, 'Not')
+
 
 class TestLLtype(BaseTestOptimize, LLtypeMixin):
     pass



More information about the Pypy-commit mailing list