• INADA Naoki's avatar
    bpo-29469: peephole: Remove const_stack (GH-4879) · 87010e85
    INADA Naoki yazdı
    Constant folding was moved to AST optimizer.
    But compiler may emit LOAD_CONSTs + BUILD_TUPLE.
    For example, default arguments can be constant tuple
    if all arguments are constant.
    
    This commit makes peephole's tuple folding simple.
    It doesn't support nested tuples because nested
    tuples are folded by AST optimizer already.
    87010e85
peephole.c 17.2 KB