-
Notifications
You must be signed in to change notification settings - Fork 78
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
Hide more temporary variables when debugging #2445
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some variables created by DDC that are not present in the original source code were being shown by the debugger in the local scope. Update the regular expression used to detect temporary variable names. It has been simplified to: if the variable starts with 't$' or contains '$35' then it should be hidden. DDC names it's temporary variables to start with the characters `t$`. Hiding all of these does hide some valid variable names that could appear in the original source, but that is the status quo and not being changed here. In addition some names that are created by the CFE and added to the program contain an illegal character '#' which DDC replaces as '$35'. Variables with this sequence in the name can't appear in the original source so we hide them as well. This should hide variables synthetically added to support late local variables.
elliette
approved these changes
Jun 5, 2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you!
copybara-service bot
pushed a commit
to dart-lang/sdk
that referenced
this pull request
Jun 6, 2024
…annel, webdev, yaml_edit Revisions updated by `dart tools/rev_sdk_deps.dart`. crypto (https://github.com/dart-lang/crypto/compare/0a10171..7a9428a): 7a9428a 2024-06-04 Kevin Moore Bump lints dep (dart-archive/crypto#172) dartdoc (https://github.com/dart-lang/dartdoc/compare/45627f9..ddb8fb4): ddb8fb44 2024-06-03 Konstantin Scheglov Use package:analyzer/source/source.dart (dart-lang/dartdoc#3780) http (https://github.com/dart-lang/http/compare/7bfbeea..a3567f8): a3567f8 2024-06-05 Brian Quinlan Prepare to release cronet_http 1.3.1 (dart-lang/http#1228) 7addc61 2024-06-05 Hossein Yousefi [cronet_http] Upgrade jnigen to 0.9.2 to close `#1213` (dart-lang/http#1225) eb87a60 2024-06-04 Anikate De pkgs/ok_http: Close the client (override `close()` from `BaseClient`) (dart-lang/http#1224) 9f022d2 2024-06-04 Anikate De pkgs/http_client_conformance_tests: add boolean flag `supportsFoldedHeaders` (dart-lang/http#1222) 90837df 2024-06-03 Anikate De pkgs/ok_http: Condense JNI Bindings to `single_file` structure, and add missing server errors test (dart-lang/http#1221) logging (https://github.com/dart-lang/logging/compare/73f043a..dbd6829): dbd6829 2024-06-04 Sarah Zakarias Update `topics` in `pubspec.yaml` (dart-archive/logging#165) test (https://github.com/dart-lang/test/compare/2464ad5..83c597e): 83c597e5 2024-06-05 Jacob MacDonald enable asserts in dart2wasm tests (dart-lang/test#2241) 60353804 2024-06-04 Nate Bosch Remove an unnecessary `dynamic` (dart-lang/test#2239) 43ad4cd8 2024-06-03 Kevin Moore random cleanup (dart-lang/test#2232) 18db77c3 2024-06-02 Kevin Moore prepare to publish test_api (dart-lang/test#2238) cd72e8d8 2024-06-02 Kevin Moore Prepare to publish (dart-lang/test#2237) 9c6adaa7 2024-06-01 Kevin Moore fixes (dart-lang/test#2235) 0110a80b 2024-06-01 dependabot[bot] Bump the github-actions group with 2 updates (dart-lang/test#2236) b1b2c029 2024-06-01 Martin Kustermann Fix `dart run test -p chrome -c dart2wasm` (dart-lang/test#2233) tools (https://github.com/dart-lang/tools/compare/86b3661..4321aec): 4321aec 2024-06-05 Andrew Kolos [unified_analytics] Suppress any `FileSystemException` thrown during `Analytics.send` (dart-lang/tools#274) e5d4c8b 2024-06-03 dependabot[bot] Bump actions/checkout from 4.1.5 to 4.1.6 in the github-actions group (dart-lang/tools#271) web_socket_channel (https://github.com/dart-lang/web_socket_channel/compare/45b8ce9..bf69990): bf69990 2024-06-03 Thibault Chatillon bump web_socket dependency 0.1.3 -> 0.1.5 (dart-lang/web_socket_channel#370) 5b428dd 2024-06-02 dependabot[bot] Bump actions/checkout from 4.1.5 to 4.1.6 in the github-actions group (dart-lang/web_socket_channel#371) afd1e3c 2024-05-23 Brian Quinlan Remove `--fatal-infos` from `dart pub downgrade` analysis (dart-lang/web_socket_channel#367) cb20b71 2024-05-23 Sarah Zakarias Add `topics` to `pubspec.yaml` (dart-lang/web_socket_channel#362) 8514229 2024-05-22 Kevin Moore Bump and fix lints (dart-lang/web_socket_channel#366) webdev (https://github.com/dart-lang/webdev/compare/a97c2a1..9ada46f): 9ada46fc 2024-06-05 Nicholas Shahan Hide more temporary variables when debugging (dart-lang/webdev#2445) yaml_edit (https://github.com/dart-lang/yaml_edit/compare/963e7a3..08a146e): 08a146e 2024-06-06 Kavisi Fix splice list insertion (dart-lang/yaml_edit#84) 561309e 2024-06-01 dependabot[bot] Bump actions/checkout from 4.1.5 to 4.1.6 in the github-actions group (dart-lang/yaml_edit#85) b582fd5 2024-05-31 Kavisi Fix error thrown when inserting keys (dart-lang/yaml_edit#80) Change-Id: I36acbc26fe97d8a1e3fdfa5f4855cc4be7d84dd7 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/370080 Commit-Queue: Devon Carew <devoncarew@google.com> Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Some variables created by DDC that are not present in the original source code were being shown by the debugger in the local scope.
Update the regular expression used to detect temporary variable names. It has been simplified to: if the variable starts with 't$' or contains '$35' then it should be hidden.
DDC names it's temporary variables to start with the characters
t$
. Hiding all of these does hide some valid variable names that could appear in the original source, but that is the status quo and not being changed here. In addition some names that are created by the CFE and added to the program contain an illegal character '#' which DDC replaces as '$35'. Variables with this sequence in the name can't appear in the original source so we hide them as well.This should hide variables synthetically added to support late local variables.