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

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

Issue 2507143003: [ic] Pass globals' names to Runtime::kDeclareGlobals. (Closed)
Patch Set: Created 4 years, 1 month 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/x64/full-codegen-x64.cc ('k') | src/interpreter/bytecode-generator.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_X87 5 #if V8_TARGET_ARCH_X87
6 6
7 #include "src/full-codegen/full-codegen.h" 7 #include "src/full-codegen/full-codegen.h"
8 #include "src/ast/compile-time-value.h" 8 #include "src/ast/compile-time-value.h"
9 #include "src/ast/scopes.h" 9 #include "src/ast/scopes.h"
10 #include "src/code-factory.h" 10 #include "src/code-factory.h"
(...skipping 710 matching lines...) Expand 10 before | Expand all | Expand 10 after
721 } 721 }
722 722
723 723
724 void FullCodeGenerator::VisitVariableDeclaration( 724 void FullCodeGenerator::VisitVariableDeclaration(
725 VariableDeclaration* declaration) { 725 VariableDeclaration* declaration) {
726 VariableProxy* proxy = declaration->proxy(); 726 VariableProxy* proxy = declaration->proxy();
727 Variable* variable = proxy->var(); 727 Variable* variable = proxy->var();
728 switch (variable->location()) { 728 switch (variable->location()) {
729 case VariableLocation::UNALLOCATED: { 729 case VariableLocation::UNALLOCATED: {
730 DCHECK(!variable->binding_needs_init()); 730 DCHECK(!variable->binding_needs_init());
731 globals_->Add(variable->name(), zone());
731 FeedbackVectorSlot slot = proxy->VariableFeedbackSlot(); 732 FeedbackVectorSlot slot = proxy->VariableFeedbackSlot();
732 DCHECK(!slot.IsInvalid()); 733 DCHECK(!slot.IsInvalid());
733 globals_->Add(handle(Smi::FromInt(slot.ToInt()), isolate()), zone()); 734 globals_->Add(handle(Smi::FromInt(slot.ToInt()), isolate()), zone());
734 globals_->Add(isolate()->factory()->undefined_value(), zone()); 735 globals_->Add(isolate()->factory()->undefined_value(), zone());
735 break; 736 break;
736 } 737 }
737 case VariableLocation::PARAMETER: 738 case VariableLocation::PARAMETER:
738 case VariableLocation::LOCAL: 739 case VariableLocation::LOCAL:
739 if (variable->binding_needs_init()) { 740 if (variable->binding_needs_init()) {
740 Comment cmnt(masm_, "[ VariableDeclaration"); 741 Comment cmnt(masm_, "[ VariableDeclaration");
(...skipping 27 matching lines...) Expand all
768 UNREACHABLE(); 769 UNREACHABLE();
769 } 770 }
770 } 771 }
771 772
772 void FullCodeGenerator::VisitFunctionDeclaration( 773 void FullCodeGenerator::VisitFunctionDeclaration(
773 FunctionDeclaration* declaration) { 774 FunctionDeclaration* declaration) {
774 VariableProxy* proxy = declaration->proxy(); 775 VariableProxy* proxy = declaration->proxy();
775 Variable* variable = proxy->var(); 776 Variable* variable = proxy->var();
776 switch (variable->location()) { 777 switch (variable->location()) {
777 case VariableLocation::UNALLOCATED: { 778 case VariableLocation::UNALLOCATED: {
779 globals_->Add(variable->name(), zone());
778 FeedbackVectorSlot slot = proxy->VariableFeedbackSlot(); 780 FeedbackVectorSlot slot = proxy->VariableFeedbackSlot();
779 DCHECK(!slot.IsInvalid()); 781 DCHECK(!slot.IsInvalid());
780 globals_->Add(handle(Smi::FromInt(slot.ToInt()), isolate()), zone()); 782 globals_->Add(handle(Smi::FromInt(slot.ToInt()), isolate()), zone());
781 Handle<SharedFunctionInfo> function = 783 Handle<SharedFunctionInfo> function =
782 Compiler::GetSharedFunctionInfo(declaration->fun(), script(), info_); 784 Compiler::GetSharedFunctionInfo(declaration->fun(), script(), info_);
783 // Check for stack-overflow exception. 785 // Check for stack-overflow exception.
784 if (function.is_null()) return SetStackOverflow(); 786 if (function.is_null()) return SetStackOverflow();
785 globals_->Add(function, zone()); 787 globals_->Add(function, zone());
786 break; 788 break;
787 } 789 }
(...skipping 2729 matching lines...) Expand 10 before | Expand all | Expand 10 after
3517 isolate->builtins()->OnStackReplacement()->entry(), 3519 isolate->builtins()->OnStackReplacement()->entry(),
3518 Assembler::target_address_at(call_target_address, unoptimized_code)); 3520 Assembler::target_address_at(call_target_address, unoptimized_code));
3519 return ON_STACK_REPLACEMENT; 3521 return ON_STACK_REPLACEMENT;
3520 } 3522 }
3521 3523
3522 3524
3523 } // namespace internal 3525 } // namespace internal
3524 } // namespace v8 3526 } // namespace v8
3525 3527
3526 #endif // V8_TARGET_ARCH_X87 3528 #endif // V8_TARGET_ARCH_X87
OLDNEW
« no previous file with comments | « src/full-codegen/x64/full-codegen-x64.cc ('k') | src/interpreter/bytecode-generator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698