Index: src/full-codegen/mips64/full-codegen-mips64.cc |
diff --git a/src/full-codegen/mips64/full-codegen-mips64.cc b/src/full-codegen/mips64/full-codegen-mips64.cc |
index a51e873709484771837eb3d707e176b2e4ec1f70..22773aaa91e33ccfe23abcae2fd657882a548e8f 100644 |
--- a/src/full-codegen/mips64/full-codegen-mips64.cc |
+++ b/src/full-codegen/mips64/full-codegen-mips64.cc |
@@ -2586,7 +2586,7 @@ void FullCodeGenerator::EmitVariableAssignment(Variable* var, Token::Value op, |
if (FLAG_vector_stores) EmitLoadStoreICSlot(slot); |
CallStoreIC(); |
- } else if (var->mode() == LET && op != Token::INIT_LET) { |
+ } else if (var->mode() == LET && op != Token::INIT) { |
// Non-initializing assignment to let variable needs a write barrier. |
DCHECK(!var->IsLookupSlot()); |
DCHECK(var->IsStackAllocated() || var->IsContextSlot()); |
@@ -2602,7 +2602,7 @@ void FullCodeGenerator::EmitVariableAssignment(Variable* var, Token::Value op, |
__ bind(&assign); |
EmitStoreToStackLocalOrContextSlot(var, location); |
- } else if (var->mode() == CONST && op != Token::INIT_CONST) { |
+ } else if (var->mode() == CONST && op != Token::INIT) { |
// Assignment to const variable needs a write barrier. |
DCHECK(!var->IsLookupSlot()); |
DCHECK(var->IsStackAllocated() || var->IsContextSlot()); |
@@ -2617,7 +2617,7 @@ void FullCodeGenerator::EmitVariableAssignment(Variable* var, Token::Value op, |
__ bind(&const_error); |
__ CallRuntime(Runtime::kThrowConstAssignError, 0); |
- } else if (var->is_this() && op == Token::INIT_CONST) { |
+ } else if (var->is_this() && var->mode() == CONST && op == Token::INIT) { |
// Initializing assignment to const {this} needs a write barrier. |
DCHECK(var->IsStackAllocated() || var->IsContextSlot()); |
Label uninitialized_this; |
@@ -2631,7 +2631,8 @@ void FullCodeGenerator::EmitVariableAssignment(Variable* var, Token::Value op, |
__ bind(&uninitialized_this); |
EmitStoreToStackLocalOrContextSlot(var, location); |
- } else if (!var->is_const_mode() || op == Token::INIT_CONST) { |
+ } else if (!var->is_const_mode() || |
+ (var->mode() == CONST && op == Token::INIT)) { |
if (var->IsLookupSlot()) { |
// Assignment to var. |
__ li(a4, Operand(var->name())); |
@@ -2647,7 +2648,7 @@ void FullCodeGenerator::EmitVariableAssignment(Variable* var, Token::Value op, |
// mode. |
DCHECK((var->IsStackAllocated() || var->IsContextSlot())); |
MemOperand location = VarOperand(var, a1); |
- if (generate_debug_code_ && op == Token::INIT_LET) { |
+ if (generate_debug_code_ && var->mode() == LET && op == Token::INIT) { |
// Check for an uninitialized let binding. |
__ ld(a2, location); |
__ LoadRoot(a4, Heap::kTheHoleValueRootIndex); |
@@ -2656,7 +2657,7 @@ void FullCodeGenerator::EmitVariableAssignment(Variable* var, Token::Value op, |
EmitStoreToStackLocalOrContextSlot(var, location); |
} |
- } else if (op == Token::INIT_CONST_LEGACY) { |
+ } else if (var->mode() == CONST_LEGACY && op == Token::INIT) { |
// Const initializers need a write barrier. |
DCHECK(!var->IsParameter()); // No const parameters. |
if (var->IsLookupSlot()) { |
@@ -2675,7 +2676,7 @@ void FullCodeGenerator::EmitVariableAssignment(Variable* var, Token::Value op, |
} |
} else { |
- DCHECK(var->mode() == CONST_LEGACY && op != Token::INIT_CONST_LEGACY); |
+ DCHECK(var->mode() == CONST_LEGACY && op != Token::INIT); |
if (is_strict(language_mode())) { |
__ CallRuntime(Runtime::kThrowConstAssignError, 0); |
} |