Author: Armin Rigo <[email protected]>
Branch: cleanup-llgraph-backend
Changeset: r58164:b458ff289b23
Date: 2012-10-17 14:26 +0200
http://bitbucket.org/pypy/pypy/changeset/b458ff289b23/
Log: {get,set}arrayitem_raw
diff --git a/pypy/jit/backend/llgraph/runner.py
b/pypy/jit/backend/llgraph/runner.py
--- a/pypy/jit/backend/llgraph/runner.py
+++ b/pypy/jit/backend/llgraph/runner.py
@@ -280,21 +280,33 @@
return array.getlength()
def bh_getarrayitem_gc(self, a, index, descr):
- array = a._obj.container
+ a = support.cast_arg(lltype.Ptr(descr.A), a)
+ array = a._obj
return support.cast_result(descr.A.OF, array.getitem(index))
bh_getarrayitem_gc_i = bh_getarrayitem_gc
bh_getarrayitem_gc_r = bh_getarrayitem_gc
bh_getarrayitem_gc_f = bh_getarrayitem_gc
+ bh_getarrayitem_raw = bh_getarrayitem_gc
+ bh_getarrayitem_raw_i = bh_getarrayitem_raw
+ bh_getarrayitem_raw_r = bh_getarrayitem_raw
+ bh_getarrayitem_raw_f = bh_getarrayitem_raw
+
def bh_setarrayitem_gc(self, a, index, item, descr):
- array = a._obj.container
+ a = support.cast_arg(lltype.Ptr(descr.A), a)
+ array = a._obj
array.setitem(index, support.cast_arg(descr.A.OF, item))
bh_setarrayitem_gc_i = bh_setarrayitem_gc
bh_setarrayitem_gc_r = bh_setarrayitem_gc
bh_setarrayitem_gc_f = bh_setarrayitem_gc
+ bh_setarrayitem_raw = bh_setarrayitem_gc
+ bh_setarrayitem_raw_i = bh_setarrayitem_raw
+ bh_setarrayitem_raw_r = bh_setarrayitem_raw
+ bh_setarrayitem_raw_f = bh_setarrayitem_raw
+
def bh_getinteriorfield_gc(self, a, index, descr):
array = a._obj.container
return support.cast_result(descr.FIELD,
_______________________________________________
pypy-commit mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-commit