[pypy-svn] r31721 - pypy/branch/no-zeroing-assumption/pypy/rpython/memory
mwh at codespeak.net
mwh at codespeak.net
Sun Aug 27 13:14:30 CEST 2006
Author: mwh
Date: Sun Aug 27 13:14:29 2006
New Revision: 31721
Modified:
pypy/branch/no-zeroing-assumption/pypy/rpython/memory/gctransform.py
Log:
if raw_malloc still clears, we can comment out the code that zeros again.
hopefully the branch is now mergeable, even if it doesn't really do what it was
meant to do...
Modified: pypy/branch/no-zeroing-assumption/pypy/rpython/memory/gctransform.py
==============================================================================
--- pypy/branch/no-zeroing-assumption/pypy/rpython/memory/gctransform.py (original)
+++ pypy/branch/no-zeroing-assumption/pypy/rpython/memory/gctransform.py Sun Aug 27 13:14:29 2006
@@ -916,20 +916,20 @@
annmodel.SomeInteger(nonneg=True),
annmodel.SomeBool(), annmodel.SomeBool()], s_gcref,
inline = False)
- self.malloc_fixedsize_clear_ptr = getfn(
- GCClass.malloc_fixedsize_clear.im_func,
- [s_gc, annmodel.SomeInteger(nonneg=True),
- annmodel.SomeInteger(nonneg=True),
- annmodel.SomeBool(), annmodel.SomeBool()], s_gcref,
- inline = False)
+## self.malloc_fixedsize_clear_ptr = getfn(
+## GCClass.malloc_fixedsize_clear.im_func,
+## [s_gc, annmodel.SomeInteger(nonneg=True),
+## annmodel.SomeInteger(nonneg=True),
+## annmodel.SomeBool(), annmodel.SomeBool()], s_gcref,
+## inline = False)
self.malloc_varsize_ptr = getfn(
GCClass.malloc_varsize.im_func,
[s_gc] + [annmodel.SomeInteger(nonneg=True) for i in range(5)]
+ [annmodel.SomeBool(), annmodel.SomeBool()], s_gcref)
- self.malloc_varsize_clear_ptr = getfn(
- GCClass.malloc_varsize_clear.im_func,
- [s_gc] + [annmodel.SomeInteger(nonneg=True) for i in range(5)]
- + [annmodel.SomeBool(), annmodel.SomeBool()], s_gcref)
+## self.malloc_varsize_clear_ptr = getfn(
+## GCClass.malloc_varsize_clear.im_func,
+## [s_gc] + [annmodel.SomeInteger(nonneg=True) for i in range(5)]
+## + [annmodel.SomeBool(), annmodel.SomeBool()], s_gcref)
self.collect_ptr = getfn(GCClass.collect.im_func,
[s_gc], annmodel.s_None)
@@ -981,6 +981,7 @@
_alloc_flavor_ = 'raw'
def setup_root_stack():
stackbase = lladdress.raw_malloc(rootstacksize)
+ #lladdress.raw_memclear(stackbase, rootstacksize)
gcdata.root_stack_top = stackbase
gcdata.root_stack_base = stackbase
i = 0
@@ -1216,16 +1217,17 @@
info = self.type_info_list[type_id]
c_size = rmodel.inputconst(lltype.Signed, info["fixedsize"])
if not op.opname.endswith('_varsize'):
- if op.opname.startswith('zero'):
- malloc_ptr = self.malloc_fixedsize_clear_ptr
- else:
- malloc_ptr = self.malloc_fixedsize_ptr
+ malloc_ptr = self.malloc_fixedsize_ptr
+## if op.opname.startswith('zero'):
+## malloc_ptr = self.malloc_fixedsize_clear_ptr
+## else:
+## malloc_ptr = self.malloc_fixedsize_ptr
args = [self.c_const_gc, c_type_id, c_size, c_can_collect]
else:
v_length = op.args[-1]
c_ofstolength = rmodel.inputconst(lltype.Signed, info['ofstolength'])
c_varitemsize = rmodel.inputconst(lltype.Signed, info['varitemsize'])
- malloc_ptr = self.malloc_varsize_clear_ptr
+ malloc_ptr = self.malloc_varsize_ptr
## if op.opname.startswith('zero'):
## p = self.malloc_varsize_clear_ptr
## else:
More information about the Pypy-commit
mailing list