Author: Antonio Cuni <anto.c...@gmail.com>
Branch: faster-rstruct-2
Changeset: r91275:3c31e7d36cc9
Date: 2017-05-12 19:22 +0200
http://bitbucket.org/pypy/pypy/changeset/3c31e7d36cc9/

Log:    fix bhimpl_gc_store_indexed_i, which was not tested because the
        blackhole didn't see the op :(

diff --git a/rpython/jit/metainterp/blackhole.py 
b/rpython/jit/metainterp/blackhole.py
--- a/rpython/jit/metainterp/blackhole.py
+++ b/rpython/jit/metainterp/blackhole.py
@@ -1478,12 +1478,17 @@
     def bhimpl_gc_load_indexed_f(cpu, addr, index, scale, base_ofs, bytes):
         return cpu.bh_gc_load_indexed_f(addr, index,scale,base_ofs, bytes)
 
-    @arguments("cpu", "r", "i", "i", "i", "i", "i")
-    def bhimpl_gc_store_indexed_i(cpu, addr, index, val, scale, base_ofs, 
bytes):
-        return cpu.bh_gc_store_indexed_i(addr, index, val, scale,base_ofs, 
bytes)
-    @arguments("cpu", "r", "i", "f", "i", "i", "i")
-    def bhimpl_gc_store_indexed_f(cpu, addr, index, val, scale, base_ofs, 
bytes):
-        return cpu.bh_gc_store_indexed_f(addr, index, val, scale,base_ofs, 
bytes)
+    @arguments("cpu", "r", "i", "i", "i", "i", "i", "d")
+    def bhimpl_gc_store_indexed_i(cpu, addr, index, val, scale, base_ofs, 
bytes,
+                                  arraydescr):
+        return cpu.bh_gc_store_indexed_i(addr, index, val, scale,base_ofs, 
bytes,
+                                         arraydescr)
+
+    @arguments("cpu", "r", "i", "f", "i", "i", "i", "d")
+    def bhimpl_gc_store_indexed_f(cpu, addr, index, val, scale, base_ofs, 
bytes,
+                                  arraydescr):
+        return cpu.bh_gc_store_indexed_f(addr, index, val, scale,base_ofs, 
bytes,
+                                         arraydescr)
 
     @arguments("r", "d", "d")
     def bhimpl_record_quasiimmut_field(struct, fielddescr, mutatefielddescr):
diff --git a/rpython/jit/metainterp/test/support.py 
b/rpython/jit/metainterp/test/support.py
--- a/rpython/jit/metainterp/test/support.py
+++ b/rpython/jit/metainterp/test/support.py
@@ -19,7 +19,8 @@
                   supports_floats=True,
                   supports_longlong=False,
                   supports_singlefloats=False,
-                  translationoptions={}, **kwds):
+                  translationoptions={},
+                  backendopt_inline_threshold=0, **kwds):
     from rpython.jit.codewriter import support
 
     class FakeJitCell(object):
@@ -59,7 +60,7 @@
         FakeWarmRunnerState.enable_opts = {}
 
     func._jit_unroll_safe_ = True
-    rtyper = support.annotate(func, values,
+    rtyper = support.annotate(func, values, inline=backendopt_inline_threshold,
                               translationoptions=translationoptions)
     graphs = rtyper.annotator.translator.graphs
     testself.all_graphs = graphs
diff --git a/rpython/jit/metainterp/test/test_llop.py 
b/rpython/jit/metainterp/test/test_llop.py
--- a/rpython/jit/metainterp/test/test_llop.py
+++ b/rpython/jit/metainterp/test/test_llop.py
@@ -8,6 +8,7 @@
 from rpython.jit.metainterp.history import getkind
 from rpython.jit.metainterp.test.support import LLJitMixin
 
+
 class TestLLOp(BaseLLOpTest, LLJitMixin):
 
     # for the individual tests see
@@ -37,7 +38,11 @@
                 # I'm not sure why, but if I use an assert, the test doesn't 
fail
                 raise ValueError('got != expected')
             return len(got)
-        return self.interp_operations(f, [value], supports_singlefloats=True)
+        # we pass a big inline_threshold to ensure that newlist_and_gc_store
+        # is inlined, else the blackhole does not see (and thus we do not
+        # test!) the llop.gc_store_indexed
+        return self.interp_operations(f, [value], supports_singlefloats=True,
+                                      backendopt_inline_threshold=33)
 
 
     def test_force_virtual_str_storage(self):
_______________________________________________
pypy-commit mailing list
pypy-commit@python.org
https://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to