Index: src/full-codegen/mips64/full-codegen-mips64.cc |
diff --git a/src/full-codegen/mips64/full-codegen-mips64.cc b/src/full-codegen/mips64/full-codegen-mips64.cc |
index 7212d6f415997dbcc4b3c5ad4a7dd38717df1567..4c9f49aa8458055a10376e6b690c3c89bb04e98c 100644 |
--- a/src/full-codegen/mips64/full-codegen-mips64.cc |
+++ b/src/full-codegen/mips64/full-codegen-mips64.cc |
@@ -757,7 +757,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: |
@@ -1279,19 +1279,13 @@ void FullCodeGenerator::EmitDynamicLookupFastCase(VariableProxy* proxy, |
} else if (var->mode() == DYNAMIC_LOCAL) { |
Variable* local = var->local_if_not_shadowed(); |
__ ld(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); |
__ dsubu(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); |
} |
@@ -1349,11 +1343,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()) { |
__ Push(var->name()); |
__ Push(v0); |
@@ -2263,24 +2251,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); |
- __ ld(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())) { |