Index: src/interpreter/bytecode-generator.cc |
diff --git a/src/interpreter/bytecode-generator.cc b/src/interpreter/bytecode-generator.cc |
index 8f43b0764da7512cc775eb13a65a956fb545d4f2..7d3fd466723650e88279d0a5edca2cf2bb397b58 100644 |
--- a/src/interpreter/bytecode-generator.cc |
+++ b/src/interpreter/bytecode-generator.cc |
@@ -947,6 +947,7 @@ void BytecodeGenerator::VisitVariableDeclaration(VariableDeclaration* decl) { |
void BytecodeGenerator::VisitFunctionDeclaration(FunctionDeclaration* decl) { |
Variable* variable = decl->proxy()->var(); |
+ DCHECK(variable->mode() == LET || variable->mode() == VAR); |
switch (variable->location()) { |
case VariableLocation::GLOBAL: |
case VariableLocation::UNALLOCATED: { |
@@ -957,8 +958,6 @@ void BytecodeGenerator::VisitFunctionDeclaration(FunctionDeclaration* decl) { |
case VariableLocation::PARAMETER: |
case VariableLocation::LOCAL: { |
VisitForAccumulatorValue(decl->fun()); |
- DCHECK(variable->mode() == LET || variable->mode() == VAR || |
- variable->mode() == CONST); |
VisitVariableAssignment(variable, Token::INIT, |
FeedbackVectorSlot::Invalid()); |
break; |