Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Optimize expr.NewShaper to return ConstShaper when possible #4737

Merged
merged 1 commit into from
Aug 3, 2023

Conversation

nwt
Copy link
Member

@nwt nwt commented Aug 2, 2023

In NewShaper, when the type expression passed to the shaper function is know to be constant, return a ConstShaper (or a casterNamedType, added here) instead of a generic Shaper.

Closes #2425.

In NewShaper, when the type expression passed to the shaper function is
know to be constant, return a ConstShaper (or a casterNamedType, added
here) instead of a generic Shaper.

Closes #2425.
@nwt nwt requested a review from a team August 2, 2023 17:39
@nwt nwt merged commit 8f26982 into main Aug 3, 2023
@nwt nwt deleted the optimize-expr.NewShaper branch August 3, 2023 18:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

compiler should optimize Shaper to ConstShaper when possible
2 participants