Skip to content

Refactor painless variables handling#18951

Merged
rmuir merged 1 commit intoelastic:masterfrom
rmuir:refactor_variables
Jun 18, 2016
Merged

Refactor painless variables handling#18951
rmuir merged 1 commit intoelastic:masterfrom
rmuir:refactor_variables

Conversation

@rmuir
Copy link
Copy Markdown
Contributor

@rmuir rmuir commented Jun 17, 2016

This is currently very limiting, there is a manually managed stack (with slower access), various nodes saving away bytecode variable slot numbers, nodes changing program state in analyze(), etc.

I refactored it enough to move lambda logic out of Walker into ELambda node. For captures we will have to do a little bit more (our choices are to analyze twice, or do a more complicated variable renumbering).

I think its a good stopping point as the changes impact a lot of code.

@jdconrad
Copy link
Copy Markdown
Contributor

LGTM! @rmuir Thanks for making the scoping for variables much more clear!

@rmuir rmuir merged commit b0efca6 into elastic:master Jun 18, 2016
@clintongormley clintongormley added :Core/Infra/Scripting Scripting abstractions, Painless, and Mustache and removed :Plugin Lang Painless labels Feb 14, 2018
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 >non-issue v5.0.0-alpha4

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants