You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Mar 2, 2022. It is now read-only.
Fix peephole tests to avoid not emitting AST folded constants
Summary: Our existing peep hole tests just load things which get folded into constants. Under the 3.6 compiler the folded constants stick around, there's an optimization at code gen type where we remove constants, then the peep hole optimizer runs and turns the tuples into constants, but the LOAD_CONST/POP still remains. On 3.7 the AST optimizer runs first, turns these into LOAD_CONST's, and then they get excluded from code gen. By turning them into a STORE_... the code generator can't remove them, and the tests pass on both 3.6 and 3.7.
Test Plan: ./python -m test.test_compiler
0 commit comments