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

Side by Side Diff: src/full-codegen/x64/full-codegen-x64.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/s390/full-codegen-s390.cc ('k') | src/full-codegen/x87/full-codegen-x87.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 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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_X64 5 #if V8_TARGET_ARCH_X64
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 1199 matching lines...) Expand 10 before | Expand all | Expand 10 after
1210 __ jmp(done); 1210 __ jmp(done);
1211 } 1211 }
1212 } 1212 }
1213 } 1213 }
1214 1214
1215 1215
1216 void FullCodeGenerator::EmitGlobalVariableLoad(VariableProxy* proxy, 1216 void FullCodeGenerator::EmitGlobalVariableLoad(VariableProxy* proxy,
1217 TypeofMode typeof_mode) { 1217 TypeofMode typeof_mode) {
1218 #ifdef DEBUG 1218 #ifdef DEBUG
1219 Variable* var = proxy->var(); 1219 Variable* var = proxy->var();
1220 DCHECK(var->IsUnallocatedOrGlobalSlot() || 1220 DCHECK(var->IsUnallocated() ||
1221 (var->IsLookupSlot() && var->mode() == DYNAMIC_GLOBAL)); 1221 (var->IsLookupSlot() && var->mode() == DYNAMIC_GLOBAL));
1222 #endif 1222 #endif
1223 __ Move(LoadGlobalDescriptor::SlotRegister(), 1223 __ Move(LoadGlobalDescriptor::SlotRegister(),
1224 SmiFromSlot(proxy->VariableFeedbackSlot())); 1224 SmiFromSlot(proxy->VariableFeedbackSlot()));
1225 CallLoadGlobalIC(typeof_mode); 1225 CallLoadGlobalIC(typeof_mode);
1226 } 1226 }
1227 1227
1228 1228
1229 void FullCodeGenerator::EmitVariableLoad(VariableProxy* proxy, 1229 void FullCodeGenerator::EmitVariableLoad(VariableProxy* proxy,
1230 TypeofMode typeof_mode) { 1230 TypeofMode typeof_mode) {
(...skipping 1686 matching lines...) Expand 10 before | Expand all | Expand 10 after
2917 CallRuntimeWithOperands(is_strict(language_mode()) 2917 CallRuntimeWithOperands(is_strict(language_mode())
2918 ? Runtime::kDeleteProperty_Strict 2918 ? Runtime::kDeleteProperty_Strict
2919 : Runtime::kDeleteProperty_Sloppy); 2919 : Runtime::kDeleteProperty_Sloppy);
2920 context()->Plug(rax); 2920 context()->Plug(rax);
2921 } else if (proxy != NULL) { 2921 } else if (proxy != NULL) {
2922 Variable* var = proxy->var(); 2922 Variable* var = proxy->var();
2923 // Delete of an unqualified identifier is disallowed in strict mode but 2923 // Delete of an unqualified identifier is disallowed in strict mode but
2924 // "delete this" is allowed. 2924 // "delete this" is allowed.
2925 bool is_this = var->is_this(); 2925 bool is_this = var->is_this();
2926 DCHECK(is_sloppy(language_mode()) || is_this); 2926 DCHECK(is_sloppy(language_mode()) || is_this);
2927 if (var->IsUnallocatedOrGlobalSlot()) { 2927 if (var->IsUnallocated()) {
2928 __ movp(rax, NativeContextOperand()); 2928 __ movp(rax, NativeContextOperand());
2929 __ Push(ContextOperand(rax, Context::EXTENSION_INDEX)); 2929 __ Push(ContextOperand(rax, Context::EXTENSION_INDEX));
2930 __ Push(var->name()); 2930 __ Push(var->name());
2931 __ CallRuntime(Runtime::kDeleteProperty_Sloppy); 2931 __ CallRuntime(Runtime::kDeleteProperty_Sloppy);
2932 context()->Plug(rax); 2932 context()->Plug(rax);
2933 } else if (var->IsStackAllocated() || var->IsContextSlot()) { 2933 } else if (var->IsStackAllocated() || var->IsContextSlot()) {
2934 // Result of deleting non-global variables is false. 'this' is 2934 // Result of deleting non-global variables is false. 'this' is
2935 // not really a variable, though we implement it as one. The 2935 // not really a variable, though we implement it as one. The
2936 // subexpression does not have side effects. 2936 // subexpression does not have side effects.
2937 context()->Plug(is_this); 2937 context()->Plug(is_this);
(...skipping 698 matching lines...) Expand 10 before | Expand all | Expand 10 after
3636 DCHECK_EQ( 3636 DCHECK_EQ(
3637 isolate->builtins()->OnStackReplacement()->entry(), 3637 isolate->builtins()->OnStackReplacement()->entry(),
3638 Assembler::target_address_at(call_target_address, unoptimized_code)); 3638 Assembler::target_address_at(call_target_address, unoptimized_code));
3639 return ON_STACK_REPLACEMENT; 3639 return ON_STACK_REPLACEMENT;
3640 } 3640 }
3641 3641
3642 } // namespace internal 3642 } // namespace internal
3643 } // namespace v8 3643 } // namespace v8
3644 3644
3645 #endif // V8_TARGET_ARCH_X64 3645 #endif // V8_TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « src/full-codegen/s390/full-codegen-s390.cc ('k') | src/full-codegen/x87/full-codegen-x87.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698