[pypy-commit] pypy result-in-resops: finish test_optimizebasic
fijal
noreply at buildbot.pypy.org
Wed Sep 26 16:15:59 CEST 2012
Author: Maciej Fijalkowski <fijall at gmail.com>
Branch: result-in-resops
Changeset: r57613:01d0a3b8ffb9
Date: 2012-09-26 16:15 +0200
http://bitbucket.org/pypy/pypy/changeset/01d0a3b8ffb9/
Log: finish test_optimizebasic
diff --git a/pypy/jit/metainterp/optimizeopt/optimizer.py b/pypy/jit/metainterp/optimizeopt/optimizer.py
--- a/pypy/jit/metainterp/optimizeopt/optimizer.py
+++ b/pypy/jit/metainterp/optimizeopt/optimizer.py
@@ -703,14 +703,14 @@
indexvalue = self.getvalue(op.getarg(1))
if indexvalue.is_constant():
arrayvalue = self.getvalue(op.getarg(0))
- arrayvalue.make_len_gt(MODE_STR, op.getdescr(), indexvalue.box.getint())
+ arrayvalue.make_len_gt(MODE_STR, op.getdescr(), indexvalue.op.getint())
self.optimize_default(op)
def optimize_UNICODEGETITEM(self, op):
indexvalue = self.getvalue(op.getarg(1))
if indexvalue.is_constant():
arrayvalue = self.getvalue(op.getarg(0))
- arrayvalue.make_len_gt(MODE_UNICODE, op.getdescr(), indexvalue.box.getint())
+ arrayvalue.make_len_gt(MODE_UNICODE, op.getdescr(), indexvalue.op.getint())
self.optimize_default(op)
# These are typically removed already by OptRewrite, but it can be
diff --git a/pypy/jit/metainterp/optimizeopt/test/test_optimizebasic.py b/pypy/jit/metainterp/optimizeopt/test/test_optimizebasic.py
--- a/pypy/jit/metainterp/optimizeopt/test/test_optimizebasic.py
+++ b/pypy/jit/metainterp/optimizeopt/test/test_optimizebasic.py
@@ -4957,7 +4957,7 @@
[]
p0 = newstr(6)
copystrcontent(s"hello!", p0, 0, 0, 6)
- p1 = call(0, p0, s"abc123", descr=strconcatdescr)
+ p1 = call_r(0, p0, s"abc123", descr=strconcatdescr)
i0 = strgetitem(p1, 0)
finish(i0)
"""
@@ -4972,12 +4972,14 @@
def test_ptr_eq_str_constant(self):
ops = """
- []
- i0 = ptr_eq(s"abc", s"\x00")
+ [p0]
+ guard_value(p0, s"abc") []
+ i0 = ptr_eq(p0, s"\x00")
finish(i0)
"""
expected = """
- []
+ [p0]
+ guard_value(p0, s"abc") []
finish(0)
"""
self.optimize_loop(ops, expected)
More information about the pypy-commit
mailing list