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

Unified Diff: src/globals.h

Issue 1895973002: Remove all non-function-name uses of CONST_LEGACY (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Remove now-unused bits in TF and CS Created 4 years, 8 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/full-codegen/x64/full-codegen-x64.cc ('k') | src/interpreter/bytecode-generator.cc » ('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 7167423a48e125f96cf6254af65b467994f597f2..2747cbf619e2d8e5e0a5f0fdbb6c92d96436855d 100644
--- a/src/globals.h
+++ b/src/globals.h
@@ -799,51 +799,48 @@ const double kMaxSafeInteger = 9007199254740991.0; // 2^53-1
// The order of this enum has to be kept in sync with the predicates below.
enum VariableMode {
// User declared variables:
- VAR, // declared via 'var', and 'function' declarations
+ VAR, // declared via 'var', and 'function' declarations
- CONST_LEGACY, // declared via legacy 'const' declarations
+ CONST_LEGACY, // declared via legacy 'const' declarations
- LET, // declared via 'let' declarations (first lexical)
+ LET, // declared via 'let' declarations (first lexical)
- CONST, // declared via 'const' declarations
-
- IMPORT, // declared via 'import' declarations (last lexical)
+ CONST, // declared via 'const' declarations (last lexical)
// Variables introduced by the compiler:
- TEMPORARY, // temporary variables (not user-visible), stack-allocated
- // unless the scope as a whole has forced context allocation
+ TEMPORARY, // temporary variables (not user-visible), stack-allocated
+ // unless the scope as a whole has forced context allocation
- DYNAMIC, // always require dynamic lookup (we don't know
- // the declaration)
+ DYNAMIC, // always require dynamic lookup (we don't know
+ // the declaration)
DYNAMIC_GLOBAL, // requires dynamic lookup, but we know that the
// variable is global unless it has been shadowed
// by an eval-introduced variable
- DYNAMIC_LOCAL // requires dynamic lookup, but we know that the
- // variable is local and where it is unless it
- // has been shadowed by an eval-introduced
- // variable
+ DYNAMIC_LOCAL // requires dynamic lookup, but we know that the
+ // variable is local and where it is unless it
+ // has been shadowed by an eval-introduced
+ // variable
};
-
inline bool IsDynamicVariableMode(VariableMode mode) {
return mode >= DYNAMIC && mode <= DYNAMIC_LOCAL;
}
inline bool IsDeclaredVariableMode(VariableMode mode) {
- return mode >= VAR && mode <= IMPORT;
+ return mode >= VAR && mode <= CONST;
}
inline bool IsLexicalVariableMode(VariableMode mode) {
- return mode >= LET && mode <= IMPORT;
+ return mode >= LET && mode <= CONST;
}
inline bool IsImmutableVariableMode(VariableMode mode) {
- return mode == CONST || mode == CONST_LEGACY || mode == IMPORT;
+ return mode == CONST || mode == CONST_LEGACY;
}
« no previous file with comments | « src/full-codegen/x64/full-codegen-x64.cc ('k') | src/interpreter/bytecode-generator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698