[pypy-svn] r33143 - in pypy/dist/pypy: jit/codegen/i386 jit/codegen/i386/test rpython/lltypesystem
pedronis at codespeak.net
pedronis at codespeak.net
Tue Oct 10 23:26:05 CEST 2006
Author: pedronis
Date: Tue Oct 10 23:26:02 2006
New Revision: 33143
Added:
pypy/dist/pypy/jit/codegen/i386/test/test_genc_promotion.py
- copied, changed from r33141, pypy/dist/pypy/jit/codegen/i386/test/test_genc_vlist.py
Modified:
pypy/dist/pypy/jit/codegen/i386/rgenop.py
pypy/dist/pypy/rpython/lltypesystem/lltype.py
Log:
started porting the promotion tests to the i386 backend.
Modified: pypy/dist/pypy/jit/codegen/i386/rgenop.py
==============================================================================
--- pypy/dist/pypy/jit/codegen/i386/rgenop.py (original)
+++ pypy/dist/pypy/jit/codegen/i386/rgenop.py Tue Oct 10 23:26:02 2006
@@ -795,3 +795,15 @@
def gencallableconst(self, sigtoken, name, entrypointaddr):
return IntConst(entrypointaddr)
+
+ @staticmethod
+ def erasedType(T):
+ if isinstance(T, lltype.Primitive):
+ return lltype.Signed
+ elif T is llmemory.Address:
+ return llmemory.Address
+ elif isinstance(T, lltype.Ptr):
+ return llmemory.Address
+ else:
+ assert 0, "XXX not implemented"
+
Modified: pypy/dist/pypy/rpython/lltypesystem/lltype.py
==============================================================================
--- pypy/dist/pypy/rpython/lltypesystem/lltype.py (original)
+++ pypy/dist/pypy/rpython/lltypesystem/lltype.py Tue Oct 10 23:26:02 2006
@@ -1144,7 +1144,9 @@
def _cast_to_adr(self):
from pypy.rpython.lltypesystem import llmemory
- if isinstance(self._obj, _subarray):
+ if isinstance(self._T, FuncType):
+ return llmemory.fakeaddress(self)
+ elif isinstance(self._obj, _subarray):
# return an address built as an offset in the whole array
parent, parentindex = parentlink(self._obj)
T = typeOf(parent)
More information about the Pypy-commit
mailing list