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

Remove constant folding in Painless user tree #52783

Merged
merged 5 commits into from
Feb 26, 2020
Merged

Conversation

jdconrad
Copy link
Contributor

This change removes constant folding from the Painless user tree. This accomplishes two goals. The first is to remove all optimizations from the user tree which will at a later time become optimization phases for the ir tree. The second is to make the user tree immutable, and this is a step toward that since we will no longer remove/modify/replace nodes in the user tree during the process of constant folding.

One important note is that the conditional promotion code has changed, since the promoteConditional method considered constants (similarly to the JVM spec) that are now removed, but this code path was unreachable to begin with so the constants were never actually used to determine the appropriate promotion.

@jdconrad jdconrad added :Core/Infra/Scripting Scripting abstractions, Painless, and Mustache >refactoring v8.0.0 labels Feb 25, 2020
@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-core-infra (:Core/Infra/Scripting)

@jdconrad
Copy link
Contributor Author

Relates to #49869

Copy link
Member

@rjernst rjernst left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@jdconrad jdconrad merged commit f6d89ae into elastic:master Feb 26, 2020
@jdconrad
Copy link
Contributor Author

@rjernst @stu-elastic Thanks for the reviews!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
:Core/Infra/Scripting Scripting abstractions, Painless, and Mustache >refactoring v8.0.0-alpha1
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants