A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2011-March/109116.html below:

[Python-Dev] Suggest reverting today's checkin (recursive constant folding in the peephole optimizer)

[Python-Dev] Suggest reverting today's checkin (recursive constant folding in the peephole optimizer) [Python-Dev] Suggest reverting today's checkin (recursive constant folding in the peephole optimizer)Eugene Toder eltoder at gmail.com
Sat Mar 12 07:15:03 CET 2011
> One note on the patch: it allocates an extra stack which is dynamically grown;
> but there is no unittest to exercise the stack-growing code.

Isn't this doing it?

1.20 +        # Long tuples should be folded too.
1.21 +        asm = dis_single(repr(tuple(range(10000))))
1.22 +        # One LOAD_CONST for the tuple, one for the None return value
1.23 +        self.assertEqual(asm.count('LOAD_CONST'), 2)
1.24 +        self.assertNotIn('BUILD_TUPLE', asm)

Eugene
More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4