Skip to content

[lldb][NFC] Move discovery of local variables earlier in expr eval #5790

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

Merged

Conversation

augusto2112
Copy link

This patch moves the discovery of local variables form SwiftExpressionParser to SwiftUserExpression. This has two main benefits:

  • In case we're binding generic parameters, we can fail earlier if we can't bind some variable.
  • Prepares the path to implement expression evaluation with an unlimited amount of generic parameters.

This patch moves the discovery of local variables form
SwiftExpressionParser to SwiftUserExpression. This has two main
benefits:
- In case we're binding generic parameters, we can fail earlier if we
  can't bind some variable.
- Prepares the path to implement expression evaluation with an unlimited
  amount of generic parameters.
@augusto2112
Copy link
Author

@swift-ci test

lldb::ExpressionVariableSP &persistent_variable_sp)
: m_persistent_variable_sp(persistent_variable_sp) {}

static constexpr unsigned Type() { return 'Pers'; }

Choose a reason for hiding this comment

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

Any idea what this is used for?

Copy link
Author

Choose a reason for hiding this comment

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

Looks like the metadata type controls how materialization works. It's only used in MaterializeVariable

@augusto2112
Copy link
Author

swiftlang/swift#62583

@swift-ci test

@augusto2112 augusto2112 merged commit 512182b into swiftlang:stable/20220421 Dec 14, 2022
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.

2 participants