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

Unified Diff: src/v8globals.h

Issue 11093074: Get rid of static module allocation, do it in code. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Addressed last comments; added other back-ends Created 8 years, 1 month 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/variables.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/v8globals.h
diff --git a/src/v8globals.h b/src/v8globals.h
index 1d22a11032413533d9381ec142d66e6204a009d1..670ad2ef67c2642c6147c2c435bc436557693ed6 100644
--- a/src/v8globals.h
+++ b/src/v8globals.h
@@ -487,11 +487,19 @@ enum VariableMode {
CONST, // declared via 'const' declarations
- LET, // declared via 'let' declarations
+ LET, // declared via 'let' declarations (first lexical)
CONST_HARMONY, // declared via 'const' declarations in harmony mode
+ MODULE, // declared via 'module' declaration (last lexical)
+
// Variables introduced by the compiler:
+ INTERNAL, // like VAR, but not user-visible (may or may not
+ // be in a context)
+
+ TEMPORARY, // temporary variables (not user-visible), never
+ // in a context
+
DYNAMIC, // always require dynamic lookup (we don't know
// the declaration)
@@ -499,16 +507,10 @@ enum VariableMode {
// variable is global unless it has been shadowed
// by an eval-introduced variable
- DYNAMIC_LOCAL, // requires dynamic lookup, but we know that the
+ 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
-
- INTERNAL, // like VAR, but not user-visible (may or may not
- // be in a context)
-
- TEMPORARY // temporary variables (not user-visible), never
- // in a context
};
@@ -518,17 +520,17 @@ inline bool IsDynamicVariableMode(VariableMode mode) {
inline bool IsDeclaredVariableMode(VariableMode mode) {
- return mode >= VAR && mode <= CONST_HARMONY;
+ return mode >= VAR && mode <= MODULE;
}
inline bool IsLexicalVariableMode(VariableMode mode) {
- return mode >= LET && mode <= CONST_HARMONY;
+ return mode >= LET && mode <= MODULE;
}
inline bool IsImmutableVariableMode(VariableMode mode) {
- return mode == CONST || mode == CONST_HARMONY;
+ return mode == CONST || (mode >= CONST_HARMONY && mode <= MODULE);
}
« no previous file with comments | « src/scopes.cc ('k') | src/variables.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698