Maciej Fijalkowski avatar Maciej Fijalkowski committed bd89a27 Merge

merge default

Comments (0)

Files changed (10)

py/_code/source.py

                 trysource = self[start:end]
                 if trysource.isparseable():
                     return start, end
+                if end == start + 100:   # XXX otherwise, it takes forever
+                    break                # XXX
         if end is None:
             raise IndexError("no valid source range around line %d " % (lineno,))
         return start, end

pypy/module/sys/vm.py

 def exc_info_with_tb(space):
     operror = space.getexecutioncontext().sys_exc_info()
     if operror is None:
-        return space.newtuple([space.w_None,space.w_None,space.w_None])
+        return space.newtuple([space.w_None, space.w_None, space.w_None])
     else:
         return space.newtuple([operror.w_type, operror.get_w_value(space),
                                space.wrap(operror.get_traceback())])

pypy/tool/jitlogparser/parser.py

             if not stack:
                 stack.append([])
             else:
-                if bc.inline_level is not None and bc.inline_level + 1 != len(stack):
-                    if bc.inline_level < len(stack):
-                        last = stack.pop()
-                        stack[-1].append(cls(last, getpath(stack), storage))
+                if bc.inline_level is not None:
+                    if bc.inline_level == len(stack) - 1:
+                        pass
+                    elif bc.inline_level > len(stack) - 1:
+                        stack.append([])
                     else:
-                        stack.append([])
+                        while bc.inline_level + 1 < len(stack):
+                            last = stack.pop()
+                            stack[-1].append(cls(last, getpath(stack), storage))
             stack[-1].append(bc)
 
         so_far = []

pypy/tool/jitlogparser/test/test_parser.py

     f = Function.from_operations(loop.operations, LoopStorage())
     assert f.chunks[-1].filename == 'x.py'
     assert f.filename is None
+
+def test_parse_2_levels_up():
+    loop = parse("""
+    []
+    debug_merge_point(0, 0, 'one')
+    debug_merge_point(1, 0, 'two')
+    debug_merge_point(2, 0, 'three')
+    debug_merge_point(0, 0, 'one')    
+    """)
+    f = Function.from_operations(loop.operations, LoopStorage())
+    assert len(f.chunks) == 3

pypy/tool/release/package.py

 import sys
 import os
 #Add toplevel repository dir to sys.path
-sys.path.insert(0,os.path.dirname(os.path.dirname(os.path.dirname(os.path.dirname(__file__)))))
+sys.path.insert(0,os.path.dirname(os.path.dirname(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))))
 import py
 import fnmatch
 from rpython.tool.udir import udir

rpython/jit/backend/x86/runner.py

     def setup_once(self):
         self.profile_agent.startup()
         self.assembler.setup_once()
+        self.gc_set_extra_threshold()
 
     def finish_once(self):
         self.assembler.finish_once()

rpython/rlib/jit.py

             self.autoreds = True
             self.reds = []
             self.numreds = None # see warmspot.autodetect_jit_markers_redvars
-            for hook in [
-                get_jitcell_at, set_jitcell_at, get_printable_location,
-                confirm_enter_jit
-            ]:
-                assert hook is None, "reds='auto' is not compatible with JitDriver hooks"
+            assert confirm_enter_jit is None, (
+                "reds='auto' is not compatible with confirm_enter_jit")
         else:
             if reds is not None:
                 self.reds = reds

rpython/rtyper/rlist.py

     res._ll_resize(resultlen)
     j = length
     while j < resultlen:
-        i = 0
-        while i < length:
-            p = j + i
-            res.ll_setitem_fast(p, l.ll_getitem_fast(i))
-            i += 1
+        ll_arraycopy(l, res, 0, j, length)
         j += length
     return res
 ll_inplace_mul.oopspec = 'list.inplace_mul(l, factor)'
     res = RESLIST.ll_newlist(resultlen)
     j = 0
     while j < resultlen:
-        i = 0
-        while i < length:
-            p = j + i
-            res.ll_setitem_fast(p, l.ll_getitem_fast(i))
-            i += 1
+        ll_arraycopy(l, res, 0, j, length)
         j += length
     return res
 # not inlined by the JIT -- contains a loop

rpython/translator/platform/posix.py

             cflags = self.cflags + self.standalone_only
 
         m = GnuMakefile(path)
-        m.exe_name = exe_name
+        m.exe_name = path.join(target_name)
         m.eci = eci
 
         def rpyrel(fpath):

rpython/translator/platform/windows.py

         else:
             exe_name = exe_name.new(ext=self.exe_ext)
 
+        if shared:
+            so_name = exe_name.new(purebasename='lib' + exe_name.purebasename,
+                                   ext=self.so_ext)
+            target_name = so_name.basename
+        else:
+            target_name = exe_name.basename
+
         m = NMakefile(path)
-        m.exe_name = exe_name
+        m.exe_name = path.join(target_name)
         m.eci = eci
 
         linkflags = list(self.link_flags)
         # This is required for the JIT.
         linkflags.append('/opt:noicf')
 
-        if shared:
-            so_name = exe_name.new(purebasename='lib' + exe_name.purebasename,
-                                   ext=self.so_ext)
-            target_name = so_name.basename
-        else:
-            target_name = exe_name.basename
-
         def rpyrel(fpath):
             rel = py.path.local(fpath).relto(rpypath)
             if rel:
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.