Author: Maciej Fijalkowski <[email protected]>
Branch: jitframe-on-heap
Changeset: r60483:bd89a27a688b
Date: 2013-01-25 21:52 +0200
http://bitbucket.org/pypy/pypy/changeset/bd89a27a688b/
Log: merge default
diff --git a/py/_code/source.py b/py/_code/source.py
--- a/py/_code/source.py
+++ b/py/_code/source.py
@@ -141,6 +141,8 @@
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
diff --git a/pypy/module/sys/vm.py b/pypy/module/sys/vm.py
--- a/pypy/module/sys/vm.py
+++ b/pypy/module/sys/vm.py
@@ -95,7 +95,7 @@
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())])
diff --git a/pypy/tool/jitlogparser/parser.py b/pypy/tool/jitlogparser/parser.py
--- a/pypy/tool/jitlogparser/parser.py
+++ b/pypy/tool/jitlogparser/parser.py
@@ -247,12 +247,15 @@
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 = []
diff --git a/pypy/tool/jitlogparser/test/test_parser.py
b/pypy/tool/jitlogparser/test/test_parser.py
--- a/pypy/tool/jitlogparser/test/test_parser.py
+++ b/pypy/tool/jitlogparser/test/test_parser.py
@@ -354,3 +354,14 @@
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
diff --git a/pypy/tool/release/package.py b/pypy/tool/release/package.py
--- a/pypy/tool/release/package.py
+++ b/pypy/tool/release/package.py
@@ -13,7 +13,7 @@
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
diff --git a/rpython/jit/backend/x86/runner.py
b/rpython/jit/backend/x86/runner.py
--- a/rpython/jit/backend/x86/runner.py
+++ b/rpython/jit/backend/x86/runner.py
@@ -64,6 +64,7 @@
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()
diff --git a/rpython/rlib/jit.py b/rpython/rlib/jit.py
--- a/rpython/rlib/jit.py
+++ b/rpython/rlib/jit.py
@@ -481,11 +481,8 @@
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
diff --git a/rpython/rtyper/rlist.py b/rpython/rtyper/rlist.py
--- a/rpython/rtyper/rlist.py
+++ b/rpython/rtyper/rlist.py
@@ -1025,11 +1025,7 @@
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)'
@@ -1046,11 +1042,7 @@
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
diff --git a/rpython/translator/platform/posix.py
b/rpython/translator/platform/posix.py
--- a/rpython/translator/platform/posix.py
+++ b/rpython/translator/platform/posix.py
@@ -115,7 +115,7 @@
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):
diff --git a/rpython/translator/platform/windows.py
b/rpython/translator/platform/windows.py
--- a/rpython/translator/platform/windows.py
+++ b/rpython/translator/platform/windows.py
@@ -261,8 +261,15 @@
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)
@@ -274,13 +281,6 @@
# 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:
_______________________________________________
pypy-commit mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-commit