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

[Wildcard Variables] Web debugging support #55752

Closed
Tracked by #55673
kallentu opened this issue May 16, 2024 · 6 comments
Closed
Tracked by #55673

[Wildcard Variables] Web debugging support #55752

kallentu opened this issue May 16, 2024 · 6 comments
Assignees
Labels
area-web Use area-web for Dart web related issues, including the DDC and dart2js compilers and JS interop. feature-wildcard-variables Implementation of the wildcard variables feature web-dev-compiler web-eval evaluation support on the web

Comments

@kallentu
Copy link
Member

kallentu commented May 16, 2024

This issue tracks the web debugging support needed for the wildcards feature.

References

Correct - I think the nuance here is that in the code we emit in JavaScript we need to introduce a placeholder name to generate a valid function signature.

While our intent was to eventually make dwds model all of its state based on what we know from the dart program, there were cases in the past where it created its internal model based on the Chrome debugger's state of the application. If that is still the case today, we may need to do some work to ensure those synthetic variables are properly ignored/hidden.

Originally posted by @sigmundch in #55751

cc. @nshahan @bkonyi

@kallentu kallentu added the area-web Use area-web for Dart web related issues, including the DDC and dart2js compilers and JS interop. label May 16, 2024
@sigmundch sigmundch added web-dev-compiler web-eval evaluation support on the web labels May 17, 2024
@kallentu kallentu added the feature-wildcard-variables Implementation of the wildcard variables feature label May 17, 2024
@a-siva
Copy link
Contributor

a-siva commented Jun 24, 2024

One potential work item that came up from the discussion between the VM and CFE team this afternoon

  • wildcard locals would have to be filtered out when sending information about local variables to the client as part of the vm service reply

It is possible something similar would be needed on the web side too.

@nshahan
Copy link
Contributor

nshahan commented Jun 28, 2024

@kallentu
It will be helpful if the CFE can provide predicates to identify which variables are created by the lowering for wildcards. We already have other predicates for other lowerings in this file: https://github.com/dart-lang/sdk/blob/main/pkg/front_end/lib/src/api_prototype/lowering_predicates.dart

@kallentu
Copy link
Member Author

@kallentu It will be helpful if the CFE can provide predicates to identify which variables are created by the lowering for wildcards. We already have other predicates for other lowerings in this file: https://github.com/dart-lang/sdk/blob/main/pkg/front_end/lib/src/api_prototype/lowering_predicates.dart

Noted. Haven't changed CFE to have unique lowered names yet. I'll comment on this issue again when I make progress.

@kallentu
Copy link
Member Author

The CL that lowers wildcard variable names into unique names 1d52761 has now been submitted.

https://github.com/dart-lang/sdk/blob/main/pkg/front_end/lib/src/kernel/wildcard_lowering.dart are where the wildcard predicates and name conversions are located.

These predicates are exported by https://github.com/dart-lang/sdk/blob/main/pkg/front_end/lib/src/api_prototype/lowering_predicates.dart so you should get them if you already import this file.

@kallentu
Copy link
Member Author

Let me know if you need anything else or anything should be changed. Happy to do so.

Otherwise, CFE implementation is complete and ready for any web debugging work.

@bkonyi
Copy link
Contributor

bkonyi commented Aug 19, 2024

Looks like wildcards are being hidden correctly on web:

image

@bkonyi bkonyi closed this as completed Aug 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-web Use area-web for Dart web related issues, including the DDC and dart2js compilers and JS interop. feature-wildcard-variables Implementation of the wildcard variables feature web-dev-compiler web-eval evaluation support on the web
Projects
None yet
Development

No branches or pull requests

5 participants