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

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

Issue 1895973002: Remove all non-function-name uses of CONST_LEGACY (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Remove now-unused bits in TF and CS 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 | « src/full-codegen/arm/full-codegen-arm.cc ('k') | src/full-codegen/full-codegen.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/full-codegen/arm64/full-codegen-arm64.cc
diff --git a/src/full-codegen/arm64/full-codegen-arm64.cc b/src/full-codegen/arm64/full-codegen-arm64.cc
index 1760ae955ece0e9eaf74dccc29a2682d00e4e812..8b1678d45a18773d755d416dc8ab71f8933e7a50 100644
--- a/src/full-codegen/arm64/full-codegen-arm64.cc
+++ b/src/full-codegen/arm64/full-codegen-arm64.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:
@@ -1270,16 +1270,11 @@ void FullCodeGenerator::EmitDynamicLookupFastCase(VariableProxy* proxy,
} else if (var->mode() == DYNAMIC_LOCAL) {
Variable* local = var->local_if_not_shadowed();
__ Ldr(x0, ContextSlotOperandCheckExtensions(local, slow));
- if (local->mode() == LET || local->mode() == CONST ||
- local->mode() == CONST_LEGACY) {
+ if (local->mode() == LET || local->mode() == CONST) {
__ JumpIfNotRoot(x0, Heap::kTheHoleValueRootIndex, done);
- if (local->mode() == CONST_LEGACY) {
- __ LoadRoot(x0, Heap::kUndefinedValueRootIndex);
- } else { // LET || CONST
- __ Mov(x0, Operand(var->name()));
- __ Push(x0);
- __ CallRuntime(Runtime::kThrowReferenceError);
- }
+ __ Mov(x0, Operand(var->name()));
+ __ Push(x0);
+ __ CallRuntime(Runtime::kThrowReferenceError);
}
__ B(done);
}
@@ -1336,11 +1331,6 @@ void FullCodeGenerator::EmitVariableLoad(VariableProxy* proxy,
__ Push(x0);
__ CallRuntime(Runtime::kThrowReferenceError);
__ Bind(&done);
- } else {
- // Uninitialized legacy const bindings are unholed.
- DCHECK(var->mode() == CONST_LEGACY);
- __ LoadRoot(x0, Heap::kUndefinedValueRootIndex);
- __ Bind(&done);
}
context()->Plug(x0);
break;
@@ -2128,8 +2118,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());
@@ -2150,23 +2139,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()) {
- __ Mov(x1, Operand(var->name()));
- __ Push(x0, cp, x1);
- __ CallRuntime(Runtime::kInitializeLegacyConstLookupSlot);
- } else {
- DCHECK(var->IsStackLocal() || var->IsContextSlot());
- Label skip;
- MemOperand location = VarOperand(var, x1);
- __ Ldr(x10, location);
- __ JumpIfNotRoot(x10, Heap::kTheHoleValueRootIndex, &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 | « src/full-codegen/arm/full-codegen-arm.cc ('k') | src/full-codegen/full-codegen.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698