[pypy-svn] pypy enable-opts: Fix test_compile

fijal commits-noreply at bitbucket.org
Sat Mar 12 20:22:49 CET 2011


Author: Maciej Fijalkowski <fijall at gmail.com>
Branch: enable-opts
Changeset: r42534:dc0f57fef14d
Date: 2011-03-12 14:22 -0500
http://bitbucket.org/pypy/pypy/changeset/dc0f57fef14d/

Log:	Fix test_compile

diff --git a/pypy/jit/metainterp/test/test_compile.py b/pypy/jit/metainterp/test/test_compile.py
--- a/pypy/jit/metainterp/test/test_compile.py
+++ b/pypy/jit/metainterp/test/test_compile.py
@@ -4,7 +4,7 @@
 from pypy.jit.metainterp.compile import ResumeGuardDescr
 from pypy.jit.metainterp.compile import ResumeGuardCountersInt
 from pypy.jit.metainterp.compile import compile_tmp_callback
-from pypy.jit.metainterp import nounroll_optimize, jitprof, typesystem, compile
+from pypy.jit.metainterp import jitprof, typesystem, compile
 from pypy.jit.metainterp.test.test_optimizeutil import LLtypeMixin
 from pypy.jit.tool.oparser import parse
 from pypy.jit.metainterp.optimizeopt import ALL_OPTS_DICT
@@ -26,28 +26,28 @@
     assert lst == [tok1, tok2, tok3]
 
 
-class FakeCPU:
+class FakeCPU(object):
     ts = typesystem.llhelper
     def __init__(self):
         self.seen = []
     def compile_loop(self, inputargs, operations, token):
         self.seen.append((inputargs, operations, token))
 
-class FakeLogger:
+class FakeLogger(object):
     def log_loop(self, inputargs, operations, number=0, type=None):
         pass
 
-class FakeState:
-    optimize_loop = staticmethod(nounroll_optimize.optimize_loop)
-    enable_opts = {}
+class FakeState(object):
+    enable_opts = ALL_OPTS_DICT.copy()
+    enable_opts.pop('unroll')
 
     def attach_unoptimized_bridge_from_interp(*args):
         pass
 
-class FakeGlobalData:
+class FakeGlobalData(object):
     loopnumbering = 0
 
-class FakeMetaInterpStaticData:
+class FakeMetaInterpStaticData(object):
     
     logger_noopt = FakeLogger()
     logger_ops = FakeLogger()


More information about the Pypy-commit mailing list