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