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

Unified Diff: src/ast/scopes.h

Issue 2225683004: [modules] Don't force context allocation of variables declared in module scope. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 4 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 5be698fc1027b767726716467f95da37f142a5db..dec99933bae92d03d94a8b08c8ee2bf74b802f03 100644
--- a/src/ast/scopes.h
+++ b/src/ast/scopes.h
@@ -331,10 +331,9 @@ class Scope: public ZoneObject {
// Whether this needs to be represented by a runtime context.
bool NeedsContext() const {
- // Catch and module scopes always have heap slots.
+ // Catch scopes always have heap slots.
DCHECK(!is_catch_scope() || num_heap_slots() > 0);
- DCHECK(!is_module_scope() || num_heap_slots() > 0);
- return is_with_scope() || num_heap_slots() > 0;
+ return num_heap_slots() > 0;
}
// ---------------------------------------------------------------------------
« 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