[pypy-svn] commit/pypy: hakanardo: Allow failargs to be None
Bitbucket
commits-noreply at bitbucket.org
Sun Dec 19 11:54:49 CET 2010
1 new changeset in pypy:
http://bitbucket.org/pypy/pypy/changeset/2e8d4e44bae1/
changeset: r40123:2e8d4e44bae1
branch: jit-unroll-loops
user: hakanardo
date: 2010-12-19 11:54:23
summary: Allow failargs to be None
affected #: 4 files (369 bytes)
--- a/pypy/jit/metainterp/optimizeopt/unroll.py Fri Dec 17 17:39:19 2010 +0100
+++ b/pypy/jit/metainterp/optimizeopt/unroll.py Sun Dec 19 11:54:23 2010 +0100
@@ -43,6 +43,8 @@
return newop
def inline_arg(self, arg):
+ if arg is None:
+ return None
if isinstance(arg, Const):
return arg
return self.argmap[arg]
@@ -264,7 +266,9 @@
newop = self.inliner.inline_op(op, True)
except KeyError:
debug_print("create_short_preamble failed due to",
- "new boxes created during optimization")
+ "new boxes created during optimization.",
+ "op:", op.getopnum(),
+ "at position: ", preamble_i)
return None
if self.sameop(newop, loop_ops[loop_i]) \
--- a/pypy/jit/metainterp/test/test_basic.py Fri Dec 17 17:39:19 2010 +0100
+++ b/pypy/jit/metainterp/test/test_basic.py Sun Dec 19 11:54:23 2010 +0100
@@ -1880,8 +1880,8 @@
assert c1.val == c2.val
assert d1.val == d2.val
return a1.val + b1.val + c1.val + d1.val
- res = self.meta_interp(g, [6, 14])
- assert res == g(6, 14)
+ res = self.meta_interp(g, [3, 14])
+ assert res == g(3, 14)
def test_specialied_bridge(self):
myjitdriver = JitDriver(greens = [], reds = ['y', 'x', 'res'])
--- a/pypy/jit/tool/traceviewer.py Fri Dec 17 17:39:19 2010 +0100
+++ b/pypy/jit/tool/traceviewer.py Sun Dec 19 11:54:23 2010 +0100
@@ -74,7 +74,7 @@
def generate(self, dotgen, counts):
val = counts.get(self.key, 0)
- if val > counts.threshold:
+ if False: #val > counts.threshold:
fillcolor = get_gradient_color(self.ratio)
else:
fillcolor = "white"
--- a/pypy/translator/tool/make_dot.py Fri Dec 17 17:39:19 2010 +0100
+++ b/pypy/translator/tool/make_dot.py Sun Dec 19 11:54:23 2010 +0100
@@ -49,12 +49,17 @@
color="black",
dir="forward",
weight="5",
+ ports=None,
):
d = locals()
attrs = [('%s="%s"' % (x, d[x].replace('"', '\\"').replace('\n', '\\n')))
for x in ['label', 'style', 'color', 'dir', 'weight']]
self.emit('edge [%s];' % ", ".join(attrs))
- self.emit('%s -> %s' % (safename(name1), safename(name2)))
+ if ports:
+ self.emit('%s:%s -> %s:%s' % (safename(name1), ports[0],
+ safename(name2), ports[1]))
+ else:
+ self.emit('%s -> %s' % (safename(name1), safename(name2)))
def emit_node(self, name,
shape="diamond",
Repository URL: https://bitbucket.org/pypy/pypy/
--
This is a commit notification from bitbucket.org. You are receiving
this because you have the service enabled, addressing the recipient of
this email.
More information about the Pypy-commit
mailing list