[pypy-svn] r48449 - in pypy/branch/pypy-rpython-unicode/objspace/flow: . test
fijal at codespeak.net
fijal at codespeak.net
Thu Nov 8 22:34:55 CET 2007
Author: fijal
Date: Thu Nov 8 22:34:54 2007
New Revision: 48449
Modified:
pypy/branch/pypy-rpython-unicode/objspace/flow/specialcase.py
pypy/branch/pypy-rpython-unicode/objspace/flow/test/test_objspace.py
Log:
Remove unichr as spaceop
Modified: pypy/branch/pypy-rpython-unicode/objspace/flow/specialcase.py
==============================================================================
--- pypy/branch/pypy-rpython-unicode/objspace/flow/specialcase.py (original)
+++ pypy/branch/pypy-rpython-unicode/objspace/flow/specialcase.py Thu Nov 8 22:34:54 2007
@@ -33,6 +33,8 @@
args_w = args_w + [Constant(None)]
elif opname == 'getattr' and len(args_w) == 3:
return space.do_operation('simple_call', Constant(getattr), *args_w)
+ elif opname == 'unicode' and len(args_w) == 2:
+ return space.do_operation('simple_call', Constant(unicode), *args_w)
else:
raise Exception, "should call %r with exactly %d arguments" % (
fn, Arity[opname])
Modified: pypy/branch/pypy-rpython-unicode/objspace/flow/test/test_objspace.py
==============================================================================
--- pypy/branch/pypy-rpython-unicode/objspace/flow/test/test_objspace.py (original)
+++ pypy/branch/pypy-rpython-unicode/objspace/flow/test/test_objspace.py Thu Nov 8 22:34:54 2007
@@ -712,12 +712,6 @@
return x[s]
graph = self.codetest(myfunc)
- def test_unichr_constfold(self):
- def myfunc():
- return unichr(1234)
- graph = self.codetest(myfunc)
- assert graph.startblock.exits[0].target is graph.returnblock
-
def test_unicode_constfold(self):
def myfunc():
return unicode("1234")
More information about the Pypy-commit
mailing list