[pypy-commit] pypy ffi-backend: Translation fixes
arigo
noreply at buildbot.pypy.org
Fri Aug 3 13:07:01 CEST 2012
Author: Armin Rigo <arigo at tunes.org>
Branch: ffi-backend
Changeset: r56556:b97c3f4b3750
Date: 2012-08-01 21:05 +0000
http://bitbucket.org/pypy/pypy/changeset/b97c3f4b3750/
Log: Translation fixes
diff --git a/pypy/jit/metainterp/history.py b/pypy/jit/metainterp/history.py
--- a/pypy/jit/metainterp/history.py
+++ b/pypy/jit/metainterp/history.py
@@ -39,7 +39,7 @@
# XXX fix this for oo...
if (TYPE != llmemory.Address and
rffi.sizeof(TYPE) > rffi.sizeof(lltype.Signed)):
- if supports_longlong:
+ if supports_longlong and TYPE is not lltype.LongFloat:
assert rffi.sizeof(TYPE) == 8
return 'float'
raise NotImplementedError("type %s is too large" % TYPE)
diff --git a/pypy/module/_cffi_backend/ctypestruct.py b/pypy/module/_cffi_backend/ctypestruct.py
--- a/pypy/module/_cffi_backend/ctypestruct.py
+++ b/pypy/module/_cffi_backend/ctypestruct.py
@@ -116,12 +116,14 @@
raise self._convert_error("list or tuple or dict or struct-cdata",
w_ob)
- @jit.elidable_promote()
+ @jit.elidable
def _getcfield_const(self, attr):
return self.fields_dict[attr]
def getcfield(self, attr):
if self.fields_dict is not None:
+ self = jit.promote(self)
+ attr = jit.promote_string(attr)
try:
return self._getcfield_const(attr)
except KeyError:
More information about the pypy-commit
mailing list