[pypy-svn] r48268 - in pypy/dist/pypy/rpython: . lltypesystem
cfbolz at codespeak.net
cfbolz at codespeak.net
Sat Nov 3 16:16:13 CET 2007
Author: cfbolz
Date: Sat Nov 3 16:16:11 2007
New Revision: 48268
Modified:
pypy/dist/pypy/rpython/llinterp.py
pypy/dist/pypy/rpython/lltypesystem/lloperation.py
Log:
add coalloc support to the llinterp
Modified: pypy/dist/pypy/rpython/llinterp.py
==============================================================================
--- pypy/dist/pypy/rpython/llinterp.py (original)
+++ pypy/dist/pypy/rpython/llinterp.py Sat Nov 3 16:16:11 2007
@@ -675,6 +675,10 @@
self.llinterpreter.remember_malloc(ptr, self)
return ptr
+ def op_coalloc(self, obj, coallocator, flags):
+ # it's always safe to ignore the coallocator
+ return self.op_malloc(obj, flags)
+
# only after gc transform
def op_cpy_malloc(self, obj, cpytype): # xxx
return self.heap.malloc(obj, flavor='cpy', extra_args=(cpytype,))
@@ -694,6 +698,10 @@
except MemoryError:
self.make_llexception()
+ def op_coalloc_varsize(self, obj, coallocator, flags, size):
+ # it's always safe to ignore the coallocator
+ return self.op_malloc_varsize(obj, flags, size)
+
def op_free(self, obj, flavor):
assert isinstance(flavor, str)
if flavor == 'raw' and self.llinterpreter.malloc_check:
Modified: pypy/dist/pypy/rpython/lltypesystem/lloperation.py
==============================================================================
--- pypy/dist/pypy/rpython/lltypesystem/lloperation.py (original)
+++ pypy/dist/pypy/rpython/lltypesystem/lloperation.py Sat Nov 3 16:16:11 2007
@@ -316,6 +316,8 @@
'malloc': LLOp(canraise=(MemoryError,), canunwindgc=True),
'malloc_varsize': LLOp(canraise=(MemoryError,), canunwindgc=True),
+ 'coalloc': LLOp(canraise=(MemoryError,), canunwindgc=True),
+ 'coalloc_varsize': LLOp(canraise=(MemoryError,), canunwindgc=True),
'zero_gc_pointers_inside': LLOp(),
'free': LLOp(),
'getfield': LLOp(sideeffects=False, canrun=True),
More information about the Pypy-commit
mailing list