Author: Armin Rigo <ar...@tunes.org>
Branch: 
Changeset: r67924:1acc538d3b48
Date: 2013-11-10 10:06 +0100
http://bitbucket.org/pypy/pypy/changeset/1acc538d3b48/

Log:    merge heads

diff --git a/pypy/module/_cffi_backend/ctypestruct.py 
b/pypy/module/_cffi_backend/ctypestruct.py
--- a/pypy/module/_cffi_backend/ctypestruct.py
+++ b/pypy/module/_cffi_backend/ctypestruct.py
@@ -95,6 +95,9 @@
         if not self._copy_from_same(cdata, w_ob):
             self.convert_struct_from_object(cdata, w_ob, optvarsize=-1)
 
+    @jit.look_inside_iff(
+        lambda self, cdata, w_ob, optvarsize: jit.isvirtual(w_ob)
+    )
     def convert_struct_from_object(self, cdata, w_ob, optvarsize):
         self._check_only_one_argument_for_union(w_ob)
 
diff --git a/pypy/module/pypyjit/test_pypy_c/test_ffi.py 
b/pypy/module/pypyjit/test_pypy_c/test_ffi.py
--- a/pypy/module/pypyjit/test_pypy_c/test_ffi.py
+++ b/pypy/module/pypyjit/test_pypy_c/test_ffi.py
@@ -327,4 +327,46 @@
 
         log = self.run(main, [300])
         loop, = log.loops_by_filename(self.filepath)
-        assert False, "XXX: fill this in"
+        assert loop.match("""
+        i161 = int_lt(i160, i43)
+        guard_true(i161, descr=...)
+        i162 = int_add(i160, 1)
+        setfield_gc(p22, i162, descr=<FieldS 
pypy.module.__builtin__.functional.W_XRangeIterator.inst_current .>)
+        guard_not_invalidated(descr=...)
+        p163 = force_token()
+        p164 = force_token()
+        p165 = getarrayitem_gc(p67, 0, descr=<ArrayP .>)
+        guard_value(p165, ConstPtr(ptr70), descr=...)
+        p166 = getfield_gc(p165, descr=<FieldP 
pypy.objspace.std.dictmultiobject.W_DictMultiObject.inst_strategy .+>)
+        guard_value(p166, ConstPtr(ptr72), descr=...)
+        p167 = call(ConstClass(_ll_0_alloc_with_del___), descr=<Callr 8 EF=4>)
+        guard_no_exception(descr=...)
+        i168 = call(ConstClass(_ll_1_raw_malloc_varsize__Signed), 12, 
descr=<Calli 8 i EF=4>)
+        setfield_gc(p167, 0, descr=<FieldU 
pypy.module._cffi_backend.cdataobj.W_CData.inst__cdata .>)
+        setfield_gc(p167, ConstPtr(ptr86), descr=<FieldP 
pypy.module._cffi_backend.cdataobj.W_CData.inst__lifeline_ .+>)
+        guard_no_exception(descr=...)
+        i169 = int_add(i168, i97)
+        i170 = int_sub(i160, i106)
+        setfield_gc(p167, i168, descr=<FieldU 
pypy.module._cffi_backend.cdataobj.W_CData.inst__cdata .>)
+        setfield_gc(p167, ConstPtr(ptr89), descr=<FieldP 
pypy.module._cffi_backend.cdataobj.W_CData.inst_ctype .+>)
+        i171 = uint_gt(i170, i108)
+        guard_false(i171, descr=...)
+        i172 = int_sub(i160, -2147483648)
+        i173 = int_and(i172, 4294967295)
+        i174 = int_add(i173, -2147483648)
+        setarrayitem_raw(i169, 0, i174, descr=<ArrayS .>)
+        i175 = int_add(i168, i121)
+        i176 = int_sub(i160, i130)
+        i177 = uint_gt(i176, i132)
+        guard_false(i177, descr=...)
+        setarrayitem_raw(i175, 0, i174, descr=<ArrayS .>)
+        i178 = int_add(i168, i140)
+        i179 = int_sub(i160, i149)
+        i180 = uint_gt(i179, i151)
+        guard_false(i180, descr=...)
+        setarrayitem_raw(i178, 0, i174, descr=<ArrayS .>)
+        --TICK--
+        i183 = arraylen_gc(p67, descr=<ArrayP .>)
+        i184 = arraylen_gc(p92, descr=<ArrayP .>)
+        jump(..., descr=...)
+        """)
_______________________________________________
pypy-commit mailing list
pypy-commit@python.org
https://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to