I'm in the process of adding FFI to pixie. It translates and runs fine (I'm sure there's still bugs). But the trace is a bit verbose, so I decided I'd unroll the loop that packs the arguments in the exchange buffer. However then I get this error:
[translation:info] File "<388-codegen /Users/tim/oss-not-dropbox/externals/pypy/rpython/rtyper/rtyper.py:540>", line 4, in translate_op_call_args [translation:info] return r_arg1.rtype_call_args(hop) [translation:info] File "/Users/tim/oss-not-dropbox/externals/pypy/rpython/rtyper/rpbc.py", line 659, in rtype_call_args [translation:info] return self.redispatch_call(hop, call_args=True) [translation:info] File "/Users/tim/oss-not-dropbox/externals/pypy/rpython/rtyper/rpbc.py", line 686, in redispatch_call [translation:info] hop.llops, hop) [translation:info] File "/Users/tim/oss-not-dropbox/externals/pypy/rpython/rtyper/rclass.py", line 1075, in rtype_new_instance [translation:info] return rinstance.new_instance(llops, classcallhop) [translation:info] File "/Users/tim/oss-not-dropbox/externals/pypy/rpython/rtyper/rclass.py", line 715, in new_instance [translation:info] r.convert_desc_or_const(value)) [translation:info] File "/Users/tim/oss-not-dropbox/externals/pypy/rpython/rtyper/rmodel.py", line 115, in convert_desc_or_const [translation:info] return self.convert_const(desc_or_const.value) [translation:info] File "/Users/tim/oss-not-dropbox/externals/pypy/rpython/rtyper/lltypesystem/rpbc.py", line 158, in convert_const [translation:info] funcdesc = self.rtyper.annotator.bookkeeper.getdesc(value) [translation:info] File "/Users/tim/oss-not-dropbox/externals/pypy/rpython/annotator/bookkeeper.py", line 396, in getdesc [translation:info] raise Exception("%s: %r" % (msg, pyobj)) [translation:ERROR] Exception: unexpected prebuilt constant: <staticmethod object at 0x10a8d5bb0> The line I'm un-commenting is here: https://github.com/pixie-lang/pixie/blob/master/pixie/vm/libs/ffi.py#L150 >From what I can tell this bug is from the translator trying to do something with the static methods in CallDescr. Why this is happening, I haven't a clue. Timothy
_______________________________________________ pypy-dev mailing list pypy-dev@python.org https://mail.python.org/mailman/listinfo/pypy-dev