Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(156)

Unified Diff: src/full-codegen/s390/full-codegen-s390.cc

Issue 1901423004: S390: Remove all non-function-name uses of CONST_LEGACY (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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())) {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698