[strong] Sanity fix / follow up for r28032.
authormarja <marja@chromium.org>
Fri, 24 Apr 2015 12:07:38 +0000 (05:07 -0700)
committerCommit bot <commit-bot@chromium.org>
Fri, 24 Apr 2015 12:07:20 +0000 (12:07 +0000)
ClassVariable should always have the kind CLASS, let's not pretend there
are other options.

R=rossberg@chromium.org
BUG=v8:3956
LOG=N

Review URL: https://codereview.chromium.org/1106483003

Cr-Commit-Position: refs/heads/master@{#28044}

src/scopes.cc
src/variables.h

index d34d2e934c89d383995291a83e25e1f92f620430..86c75ad8d7c23b91200ff4d3c78d1f982d2f261c 100644 (file)
@@ -45,7 +45,7 @@ Variable* VariableMap::Declare(Scope* scope, const AstRawString* name,
     DCHECK(p->key == name);
     if (kind == Variable::CLASS) {
       p->value = new (zone())
-          ClassVariable(scope, name, mode, kind, initialization_flag,
+          ClassVariable(scope, name, mode, initialization_flag,
                         maybe_assigned_flag, declaration_group_start);
     } else {
       p->value = new (zone()) Variable(
index 739090a884c35f5d097517ccb4fc8a3dd13938e2..31bfe42dc098e43fa4b6deabdfda076a96ee7596 100644 (file)
@@ -187,10 +187,10 @@ class Variable: public ZoneObject {
 class ClassVariable : public Variable {
  public:
   ClassVariable(Scope* scope, const AstRawString* name, VariableMode mode,
-                Kind kind, InitializationFlag initialization_flag,
+                InitializationFlag initialization_flag,
                 MaybeAssignedFlag maybe_assigned_flag = kNotAssigned,
                 int declaration_group_start = -1)
-      : Variable(scope, name, mode, kind, initialization_flag,
+      : Variable(scope, name, mode, Variable::CLASS, initialization_flag,
                  maybe_assigned_flag),
         declaration_group_start_(declaration_group_start),
         corresponding_outer_class_variable_(nullptr) {}