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

Unified Diff: src/globals.h

Issue 948303004: Re-introduce ImportDeclaration to the parser (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Merged to trunk so I can run tryjobs 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
« no previous file with comments | « src/contexts.cc ('k') | src/parser.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/globals.h
diff --git a/src/globals.h b/src/globals.h
index cc0b267cd8abeec2cad152a4bf1eedd0520573c9..86616087ffb6687363a3deb88526f4ceb7a305cd 100644
--- a/src/globals.h
+++ b/src/globals.h
@@ -717,10 +717,12 @@ enum VariableMode {
CONST_LEGACY, // declared via legacy 'const' declarations
- LET, // declared via 'let' declarations
+ LET, // declared via 'let' declarations (first lexical)
CONST, // declared via 'const' declarations
+ IMPORT, // declared via 'import' declarations (last lexical)
+
// Variables introduced by the compiler:
INTERNAL, // like VAR, but not user-visible (may or may not
// be in a context)
@@ -748,17 +750,17 @@ inline bool IsDynamicVariableMode(VariableMode mode) {
inline bool IsDeclaredVariableMode(VariableMode mode) {
- return mode >= VAR && mode <= CONST;
+ return mode >= VAR && mode <= IMPORT;
}
inline bool IsLexicalVariableMode(VariableMode mode) {
- return mode == LET || mode == CONST;
+ return mode >= LET && mode <= IMPORT;
}
inline bool IsImmutableVariableMode(VariableMode mode) {
- return mode == CONST || mode == CONST_LEGACY;
+ return mode == CONST || mode == CONST_LEGACY || mode == IMPORT;
}
« no previous file with comments | « src/contexts.cc ('k') | src/parser.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698