Index: src/full-codegen/ppc/full-codegen-ppc.cc |
diff --git a/src/full-codegen/ppc/full-codegen-ppc.cc b/src/full-codegen/ppc/full-codegen-ppc.cc |
index 37f8909864a83c5362c9c7263fe768063ab1ed52..fca1d9a2ce2066fd6a3eb7400996f0b68de9ee69 100644 |
--- a/src/full-codegen/ppc/full-codegen-ppc.cc |
+++ b/src/full-codegen/ppc/full-codegen-ppc.cc |
@@ -723,7 +723,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: |
@@ -1246,17 +1246,12 @@ void FullCodeGenerator::EmitDynamicLookupFastCase(VariableProxy* proxy, |
} else if (var->mode() == DYNAMIC_LOCAL) { |
Variable* local = var->local_if_not_shadowed(); |
__ LoadP(r3, ContextSlotOperandCheckExtensions(local, slow)); |
- if (local->mode() == LET || local->mode() == CONST || |
- local->mode() == CONST_LEGACY) { |
+ if (local->mode() == LET || local->mode() == CONST) { |
__ CompareRoot(r3, Heap::kTheHoleValueRootIndex); |
__ bne(done); |
- if (local->mode() == CONST_LEGACY) { |
- __ LoadRoot(r3, Heap::kUndefinedValueRootIndex); |
- } else { // LET || CONST |
- __ mov(r3, Operand(var->name())); |
- __ push(r3); |
- __ CallRuntime(Runtime::kThrowReferenceError); |
- } |
+ __ mov(r3, Operand(var->name())); |
+ __ push(r3); |
+ __ CallRuntime(Runtime::kThrowReferenceError); |
} |
__ b(done); |
} |
@@ -1312,10 +1307,6 @@ void FullCodeGenerator::EmitVariableLoad(VariableProxy* proxy, |
__ mov(r3, Operand(var->name())); |
__ push(r3); |
__ CallRuntime(Runtime::kThrowReferenceError); |
- } else { |
- // Uninitialized legacy const bindings are unholed. |
- DCHECK(var->mode() == CONST_LEGACY); |
- __ LoadRoot(r3, Heap::kUndefinedValueRootIndex); |
} |
__ bind(&done); |
context()->Plug(r3); |
@@ -2238,8 +2229,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()); |
@@ -2260,25 +2250,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(r3); |
- __ mov(r3, Operand(var->name())); |
- __ Push(cp, r3); // Context and name. |
- __ CallRuntime(Runtime::kInitializeLegacyConstLookupSlot); |
- } else { |
- DCHECK(var->IsStackAllocated() || var->IsContextSlot()); |
- Label skip; |
- MemOperand location = VarOperand(var, r4); |
- __ LoadP(r5, location); |
- __ CompareRoot(r5, Heap::kTheHoleValueRootIndex); |
- __ bne(&skip); |
- EmitStoreToStackLocalOrContextSlot(var, location); |
- __ bind(&skip); |
- } |
- |
} else { |
DCHECK(var->mode() == CONST_LEGACY && op != Token::INIT); |
if (is_strict(language_mode())) { |