[pypy-commit] pypy numpy-dtype-alt: Back to this version, JIT doesn't like it, I think it might be an issue with casting on llgraph.
alex_gaynor
noreply at buildbot.pypy.org
Sun Aug 7 05:00:53 CEST 2011
Author: Alex Gaynor <alex.gaynor at gmail.com>
Branch: numpy-dtype-alt
Changeset: r46345:c7ecc17ad217
Date: 2011-08-06 20:02 -0700
http://bitbucket.org/pypy/pypy/changeset/c7ecc17ad217/
Log: Back to this version, JIT doesn't like it, I think it might be an
issue with casting on llgraph.
diff --git a/pypy/module/micronumpy/interp_dtype.py b/pypy/module/micronumpy/interp_dtype.py
--- a/pypy/module/micronumpy/interp_dtype.py
+++ b/pypy/module/micronumpy/interp_dtype.py
@@ -2,7 +2,7 @@
from pypy.interpreter.gateway import interp2app
from pypy.interpreter.typedef import TypeDef, interp_attrproperty
from pypy.rlib.unroll import unrolling_iterable
-from pypy.rpython.lltypesystem import lltype, llmemory
+from pypy.rpython.lltypesystem import lltype, llmemory, rffi
SIGNEDLTR = "i"
@@ -38,9 +38,10 @@
_mixin_ = True
def erase(self, storage):
- return llmemory.cast_ptr_to_adr(storage)
+ return rffi.cast(VOID_TP, storage)
+
def unerase(self, storage):
- return llmemory.cast_adr_to_ptr(storage, lltype.Ptr(self.TP))
+ return rffi.cast(lltype.Ptr(self.TP), storage)
def malloc(self, size):
# XXX find out why test_zjit explodes with tracking of allocations
@@ -58,6 +59,9 @@
def setitem_w(self, space, storage, i, w_item):
self.setitem(storage, i, self.unwrap(space, w_item))
+
+VOID_TP = lltype.Ptr(lltype.Array(lltype.Void, hints={"nolength": True}))
+
class W_Int8Dtype(W_Dtype, LowLevelDtype):
num = 1
kind = SIGNEDLTR
More information about the pypy-commit
mailing list