Author: Alex Gaynor <[email protected]>
Branch: unroll-if-alt
Changeset: r46103:a02e7bf45eb9
Date: 2011-07-30 01:36 -0700
http://bitbucket.org/pypy/pypy/changeset/a02e7bf45eb9/
Log: Approprite special case here.
diff --git a/pypy/jit/metainterp/optimizeopt/vstring.py
b/pypy/jit/metainterp/optimizeopt/vstring.py
--- a/pypy/jit/metainterp/optimizeopt/vstring.py
+++ b/pypy/jit/metainterp/optimizeopt/vstring.py
@@ -466,6 +466,9 @@
srcstart = self.getvalue(op.getarg(2))
dststart = self.getvalue(op.getarg(3))
length = self.getvalue(op.getarg(4))
+
+ if length.is_constant() and length.box.getint() == 0:
+ return
copy_str_content(self.optimizer,
src.force_box(),
dst.force_box(),
_______________________________________________
pypy-commit mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-commit