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

Unified Diff: src/ast/variables.cc

Issue 2324783002: Include only stuff you need, part 9: variables.h (Closed)
Patch Set: rebased Created 4 years, 3 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/ast/variables.h ('k') | src/compiler/osr.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/ast/variables.cc
diff --git a/src/ast/variables.cc b/src/ast/variables.cc
index e4362bac3dbb4ac55e2680d682261f5d2083666e..cc269cd0c7f850d76cf9861b1dd55d64406051bb 100644
--- a/src/ast/variables.cc
+++ b/src/ast/variables.cc
@@ -13,22 +13,8 @@ namespace internal {
// ----------------------------------------------------------------------------
// Implementation Variable.
-const char* Variable::Mode2String(VariableMode mode) {
- switch (mode) {
- case VAR: return "VAR";
- case LET: return "LET";
- case CONST: return "CONST";
- case DYNAMIC: return "DYNAMIC";
- case DYNAMIC_GLOBAL: return "DYNAMIC_GLOBAL";
- case DYNAMIC_LOCAL: return "DYNAMIC_LOCAL";
- case TEMPORARY: return "TEMPORARY";
- }
- UNREACHABLE();
- return NULL;
-}
-
Variable::Variable(Scope* scope, const AstRawString* name, VariableMode mode,
- Kind kind, InitializationFlag initialization_flag,
+ VariableKind kind, InitializationFlag initialization_flag,
MaybeAssignedFlag maybe_assigned_flag)
: scope_(scope),
name_(name),
@@ -40,7 +26,7 @@ Variable::Variable(Scope* scope, const AstRawString* name, VariableMode mode,
VariableModeField::encode(mode) | IsUsedField::encode(false) |
ForceContextAllocationField::encode(false) |
LocationField::encode(VariableLocation::UNALLOCATED) |
- KindField::encode(kind)) {
+ VariableKindField::encode(kind)) {
// Var declared variables never need initialization.
DCHECK(!(mode == VAR && initialization_flag == kNeedsInitialization));
}
« no previous file with comments | « src/ast/variables.h ('k') | src/compiler/osr.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698