Author: Brian Kearns <bdkea...@gmail.com>
Branch: 
Changeset: r69994:299fc1410b29
Date: 2014-03-16 22:51 -0400
http://bitbucket.org/pypy/pypy/changeset/299fc1410b29/

Log:    include guard_no_exception after raw malloc calls in tests

diff --git a/rpython/jit/metainterp/optimizeopt/test/test_optimizeopt.py 
b/rpython/jit/metainterp/optimizeopt/test/test_optimizeopt.py
--- a/rpython/jit/metainterp/optimizeopt/test/test_optimizeopt.py
+++ b/rpython/jit/metainterp/optimizeopt/test/test_optimizeopt.py
@@ -1729,6 +1729,7 @@
         ops = """
         [i1]
         i2 = call('malloc', 10, descr=raw_malloc_descr)
+        guard_no_exception() []
         setarrayitem_raw(i2, 0, i1, descr=rawarraydescr)
         i3 = getarrayitem_raw(i2, 0, descr=rawarraydescr)
         call('free', i2, descr=raw_free_descr)
@@ -1744,6 +1745,7 @@
         ops = """
         [i1]
         i2 = call('malloc', 10, descr=raw_malloc_descr)
+        guard_no_exception() []
         setarrayitem_raw(i2, 0, i1, descr=rawarraydescr_char)
         setarrayitem_raw(i2, 2, 456, descr=rawarraydescr_char)
         setarrayitem_raw(i2, 1, 123, descr=rawarraydescr_char)
@@ -1756,6 +1758,7 @@
         [i1]
         label('foo')
         i2 = call('malloc', 10, descr=raw_malloc_descr)
+        guard_no_exception() []
         setarrayitem_raw(i2, 0, i1, descr=rawarraydescr_char)
         i3 = int_add(i2, 1)
         setarrayitem_raw(i3, 0, 123, descr=rawarraydescr_char)
@@ -1771,6 +1774,7 @@
         ops = """
         [i1]
         i2 = call('malloc', 10, descr=raw_malloc_descr)
+        guard_no_exception() []
         setarrayitem_raw(i2, 0, i1, descr=rawarraydescr)
         label('foo') # we expect the buffer to be forced *after* the label
         setarrayitem_raw(i2, 2, 456, descr=rawarraydescr_char) # overlap!
@@ -1781,6 +1785,7 @@
         [i1]
         label('foo')
         i2 = call('malloc', 10, descr=raw_malloc_descr)
+        guard_no_exception() []
         setarrayitem_raw(i2, 0, i1, descr=rawarraydescr)
         setarrayitem_raw(i2, 2, 456, descr=rawarraydescr_char)
         call('free', i2, descr=raw_free_descr)
@@ -1792,6 +1797,7 @@
         ops = """
         [i1]
         i2 = call('malloc', 10, descr=raw_malloc_descr)
+        guard_no_exception() []
         setarrayitem_raw(i2, 0, i1, descr=rawarraydescr)
         label('foo') # we expect the buffer to be forced *after* the label
         i3 = getarrayitem_raw(i2, 0, descr=rawarraydescr_char)
@@ -1802,6 +1808,7 @@
         [i1]
         label('foo')
         i2 = call('malloc', 10, descr=raw_malloc_descr)
+        guard_no_exception() []
         setarrayitem_raw(i2, 0, i1, descr=rawarraydescr)
         i3 = getarrayitem_raw(i2, 0, descr=rawarraydescr_char)
         call('free', i2, descr=raw_free_descr)
@@ -1813,6 +1820,7 @@
         ops = """
         [i0, i1]
         i2 = call('malloc', 10, descr=raw_malloc_descr)
+        guard_no_exception() []
         setarrayitem_raw(i2, 0, 42, descr=rawarraydescr_char)
         i3 = int_add(i2, 1) # get a slice of the original buffer
         setarrayitem_raw(i3, 0, 4242, descr=rawarraydescr) # write to the slice
@@ -1832,6 +1840,7 @@
         ops = """
         [i0, i1]
         i2 = call('malloc', 10, descr=raw_malloc_descr)
+        guard_no_exception() []
         i3 = int_add(i2, 1) # get a slice of the original buffer
         i4 = int_add(i3, 1) # get a slice of a slice
         setarrayitem_raw(i4, 0, i1, descr=rawarraydescr_char) # write to the 
slice
@@ -1849,6 +1858,7 @@
         ops = """
         [i0, i1]
         i2 = call('malloc', 10, descr=raw_malloc_descr)
+        guard_no_exception() []
         setarrayitem_raw(i2, 0, 42, descr=rawarraydescr_char)
         i3 = int_add(i2, 1) # get a slice of the original buffer
         setarrayitem_raw(i3, 4, 4242, descr=rawarraydescr_char) # write to the 
slice
@@ -1861,6 +1871,7 @@
         label('foo')
         # these ops are generated by VirtualRawBufferValue._really_force
         i2 = call('malloc', 10, descr=raw_malloc_descr)
+        guard_no_exception() []
         setarrayitem_raw(i2, 0, 42, descr=rawarraydescr_char)
         i3 = int_add(i2, 5) # 1+4*sizeof(char)
         setarrayitem_raw(i3, 0, 4242, descr=rawarraydescr_char)
@@ -1878,6 +1889,7 @@
         i2 = int_add(i1, 1)
         call('free', i0, descr=raw_free_descr)
         i3 = call('malloc', 10, descr=raw_malloc_descr)
+        guard_no_exception() []
         setarrayitem_raw(i3, 0, i2, descr=rawarraydescr)
         label('foo')
         jump(i3)
@@ -1889,6 +1901,7 @@
         call('free', i0, descr=raw_free_descr)
         label('foo')
         i3 = call('malloc', 10, descr=raw_malloc_descr)
+        guard_no_exception() []
         setarrayitem_raw(i3, 0, i2, descr=rawarraydescr)
         jump(i3)
         """
@@ -1898,6 +1911,7 @@
         ops = """
         [i1]
         i0 = call('malloc', 10, descr=raw_malloc_descr)
+        guard_no_exception() []
         raw_store(i0, 0, i1, descr=rawarraydescr)
         i2 = raw_load(i0, 0, descr=rawarraydescr)
         i3 = int_add(i1, i2)
@@ -1915,6 +1929,7 @@
         ops = """
         [f1]
         i0 = call('malloc', 16, descr=raw_malloc_descr)
+        guard_no_exception() []
         raw_store(i0, 8, f1, descr=rawarraydescr_float)
         f2 = getarrayitem_raw(i0, 1, descr=rawarraydescr_float)
         f3 = float_add(f1, f2)
_______________________________________________
pypy-commit mailing list
pypy-commit@python.org
https://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to