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

Unified Diff: src/ast/scopes.cc

Issue 2261463002: There are only 2 language modes, not 3 (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Undo last_language_mode 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 | « src/ast/scopes.h ('k') | src/code-stubs.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/ast/scopes.cc
diff --git a/src/ast/scopes.cc b/src/ast/scopes.cc
index 7df1a00b2966c91c4919de3bcf171fcf3bea174e..376fbc532af2e848365ba5d822bde2f01ea20ab7 100644
--- a/src/ast/scopes.cc
+++ b/src/ast/scopes.cc
@@ -88,7 +88,7 @@ Scope::Scope(Zone* zone, Scope* outer_scope, ScopeType scope_type)
DCHECK_EQ(SCRIPT_SCOPE, scope_type);
} else {
asm_function_ = outer_scope_->asm_module_;
- language_mode_ = outer_scope->language_mode_;
+ set_language_mode(outer_scope->language_mode());
force_context_allocation_ =
!is_function_scope() && outer_scope->has_forced_context_allocation();
outer_scope_->AddInnerScope(this);
@@ -137,7 +137,7 @@ Scope::Scope(Zone* zone, Scope* inner_scope, ScopeType scope_type,
DCHECK(scope_info.is_null());
} else {
scope_calls_eval_ = scope_info->CallsEval();
- language_mode_ = scope_info->language_mode();
+ set_language_mode(scope_info->language_mode());
num_heap_slots_ = scope_info->ContextLength();
}
DCHECK_LE(Context::MIN_CONTEXT_SLOTS, num_heap_slots_);
@@ -204,7 +204,7 @@ void Scope::SetDefaults() {
num_heap_slots_ = Context::MIN_CONTEXT_SLOTS;
num_global_slots_ = 0;
- language_mode_ = SLOPPY;
+ set_language_mode(SLOPPY);
scope_inside_with_ = false;
scope_calls_eval_ = false;
@@ -1005,7 +1005,7 @@ void DeclarationScope::AnalyzePartially(DeclarationScope* migrate_to,
DCHECK(!force_eager_compilation_);
migrate_to->set_start_position(start_position_);
migrate_to->set_end_position(end_position_);
- migrate_to->language_mode_ = language_mode_;
+ migrate_to->set_language_mode(language_mode());
migrate_to->arity_ = arity_;
migrate_to->force_context_allocation_ = force_context_allocation_;
outer_scope_->RemoveInnerScope(this);
« no previous file with comments | « src/ast/scopes.h ('k') | src/code-stubs.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698