[pypy-svn] r68089 - pypy/branch/floats-via-sse2/pypy/jit/backend/test
fijal at codespeak.net
fijal at codespeak.net
Thu Oct 1 11:52:21 CEST 2009
Author: fijal
Date: Thu Oct 1 11:52:20 2009
New Revision: 68089
Modified:
pypy/branch/floats-via-sse2/pypy/jit/backend/test/runner_test.py
Log:
get/set field
Modified: pypy/branch/floats-via-sse2/pypy/jit/backend/test/runner_test.py
==============================================================================
--- pypy/branch/floats-via-sse2/pypy/jit/backend/test/runner_test.py (original)
+++ pypy/branch/floats-via-sse2/pypy/jit/backend/test/runner_test.py Thu Oct 1 11:52:20 2009
@@ -1031,6 +1031,19 @@
descrfld_rx)
assert rs.x == '!'
#
+
+ if self.cpu.supports_floats:
+ descrfld_z = cpu.fielddescrof(S, 'z')
+ cpu.do_setfield_gc(
+ BoxPtr(lltype.cast_opaque_ptr(llmemory.GCREF, s)),
+ BoxFloat(3.5),
+ descrfld_z)
+ assert s.z == 3.5
+ s.z = 3.2
+ x = cpu.do_getfield_gc(
+ BoxPtr(lltype.cast_opaque_ptr(llmemory.GCREF, s)),
+ descrfld_z)
+ assert x.getfloat() == 3.2
### we don't support in the JIT for now GC pointers
### stored inside non-GC structs.
#descrfld_ry = cpu.fielddescrof(RS, 'y')
More information about the Pypy-commit
mailing list