Armin Rigo avatar Armin Rigo committed 326cd56 Merge

merge heads

Comments (0)

Files changed (3)

pypy/jit/metainterp/test/support.py

 from pypy.jit.metainterp import pyjitpl, history
 from pypy.jit.metainterp.warmstate import set_future_value
 from pypy.jit.codewriter.policy import JitPolicy
-from pypy.jit.codewriter import longlong
+from pypy.jit.codewriter import codewriter, longlong
 
 def _get_jitcodes(testself, CPUClass, func, values, type_system,
                   supports_longlong=False, **kwds):
-    from pypy.jit.codewriter import support, codewriter
+    from pypy.jit.codewriter import support
 
     class FakeJitCell:
         __compiled_merge_points = []
     stats = history.Stats()
     cpu = CPUClass(rtyper, stats, None, False)
     cw = codewriter.CodeWriter(cpu, [FakeJitDriverSD()])
+    cw.debug = True
     testself.cw = cw
     policy = JitPolicy()
     policy.set_supports_longlong(supports_longlong)
         kwds['type_system'] = self.type_system
         if "backendopt" not in kwds:
             kwds["backendopt"] = False
-        return ll_meta_interp(*args, **kwds)
+        old = codewriter.CodeWriter.debug
+        try:
+            codewriter.CodeWriter.debug = True
+            return ll_meta_interp(*args, **kwds)
+        finally:
+            codewriter.CodeWriter.debug = old
 
     def interp_operations(self, f, args, **kwds):
         # get the JitCodes for the function f

pypy/jit/metainterp/test/test_jitprof.py

             ]
         assert profiler.events == expected
         assert profiler.times == [3, 2, 1, 1]
-        assert profiler.counters == [1, 2, 1, 1, 3, 3, 1, 13, 2, 0, 0, 0,
+        assert profiler.counters == [1, 2, 1, 1, 3, 3, 1, 13, 2, 0, 0, 0, 0,
                                      0, 0, 0, 0, 0]
 
     def test_simple_loop_with_call(self):

pypy/jit/metainterp/test/test_quasiimmut.py

             assert isinstance(loop.quasi_immutable_deps.keys()[0], QuasiImmut)
 
     def test_list_pass_around(self):
+        py.test.skip("think about a way to fix it")
         myjitdriver = JitDriver(greens=['foo'], reds=['x', 'total'])
         class Foo:
             _immutable_fields_ = ['lst?[*]']
             def __init__(self, lst):
                 self.lst = lst
         def g(lst):
+            # here, 'lst' is statically annotated as a "modified" list,
+            # so the following doesn't generate a getarrayitem_gc_pure...
             return lst[1]
         def f(a, x):
             lst1 = [0, 0]
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.