Index: src/full-codegen/ppc/full-codegen-ppc.cc |
diff --git a/src/full-codegen/ppc/full-codegen-ppc.cc b/src/full-codegen/ppc/full-codegen-ppc.cc |
index d6ce1c02cd1712454b5d3a4009334db98ba42873..2f73f345790868730f84719f2d1572216cbccab3 100644 |
--- a/src/full-codegen/ppc/full-codegen-ppc.cc |
+++ b/src/full-codegen/ppc/full-codegen-ppc.cc |
@@ -2593,7 +2593,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()); |
@@ -2609,7 +2609,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()); |
@@ -2624,7 +2624,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; |
@@ -2638,7 +2638,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. |
__ push(r3); // Value. |
@@ -2651,7 +2652,7 @@ void FullCodeGenerator::EmitVariableAssignment(Variable* var, Token::Value op, |
// mode. |
DCHECK((var->IsStackAllocated() || var->IsContextSlot())); |
MemOperand location = VarOperand(var, r4); |
- if (generate_debug_code_ && op == Token::INIT_LET) { |
+ if (generate_debug_code_ && var->mode() == LET && op == Token::INIT) { |
// Check for an uninitialized let binding. |
__ LoadP(r5, location); |
__ CompareRoot(r5, Heap::kTheHoleValueRootIndex); |
@@ -2659,9 +2660,8 @@ 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->mode() == CONST_LEGACY); |
DCHECK(!var->IsParameter()); // No const parameters. |
if (var->IsLookupSlot()) { |
__ push(r3); |
@@ -2680,7 +2680,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); |
} |