[pypy-svn] r13659 - pypy/dist/pypy/rpython
ac at codespeak.net
ac at codespeak.net
Tue Jun 21 17:59:41 CEST 2005
Author: ac
Date: Tue Jun 21 17:59:41 2005
New Revision: 13659
Modified:
pypy/dist/pypy/rpython/rtyper.py
Log:
allow hl->ll translation to return a bit more than just primitive values (xxx not fully general, we do not a general equality among constant ll objects)
Modified: pypy/dist/pypy/rpython/rtyper.py
==============================================================================
--- pypy/dist/pypy/rpython/rtyper.py (original)
+++ pypy/dist/pypy/rpython/rtyper.py Tue Jun 21 17:59:41 2005
@@ -265,7 +265,10 @@
if not hop.s_result.is_constant():
raise TyperError("the annotator doesn't agree that '%s' "
"returns a constant" % op.opname)
- if resultvar.value != hop.s_result.const:
+ # xxx allow not only primitive const to be returned, but we don't have
+ # general equality for non-primitive ll constant objects;
+ # works for strings tough
+ if resultvar.value != inputconst(hop.r_result, hop.s_result.const).value:
raise TyperError("constant mismatch: %r vs %r" % (
resultvar.value, hop.s_result.const))
resulttype = resultvar.concretetype
More information about the Pypy-commit
mailing list