Skip to content

apply optimizer to all Expr nodes#1111

Merged
davidism merged 1 commit intomasterfrom
optimizer-nodes
Dec 3, 2019
Merged

apply optimizer to all Expr nodes#1111
davidism merged 1 commit intomasterfrom
optimizer-nodes

Conversation

@davidism
Copy link
Copy Markdown
Member

@davidism davidism commented Dec 3, 2019

fixes #733

Rather than assigning each node visitor manually, generic_visit checks if the node is any Expr and tries to optimize it, so Optimizer doesn't have to be kept in sync with CodeGenerator. There were some other nodes (Pair and Keyword) that had as_const but broke other things if they were folded, so this is limited to Expr, which seems to be the original intent anyway.

@davidism davidism added this to the 2.11.0 milestone Dec 3, 2019
@davidism davidism merged commit 09ddf2d into master Dec 3, 2019
@davidism davidism deleted the optimizer-nodes branch December 3, 2019 17:13
@github-actions github-actions Bot locked as resolved and limited conversation to collaborators Nov 13, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Optimizer seems too restricted

1 participant