-
Notifications
You must be signed in to change notification settings - Fork 1.7k
[Kernel] VariableDeclaration
should have more properties to help clients
#51554
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
Comments
VM also needs a way to distinguish synthetic variables in order to hide them in the debugger (#51512). I see the following ways of doing that:
|
DDC needs this as well of course. We need to identify variables that are generated by the CFE and do not need to be shown in the debugger. Either adding a kind to the Here is an example of what currently shows in the debugger on web platform for patterns: dart-lang/webdev#1974 /cc @nshahan @Markzipan |
This adds an [isSynthesized] flag to the [VariableDeclaration] the signal when the variable doesn't correspond to a variable in the source code. The name of a variable can only be `null` if it is synthesized. Partially in response to #51554 TEST=existing Change-Id: I94591971f11da09d210c8b25a2d05e22ca05dc62 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/286961 Reviewed-by: Joshua Litt <[email protected]> Commit-Queue: Johnni Winther <[email protected]> Reviewed-by: Chloe Stefantsova <[email protected]> Reviewed-by: Alexander Markov <[email protected]>
Thanks @johnniwinther! I am able to replace CFE-synthesized names by temporaries now and most of them now don't show in the debugger. There is one case that still looks code-unrelated, an I think is related to constant propagation changing names in cases in
Those replaced names are not marked as synthesized and show in the debugger without real connection to the code: It looks like the new names are replacing |
Addresses #51554 (comment) Closes #51391 TEST=existing Change-Id: Idec105dcfde4a91d0a21a1907777d6c07e5f01b2 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/289224 Commit-Queue: Johnni Winther <[email protected]> Reviewed-by: Chloe Stefantsova <[email protected]> Reviewed-by: Alexander Markov <[email protected]>
- Update pattern scope tests after CFE switch improvements. - Fix incorrect end offset detection in expression compiler. Account for synthetic variables that can have offsets from later code (i.e. created for hoisting). Related: #51554 Closes: #51825 Change-Id: I07cd319f8996acae2dada96ba6e43eac9e04fbb6 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/290706 Reviewed-by: Nicholas Shahan <[email protected]> Commit-Queue: Anna Gringauze <[email protected]> Reviewed-by: Mark Zhou <[email protected]>
@johnniwinther is there work left to be completed here? |
Moved to post release. |
It would be helpful if
VariableDeclaration
had more properties to capture common questions from the client.What is it?
VariableDeclaration
has properties that pertain only to parameters. CouldVariableDeclaration
and (new)ParameterDeclaration
be subclasses of a common class?How is it used?
The following summary properties would be useful to transformers and back-ends.
These properties would be much more useful if updated automatically when a transform changes the usage.
final
./cc @fishythefish @annagrin
The text was updated successfully, but these errors were encountered: