Index: src/full-codegen/mips/full-codegen-mips.cc |
diff --git a/src/full-codegen/mips/full-codegen-mips.cc b/src/full-codegen/mips/full-codegen-mips.cc |
index 58e71f6c6c9d9fde0974cbef08df02a3d02abd85..308165200c51ad0e3780d94b34fe6131316e7a56 100644 |
--- a/src/full-codegen/mips/full-codegen-mips.cc |
+++ b/src/full-codegen/mips/full-codegen-mips.cc |
@@ -758,7 +758,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: |
@@ -1278,19 +1278,13 @@ void FullCodeGenerator::EmitDynamicLookupFastCase(VariableProxy* proxy, |
} else if (var->mode() == DYNAMIC_LOCAL) { |
Variable* local = var->local_if_not_shadowed(); |
__ lw(v0, ContextSlotOperandCheckExtensions(local, slow)); |
- if (local->mode() == LET || local->mode() == CONST || |
- local->mode() == CONST_LEGACY) { |
+ if (local->mode() == LET || local->mode() == CONST) { |
__ LoadRoot(at, Heap::kTheHoleValueRootIndex); |
__ subu(at, v0, at); // Sub as compare: at == 0 on eq. |
- if (local->mode() == CONST_LEGACY) { |
- __ LoadRoot(a0, Heap::kUndefinedValueRootIndex); |
- __ Movz(v0, a0, at); // Conditional move: return Undefined if TheHole. |
- } else { // LET || CONST |
- __ Branch(done, ne, at, Operand(zero_reg)); |
- __ li(a0, Operand(var->name())); |
- __ push(a0); |
- __ CallRuntime(Runtime::kThrowReferenceError); |
- } |
+ __ Branch(done, ne, at, Operand(zero_reg)); |
+ __ li(a0, Operand(var->name())); |
+ __ push(a0); |
+ __ CallRuntime(Runtime::kThrowReferenceError); |
} |
__ Branch(done); |
} |
@@ -1348,11 +1342,6 @@ void FullCodeGenerator::EmitVariableLoad(VariableProxy* proxy, |
__ push(a0); |
__ CallRuntime(Runtime::kThrowReferenceError); |
__ bind(&done); |
- } else { |
- // Uninitialized legacy const bindings are unholed. |
- DCHECK(var->mode() == CONST_LEGACY); |
- __ LoadRoot(a0, Heap::kUndefinedValueRootIndex); |
- __ Movz(v0, a0, at); // Conditional move: Undefined if TheHole. |
} |
context()->Plug(v0); |
break; |
@@ -2241,8 +2230,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()); |
@@ -2264,24 +2252,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()) { |
- __ li(a0, Operand(var->name())); |
- __ Push(v0, cp, a0); // Context and name. |
- __ CallRuntime(Runtime::kInitializeLegacyConstLookupSlot); |
- } else { |
- DCHECK(var->IsStackAllocated() || var->IsContextSlot()); |
- Label skip; |
- MemOperand location = VarOperand(var, a1); |
- __ lw(a2, location); |
- __ LoadRoot(at, Heap::kTheHoleValueRootIndex); |
- __ Branch(&skip, ne, a2, Operand(at)); |
- EmitStoreToStackLocalOrContextSlot(var, location); |
- __ bind(&skip); |
- } |
- |
} else { |
DCHECK(var->mode() == CONST_LEGACY && op != Token::INIT); |
if (is_strict(language_mode())) { |