[pypy-svn] r65369 - in pypy/branch/pyjitpl5-experiments/pypy/jit/metainterp: . test

antocuni at codespeak.net antocuni at codespeak.net
Sat May 23 19:11:38 CEST 2009


Author: antocuni
Date: Sat May 23 19:11:37 2009
New Revision: 65369

Modified:
   pypy/branch/pyjitpl5-experiments/pypy/jit/metainterp/optimize3.py
   pypy/branch/pyjitpl5-experiments/pypy/jit/metainterp/test/test_optimize3.py
Log:
remove all references to the getfield optimizations, as fijal says it's broken



Modified: pypy/branch/pyjitpl5-experiments/pypy/jit/metainterp/optimize3.py
==============================================================================
--- pypy/branch/pyjitpl5-experiments/pypy/jit/metainterp/optimize3.py	(original)
+++ pypy/branch/pyjitpl5-experiments/pypy/jit/metainterp/optimize3.py	Sat May 23 19:11:37 2009
@@ -8,8 +8,6 @@
             assert isinstance(source, Const)
         self.const = const
         self.cls = None
-        self.cleanfields = {}
-        self.dirtyfields = {}
 
     def __repr__(self):
         flags = ''
@@ -90,14 +88,6 @@
                 newoperations.append(newop)
         print "Length of the loop:", len(newoperations)
         self.loop.operations = newoperations
-
-    def clean_up_caches(self, newoperations):
-        for descr, v in self.field_caches.iteritems():
-            for instnode, fieldnode in v:
-                newoperations.append(ResOperation(rop.SETFIELD_GC,
-                    [instnode.source, fieldnode.source], None, descr))
-                del instnode.cleanfields[descr]
-                del instnode.dirtyfields[descr]
     
     def optimize_loop(self, loop):
         self.nodes = {}

Modified: pypy/branch/pyjitpl5-experiments/pypy/jit/metainterp/test/test_optimize3.py
==============================================================================
--- pypy/branch/pyjitpl5-experiments/pypy/jit/metainterp/test/test_optimize3.py	(original)
+++ pypy/branch/pyjitpl5-experiments/pypy/jit/metainterp/test/test_optimize3.py	Sat May 23 19:11:37 2009
@@ -110,42 +110,6 @@
             ResOperation(rop.GUARD_VALUE, [n, ConstInt(0)], None),
             ])
 
-    def test_remove_consecutive_getfields(self):
-        py.test.skip('in-progress')
-        n1 = BoxInt()
-        n2 = BoxInt()
-        n3 = BoxInt()
-        ops = [
-            ResOperation(rop.GETFIELD_GC, [self.nodebox], n1, self.nodedescr),
-            ResOperation(rop.GETFIELD_GC, [self.nodebox], n2, self.nodedescr),
-            ResOperation(rop.INT_ADD, [n1, n2], n3),
-        ]
-        loop = self.newloop([self.nodebox], ops)
-        optimize_loop(None, [], loop)
-        equaloplists(loop.operations, [
-            ResOperation(rop.GETFIELD_GC, [self.nodebox], n1, self.nodedescr),
-            ResOperation(rop.INT_ADD, [n1, n1], n3),
-            ])
-
-    def test_setfield_getfield_clean_cache(self):
-        py.test.skip('in-progress')
-        n1 = BoxInt()
-        n2 = BoxInt()
-        n3 = BoxInt()
-        ops = [
-            ResOperation(rop.GETFIELD_GC, [self.nodebox], n1, self.nodedescr),
-            ResOperation(rop.SETFIELD_GC, [self.nodebox, ConstInt(3)], None, self.nodedescr),
-            ResOperation(rop.GETFIELD_GC, [self.nodebox], n2, self.nodedescr),
-            ResOperation(rop.CALL, [n2], None),
-        ]
-        loop = self.newloop([self.nodebox], ops)
-        optimize_loop(None, [], loop)
-        equaloplists(loop.operations, [
-            ResOperation(rop.GETFIELD_GC, [self.nodebox], n1, self.nodedescr),
-            ResOperation(rop.SETFIELD_GC, [self.nodebox, ConstInt(3)], None, self.nodedescr),
-            ResOperation(rop.CALL, [ConstInt(3)], None),
-            ])
-
 
 class TestLLtype(LLtypeMixin, BaseTestOptimize3):
     pass



More information about the Pypy-commit mailing list