| Index: src/ia32/full-codegen-ia32.cc
 | 
| diff --git a/src/ia32/full-codegen-ia32.cc b/src/ia32/full-codegen-ia32.cc
 | 
| index ce36f9ed07b0beac8bba413711da7b42473d44a1..d17137042a5d407b7c68c4bbd446f4a163058f4a 100644
 | 
| --- a/src/ia32/full-codegen-ia32.cc
 | 
| +++ b/src/ia32/full-codegen-ia32.cc
 | 
| @@ -2664,6 +2664,19 @@ void FullCodeGenerator::EmitVariableAssignment(Variable* var,
 | 
|      __ CallRuntime(Runtime::kThrowReferenceError, 1);
 | 
|      __ bind(&assign);
 | 
|      EmitStoreToStackLocalOrContextSlot(var, location);
 | 
| +  } else if (var->mode() == CONST && op != Token::INIT_CONST) {
 | 
| +    // Assignment to let variable needs a write barrier.
 | 
| +    DCHECK(!var->IsLookupSlot());
 | 
| +    DCHECK(var->IsStackAllocated() || var->IsContextSlot());
 | 
| +    Label const_error;
 | 
| +    MemOperand location = VarOperand(var, ecx);
 | 
| +    __ mov(edx, location);
 | 
| +    __ cmp(edx, isolate()->factory()->the_hole_value());
 | 
| +    __ j(not_equal, &const_error, Label::kNear);
 | 
| +    __ push(Immediate(var->name()));
 | 
| +    __ 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.
 | 
| 
 |