Reviewers: rossberg,

Message:
rossberg@, ptal.

Also, oops.

Description:
[strong] Sanity fix / follow up for r28032.

ClassVariable should always have the kind CLASS, let's not pretend there
are other options.

[email protected]
BUG=

Please review this at https://codereview.chromium.org/1106483003/

Base URL: https://chromium.googlesource.com/v8/v8.git@master

Affected files (+3, -3 lines):
  M src/scopes.cc
  M src/variables.h


Index: src/scopes.cc
diff --git a/src/scopes.cc b/src/scopes.cc
index d34d2e934c89d383995291a83e25e1f92f620430..86c75ad8d7c23b91200ff4d3c78d1f982d2f261c 100644
--- a/src/scopes.cc
+++ b/src/scopes.cc
@@ -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: src/variables.h
diff --git a/src/variables.h b/src/variables.h
index 739090a884c35f5d097517ccb4fc8a3dd13938e2..31bfe42dc098e43fa4b6deabdfda076a96ee7596 100644
--- a/src/variables.h
+++ b/src/variables.h
@@ -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) {}


--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
--- You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to