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

Side by Side Diff: src/full-codegen/arm64/full-codegen-arm64.cc

Issue 2287173002: Replace CollectVariables with locals(), update callsites to walk locals instead (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: restore undefined handling Created 4 years, 3 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 unified diff | 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 »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #if V8_TARGET_ARCH_ARM64 5 #if V8_TARGET_ARCH_ARM64
6 6
7 #include "src/ast/scopes.h" 7 #include "src/ast/scopes.h"
8 #include "src/code-factory.h" 8 #include "src/code-factory.h"
9 #include "src/code-stubs.h" 9 #include "src/code-stubs.h"
10 #include "src/codegen.h" 10 #include "src/codegen.h"
(...skipping 1236 matching lines...) Expand 10 before | Expand all | Expand 10 after
1247 __ B(done); 1247 __ B(done);
1248 } 1248 }
1249 } 1249 }
1250 } 1250 }
1251 1251
1252 1252
1253 void FullCodeGenerator::EmitGlobalVariableLoad(VariableProxy* proxy, 1253 void FullCodeGenerator::EmitGlobalVariableLoad(VariableProxy* proxy,
1254 TypeofMode typeof_mode) { 1254 TypeofMode typeof_mode) {
1255 #ifdef DEBUG 1255 #ifdef DEBUG
1256 Variable* var = proxy->var(); 1256 Variable* var = proxy->var();
1257 DCHECK(var->IsUnallocatedOrGlobalSlot() || 1257 DCHECK(var->IsUnallocated() ||
1258 (var->IsLookupSlot() && var->mode() == DYNAMIC_GLOBAL)); 1258 (var->IsLookupSlot() && var->mode() == DYNAMIC_GLOBAL));
1259 #endif 1259 #endif
1260 __ Mov(LoadGlobalDescriptor::SlotRegister(), 1260 __ Mov(LoadGlobalDescriptor::SlotRegister(),
1261 SmiFromSlot(proxy->VariableFeedbackSlot())); 1261 SmiFromSlot(proxy->VariableFeedbackSlot()));
1262 CallLoadGlobalIC(typeof_mode); 1262 CallLoadGlobalIC(typeof_mode);
1263 } 1263 }
1264 1264
1265 1265
1266 void FullCodeGenerator::EmitVariableLoad(VariableProxy* proxy, 1266 void FullCodeGenerator::EmitVariableLoad(VariableProxy* proxy,
1267 TypeofMode typeof_mode) { 1267 TypeofMode typeof_mode) {
(...skipping 1691 matching lines...) Expand 10 before | Expand all | Expand 10 after
2959 CallRuntimeWithOperands(is_strict(language_mode()) 2959 CallRuntimeWithOperands(is_strict(language_mode())
2960 ? Runtime::kDeleteProperty_Strict 2960 ? Runtime::kDeleteProperty_Strict
2961 : Runtime::kDeleteProperty_Sloppy); 2961 : Runtime::kDeleteProperty_Sloppy);
2962 context()->Plug(x0); 2962 context()->Plug(x0);
2963 } else if (proxy != NULL) { 2963 } else if (proxy != NULL) {
2964 Variable* var = proxy->var(); 2964 Variable* var = proxy->var();
2965 // Delete of an unqualified identifier is disallowed in strict mode but 2965 // Delete of an unqualified identifier is disallowed in strict mode but
2966 // "delete this" is allowed. 2966 // "delete this" is allowed.
2967 bool is_this = var->is_this(); 2967 bool is_this = var->is_this();
2968 DCHECK(is_sloppy(language_mode()) || is_this); 2968 DCHECK(is_sloppy(language_mode()) || is_this);
2969 if (var->IsUnallocatedOrGlobalSlot()) { 2969 if (var->IsUnallocated()) {
2970 __ LoadGlobalObject(x12); 2970 __ LoadGlobalObject(x12);
2971 __ Mov(x11, Operand(var->name())); 2971 __ Mov(x11, Operand(var->name()));
2972 __ Push(x12, x11); 2972 __ Push(x12, x11);
2973 __ CallRuntime(Runtime::kDeleteProperty_Sloppy); 2973 __ CallRuntime(Runtime::kDeleteProperty_Sloppy);
2974 context()->Plug(x0); 2974 context()->Plug(x0);
2975 } else if (var->IsStackAllocated() || var->IsContextSlot()) { 2975 } else if (var->IsStackAllocated() || var->IsContextSlot()) {
2976 // Result of deleting non-global, non-dynamic variables is false. 2976 // Result of deleting non-global, non-dynamic variables is false.
2977 // The subexpression does not have side effects. 2977 // The subexpression does not have side effects.
2978 context()->Plug(is_this); 2978 context()->Plug(is_this);
2979 } else { 2979 } else {
(...skipping 846 matching lines...) Expand 10 before | Expand all | Expand 10 after
3826 } 3826 }
3827 3827
3828 return INTERRUPT; 3828 return INTERRUPT;
3829 } 3829 }
3830 3830
3831 3831
3832 } // namespace internal 3832 } // namespace internal
3833 } // namespace v8 3833 } // namespace v8
3834 3834
3835 #endif // V8_TARGET_ARCH_ARM64 3835 #endif // V8_TARGET_ARCH_ARM64
OLDNEW
« 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