Author: Manuel Jacob <[email protected]>
Branch: llvm-translation-backend
Changeset: r75746:bda515ef13fa
Date: 2015-02-06 21:10 +0100
http://bitbucket.org/pypy/pypy/changeset/bda515ef13fa/
Log: Implement length_of_simple_gcarray_from_opaque() operation.
diff --git a/rpython/translator/llvm/genllvm.py
b/rpython/translator/llvm/genllvm.py
--- a/rpython/translator/llvm/genllvm.py
+++ b/rpython/translator/llvm/genllvm.py
@@ -1545,6 +1545,13 @@
def op_unlikely(self, result, cond):
self.w('{result.V} = bitcast {cond.TV} to
{result.T}'.format(**locals()))
+ def op_length_of_simple_gcarray_from_opaque(self, result, ptr):
+ array_type = ArrayType()
+ array_type.setup(LLVMVoid, True)
+ tmp = self._tmp(PtrType.tmp(array_type))
+ self._cast(tmp, ptr)
+ self.op_getarraysize(result, tmp)
+
class GCPolicy(object):
def __init__(self, genllvm):
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit