[pypy-svn] r35431 - pypy/dist/pypy/rpython/lltypesystem
mwh at codespeak.net
mwh at codespeak.net
Thu Dec 7 13:38:55 CET 2006
Author: mwh
Date: Thu Dec 7 13:38:53 2006
New Revision: 35431
Modified:
pypy/dist/pypy/rpython/lltypesystem/rpbc.py
Log:
oops, is_true was 180 degrees wrong, also fix rtype_is_None ..
Modified: pypy/dist/pypy/rpython/lltypesystem/rpbc.py
==============================================================================
--- pypy/dist/pypy/rpython/lltypesystem/rpbc.py (original)
+++ pypy/dist/pypy/rpython/lltypesystem/rpbc.py Thu Dec 7 13:38:53 2006
@@ -29,9 +29,12 @@
elif robj1 == none_frozen_pbc_repr:
return hop.inputconst(Bool, True)
elif isinstance(robj1, SmallFunctionSetPBCRepr):
- v1 = hop.inputarg(robj1, pos)
- return hop.genop('char_eq', [v1, inputconst(Char, '\000')],
- resulttype=Bool)
+ if robj1.s_pbc.can_be_None:
+ v1 = hop.inputarg(robj1, pos)
+ return hop.genop('char_eq', [v1, inputconst(Char, '\000')],
+ resulttype=Bool)
+ else:
+ return inputconst(Bool, False)
else:
raise TyperError('rtype_is_None of %r' % (robj1))
@@ -171,7 +174,7 @@
return inputconst(Bool, True)
else:
v1, = hop.inputargs(self)
- return hop.genop('char_eq', [v1, inputconst(Char, '\000')],
+ return hop.genop('char_ne', [v1, inputconst(Char, '\000')],
resulttype=Bool)
def rtype_simple_call(self, hop):
More information about the Pypy-commit
mailing list