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

Unified Diff: src/token.h

Issue 894683003: Introduce LanguageMode, drop StrictMode. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: rebased (w/ conflicts) Created 5 years, 11 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/scopes.cc ('k') | src/x64/full-codegen-x64.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/token.h
diff --git a/src/token.h b/src/token.h
index 9fc330acddb8db1f32331c3265ef0b8a4903a486..0f46b118cd58035444d2338896bec214b3cc5d63 100644
--- a/src/token.h
+++ b/src/token.h
@@ -193,7 +193,7 @@ class Token {
return token_type[tok] == 'K';
}
- static bool IsIdentifier(Value tok, StrictMode strict_mode,
+ static bool IsIdentifier(Value tok, LanguageMode language_mode,
bool is_generator) {
switch (tok) {
case IDENTIFIER:
@@ -201,9 +201,9 @@ class Token {
case FUTURE_STRICT_RESERVED_WORD:
case LET:
case STATIC:
- return strict_mode == SLOPPY;
+ return is_sloppy(language_mode);
case YIELD:
- return !is_generator && strict_mode == SLOPPY;
+ return !is_generator && is_sloppy(language_mode);
default:
return false;
}
« no previous file with comments | « src/scopes.cc ('k') | src/x64/full-codegen-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698