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

Could LambdaExpression.analyseExceptions() cause problematic side-effects? #2208

Open
stephan-herrmann opened this issue Mar 23, 2024 · 1 comment
Assignees

Comments

@stephan-herrmann
Copy link
Contributor

Method LambdaExpression.analyseExceptions() runs flow analysis ahead of time.

As per #1181 (comment) I wonder, whether this could cause side-effects outside the lambda itself (the lambda is a throw-away AST)?

What are the side effects caused by flow analysis:

  • local FlowInfo, FlowContext not a problem 👍
  • local bits in ASTNode.bits, not a problem, as that's only the AST copy 👍
  • synthetics in outer scopes / types, for outer emulation, synthetic arguments etc.

Can it happen that along the lines of (3) analyseExceptions() will leave side effects outside the copy, which could have an ill effect on the final flow analysis?

@stephan-herrmann
Copy link
Contributor Author

Could eclipse-platform/eclipse.platform.releng.aggregator#1940 actually be a witness of non-local side-effects caused by analyseExceptions()?

Observed changes:

  1. Generated attribute got reordered
  2. There is a reorder in lambda parameters.

What determines such ordering? Aren't variable indices managed by enclosing scopes? Could #1181 have changed the order in which such things are registered?

If there is such connection, it wouldn't indicate a bug (yet), but might help us understand the actual impact of things happening on lambda copies, effects that should stay in Vegas, but something might still leak.

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

No branches or pull requests

2 participants