python/dist/src/Lib/test test_peepholer.py, 1.7, 1.8
Update of /cvsroot/python/python/dist/src/Lib/test In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23965/lib/test Modified Files: test_peepholer.py Log Message: Do not fold a constant if a large sequence will result. Saves space in the presence of code like: (None,)*10000 Index: test_peepholer.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/test/test_peepholer.py,v retrieving revision 1.7 retrieving revision 1.8 diff -u -d -r1.7 -r1.8 --- test_peepholer.py 7 Jan 2005 18:34:56 -0000 1.7 +++ test_peepholer.py 26 Jan 2005 12:50:05 -0000 1.8 @@ -129,6 +129,10 @@ self.assert_('(2)' in asm) self.assert_("('b')" in asm) + # Verify that large sequences do not result from folding + asm = dis_single('a="x"*1000') + self.assert_('(1000)' in asm) + def test_elim_extra_return(self): # RETURN LOAD_CONST None RETURN --> RETURN def f(x):
participants (1)
-
rhettingerīŧ users.sourceforge.net