Index: src/full-codegen/arm/full-codegen-arm.cc |
diff --git a/src/full-codegen/arm/full-codegen-arm.cc b/src/full-codegen/arm/full-codegen-arm.cc |
index 536123b282e1c612dbe0a0e24c5ff4a4676f82b4..135c2f14027b0e1b805c36e444a24563dd76d5d8 100644 |
--- a/src/full-codegen/arm/full-codegen-arm.cc |
+++ b/src/full-codegen/arm/full-codegen-arm.cc |
@@ -761,7 +761,7 @@ void FullCodeGenerator::VisitVariableDeclaration( |
VariableProxy* proxy = declaration->proxy(); |
VariableMode mode = declaration->mode(); |
Variable* variable = proxy->var(); |
- bool hole_init = mode == LET || mode == CONST || mode == CONST_LEGACY; |
+ bool hole_init = mode == LET || mode == CONST; |
switch (variable->location()) { |
case VariableLocation::GLOBAL: |
case VariableLocation::UNALLOCATED: |
@@ -1284,17 +1284,12 @@ void FullCodeGenerator::EmitDynamicLookupFastCase(VariableProxy* proxy, |
} else if (var->mode() == DYNAMIC_LOCAL) { |
Variable* local = var->local_if_not_shadowed(); |
__ ldr(r0, ContextSlotOperandCheckExtensions(local, slow)); |
- if (local->mode() == LET || local->mode() == CONST || |
- local->mode() == CONST_LEGACY) { |
+ if (local->mode() == LET || local->mode() == CONST) { |
__ CompareRoot(r0, Heap::kTheHoleValueRootIndex); |
- if (local->mode() == CONST_LEGACY) { |
- __ LoadRoot(r0, Heap::kUndefinedValueRootIndex, eq); |
- } else { // LET || CONST |
- __ b(ne, done); |
- __ mov(r0, Operand(var->name())); |
- __ push(r0); |
- __ CallRuntime(Runtime::kThrowReferenceError); |
- } |
+ __ b(ne, done); |
+ __ mov(r0, Operand(var->name())); |
+ __ push(r0); |
+ __ CallRuntime(Runtime::kThrowReferenceError); |
} |
__ jmp(done); |
} |
@@ -1351,10 +1346,6 @@ void FullCodeGenerator::EmitVariableLoad(VariableProxy* proxy, |
__ push(r0); |
__ CallRuntime(Runtime::kThrowReferenceError); |
__ bind(&done); |
- } else { |
- // Uninitialized legacy const bindings are unholed. |
- DCHECK(var->mode() == CONST_LEGACY); |
- __ LoadRoot(r0, Heap::kUndefinedValueRootIndex, eq); |
} |
context()->Plug(r0); |
break; |
@@ -2235,8 +2226,7 @@ void FullCodeGenerator::EmitVariableAssignment(Variable* var, Token::Value op, |
__ bind(&uninitialized_this); |
EmitStoreToStackLocalOrContextSlot(var, location); |
- } else if (!var->is_const_mode() || |
- (var->mode() == CONST && op == Token::INIT)) { |
+ } else if (!var->is_const_mode() || op == Token::INIT) { |
if (var->IsLookupSlot()) { |
// Assignment to var. |
__ Push(var->name()); |
@@ -2258,25 +2248,6 @@ void FullCodeGenerator::EmitVariableAssignment(Variable* var, Token::Value op, |
EmitStoreToStackLocalOrContextSlot(var, location); |
} |
- } else if (var->mode() == CONST_LEGACY && op == Token::INIT) { |
- // Const initializers need a write barrier. |
- DCHECK(!var->IsParameter()); // No const parameters. |
- if (var->IsLookupSlot()) { |
- __ push(r0); |
- __ mov(r0, Operand(var->name())); |
- __ Push(cp, r0); // Context and name. |
- __ CallRuntime(Runtime::kInitializeLegacyConstLookupSlot); |
- } else { |
- DCHECK(var->IsStackAllocated() || var->IsContextSlot()); |
- Label skip; |
- MemOperand location = VarOperand(var, r1); |
- __ ldr(r2, location); |
- __ CompareRoot(r2, Heap::kTheHoleValueRootIndex); |
- __ b(ne, &skip); |
- EmitStoreToStackLocalOrContextSlot(var, location); |
- __ bind(&skip); |
- } |
- |
} else { |
DCHECK(var->mode() == CONST_LEGACY && op != Token::INIT); |
if (is_strict(language_mode())) { |