Author: Antonio Cuni <[email protected]>
Branch: virtual-raw-mallocs
Changeset: r59526:46cf6849182f
Date: 2012-12-20 17:44 +0100
http://bitbucket.org/pypy/pypy/changeset/46cf6849182f/

Log:    improve the test to check that the raw_malloc has been virtualized

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
@@ -206,6 +206,12 @@
             f1 = call_release_gil(..., descr=<Callf 8 ff EF=6 OS=62>)
             ...
         """)
+        ops = loop.ops_by_id('cfficall')
+        assert 'raw_malloc' not in str(ops)
+        assert 'raw_free' not in str(ops)
+        assert 'getarrayitem_raw' not in log.opnames(ops)
+        assert 'setarrayitem_raw' not in log.opnames(ops)
         # so far just check that call_release_gil() is produced.
         # later, also check that the arguments to call_release_gil()
-        # are constants, and that the numerous raw_mallocs are removed
+        # are constants
+
_______________________________________________
pypy-commit mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to