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

Unified Diff: src/scopes.cc

Issue 917703003: [strong] no sloppy equality (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 10 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
Index: src/scopes.cc
diff --git a/src/scopes.cc b/src/scopes.cc
index 16d2c111b9a86b179562839e61a32dee928824aa..d7362c0ec3fe6c5edf4161ecbd02a01b5893fcfe 100644
--- a/src/scopes.cc
+++ b/src/scopes.cc
@@ -161,7 +161,7 @@ void Scope::SetDefaults(ScopeType scope_type,
scope_uses_this_ = false;
asm_module_ = false;
asm_function_ = outer_scope != NULL && outer_scope->asm_module_;
- // Inherit the strict mode from the parent scope.
+ // Inherit the language mode from the parent scope.
language_mode_ = outer_scope != NULL ? outer_scope->language_mode_ : SLOPPY;
outer_scope_calls_sloppy_eval_ = false;
inner_scope_calls_eval_ = false;
@@ -892,7 +892,9 @@ void Scope::Print(int n) {
if (HasTrivialOuterContext()) {
Indent(n1, "// scope has trivial outer context\n");
}
- if (is_strict(language_mode())) {
+ if (is_strong(language_mode())) {
+ Indent(n1, "// strong mode scope\n");
+ } else if (is_strict(language_mode())) {
Indent(n1, "// strict mode scope\n");
}
if (scope_inside_with_) Indent(n1, "// scope inside 'with'\n");

Powered by Google App Engine
This is Rietveld 408576698