Remove "extractVariables" phase from Painless user tree#51690
Merged
jdconrad merged 1 commit intoelastic:masterfrom Jan 31, 2020
Merged
Remove "extractVariables" phase from Painless user tree#51690jdconrad merged 1 commit intoelastic:masterfrom
jdconrad merged 1 commit intoelastic:masterfrom
Conversation
Collaborator
|
Pinging @elastic/es-core-infra (:Core/Infra/Scripting) |
stu-elastic
reviewed
Jan 30, 2020
| allEscape = statement.allEscape; | ||
| } | ||
|
|
||
| scriptRoot.setUsedVariables(functionScope.getUsedVariables()); |
Contributor
There was a problem hiding this comment.
Why is functionScope the container for these? They used to be spread all over.
Contributor
Author
There was a problem hiding this comment.
Good question as this is in transition. It was easier to move it a single place for this PR since we only care about which function scope variables are used, but it turns out with removal of some of the custom code for the execute method in both trees it will be required throughout all scopes. This will be updated in future PRs, so I would prefer to not change it here.
Contributor
Author
|
@stu-elastic Thanks for the review! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Removes the "extractVariables" phase from the Painless user tree which is no longer necessary. The information to retrieve used variables is now collected during the semantic ("analysis") phase and passed back through ScriptRoot to generate the appropriate needs methods in the factories.