Chromium Code Reviews| Index: src/arm64/full-codegen-arm64.cc |
| diff --git a/src/arm64/full-codegen-arm64.cc b/src/arm64/full-codegen-arm64.cc |
| index 083a8350320c0d495ae696b4a4dd8ddda1f7b8a5..6b388437642fab558562c7b3ca5cbd68778d2fda 100644 |
| --- a/src/arm64/full-codegen-arm64.cc |
| +++ b/src/arm64/full-codegen-arm64.cc |
| @@ -2447,6 +2447,20 @@ void FullCodeGenerator::EmitVariableAssignment(Variable* var, |
| __ Bind(&assign); |
| EmitStoreToStackLocalOrContextSlot(var, location); |
| + } else if (var->mode() == CONST && op != Token::INIT_CONST) { |
|
Dmitry Lomov (no reviews)
2015/03/04 17:57:35
Looks like the case at line 2488 anymore should be
|
| + // Assignment to const variable needs a write barrier. |
| + DCHECK(!var->IsLookupSlot()); |
| + DCHECK(var->IsStackAllocated() || var->IsContextSlot()); |
| + Label const_error; |
| + MemOperand location = VarOperand(var, x1); |
| + __ Ldr(x10, location); |
| + __ JumpIfNotRoot(x10, Heap::kTheHoleValueRootIndex, &const_error); |
| + __ Mov(x10, Operand(var->name())); |
| + __ Push(x10); |
| + __ CallRuntime(Runtime::kThrowReferenceError, 1); |
| + __ Bind(&const_error); |
| + __ CallRuntime(Runtime::kThrowConstAssignError, 0); |
| + |
| } else if (!var->is_const_mode() || op == Token::INIT_CONST) { |
| if (var->IsLookupSlot()) { |
| // Assignment to var. |