Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(15)

Unified Diff: src/ast/scopes.h

Issue 1901413002: [debugger] Hide scopes that originate from desugaring. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: fix crash Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | src/ast/scopes.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/ast/scopes.h
diff --git a/src/ast/scopes.h b/src/ast/scopes.h
index dae70c0142b1e2785833fb75f8f34af9ee26a0ed..52fc789866a44e2f026b99b727ec2356e4b35644 100644
--- a/src/ast/scopes.h
+++ b/src/ast/scopes.h
@@ -295,6 +295,10 @@ class Scope: public ZoneObject {
end_position_ = statement_pos;
}
+ // Scopes created for desugaring are hidden. I.e. not visible to the debugger.
+ bool is_hidden() const { return is_hidden_; }
+ void set_is_hidden() { is_hidden_ = true; }
+
// In some cases we want to force context allocation for a whole scope.
void ForceContextAllocation() {
DCHECK(!already_resolved());
@@ -574,6 +578,9 @@ class Scope: public ZoneObject {
#ifdef DEBUG
void Print(int n = 0); // n = indentation; n < 0 => don't print recursively
+
+ // Check that the scope has positions assigned.
+ void CheckScopePositions();
#endif
// ---------------------------------------------------------------------------
@@ -645,6 +652,7 @@ class Scope: public ZoneObject {
// Source positions.
int start_position_;
int end_position_;
+ bool is_hidden_;
// Computed via PropagateScopeInfo.
bool outer_scope_calls_sloppy_eval_;
« no previous file with comments | « no previous file | src/ast/scopes.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698