[pypy-svn] r59319 - pypy/branch/oo-jit/pypy/rpython
arigo at codespeak.net
arigo at codespeak.net
Wed Oct 22 16:52:13 CEST 2008
Author: arigo
Date: Wed Oct 22 16:52:12 2008
New Revision: 59319
Modified:
pypy/branch/oo-jit/pypy/rpython/rlist.py
Log:
A further hack in this function, to allow it to be
directly executed.
Modified: pypy/branch/oo-jit/pypy/rpython/rlist.py
==============================================================================
--- pypy/branch/oo-jit/pypy/rpython/rlist.py (original)
+++ pypy/branch/oo-jit/pypy/rpython/rlist.py Wed Oct 22 16:52:12 2008
@@ -8,7 +8,7 @@
from pypy.rpython.lltypesystem.lltype import typeOf, Ptr, Void, Signed, Bool
from pypy.rpython.lltypesystem.lltype import nullptr, Char, UniChar
from pypy.rpython import robject
-from pypy.rlib.objectmodel import malloc_zero_filled
+from pypy.rlib.objectmodel import malloc_zero_filled, we_are_translated
from pypy.rlib.debug import ll_assert
from pypy.rlib.rarithmetic import ovfcheck
from pypy.rpython.annlowlevel import ADTInterface
@@ -495,7 +495,8 @@
check = ord(item)
else:
check = item
- if (not malloc_zero_filled) or check: # as long as malloc it is known to zero the allocated memory avoid zeroing twice
+ zero_filled = we_are_translated() and malloc_zero_filled
+ if (not zero_filled) or check: # as long as malloc it is known to zero the allocated memory avoid zeroing twice
i = 0
while i < count:
More information about the Pypy-commit
mailing list