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

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

Issue 2645543002: Back strongly rooted literals CLs out of the tree for branch cut (Closed)
Patch Set: Created 3 years, 11 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/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_X64 5 #if V8_TARGET_ARCH_X64
6 6
7 #include "src/ast/compile-time-value.h" 7 #include "src/ast/compile-time-value.h"
8 #include "src/ast/scopes.h" 8 #include "src/ast/scopes.h"
9 #include "src/builtins/builtins-constructor.h" 9 #include "src/builtins/builtins-constructor.h"
10 #include "src/code-factory.h" 10 #include "src/code-factory.h"
(...skipping 705 matching lines...) Expand 10 before | Expand all | Expand 10 after
716 VariableProxy* proxy = declaration->proxy(); 716 VariableProxy* proxy = declaration->proxy();
717 Variable* variable = proxy->var(); 717 Variable* variable = proxy->var();
718 DCHECK(!variable->binding_needs_init()); 718 DCHECK(!variable->binding_needs_init());
719 switch (variable->location()) { 719 switch (variable->location()) {
720 case VariableLocation::UNALLOCATED: { 720 case VariableLocation::UNALLOCATED: {
721 globals_->Add(variable->name(), zone()); 721 globals_->Add(variable->name(), zone());
722 FeedbackVectorSlot slot = proxy->VariableFeedbackSlot(); 722 FeedbackVectorSlot slot = proxy->VariableFeedbackSlot();
723 DCHECK(!slot.IsInvalid()); 723 DCHECK(!slot.IsInvalid());
724 globals_->Add(handle(Smi::FromInt(slot.ToInt()), isolate()), zone()); 724 globals_->Add(handle(Smi::FromInt(slot.ToInt()), isolate()), zone());
725 globals_->Add(isolate()->factory()->undefined_value(), zone()); 725 globals_->Add(isolate()->factory()->undefined_value(), zone());
726 globals_->Add(isolate()->factory()->undefined_value(), zone());
727 break; 726 break;
728 } 727 }
729 case VariableLocation::PARAMETER: 728 case VariableLocation::PARAMETER:
730 case VariableLocation::LOCAL: 729 case VariableLocation::LOCAL:
731 case VariableLocation::CONTEXT: 730 case VariableLocation::CONTEXT:
732 break; 731 break;
733 732
734 case VariableLocation::LOOKUP: 733 case VariableLocation::LOOKUP:
735 case VariableLocation::MODULE: 734 case VariableLocation::MODULE:
736 UNREACHABLE(); 735 UNREACHABLE();
737 } 736 }
738 } 737 }
739 738
740 739
741 void FullCodeGenerator::VisitFunctionDeclaration( 740 void FullCodeGenerator::VisitFunctionDeclaration(
742 FunctionDeclaration* declaration) { 741 FunctionDeclaration* declaration) {
743 VariableProxy* proxy = declaration->proxy(); 742 VariableProxy* proxy = declaration->proxy();
744 Variable* variable = proxy->var(); 743 Variable* variable = proxy->var();
745 switch (variable->location()) { 744 switch (variable->location()) {
746 case VariableLocation::UNALLOCATED: { 745 case VariableLocation::UNALLOCATED: {
747 globals_->Add(variable->name(), zone()); 746 globals_->Add(variable->name(), zone());
748 FeedbackVectorSlot slot = proxy->VariableFeedbackSlot(); 747 FeedbackVectorSlot slot = proxy->VariableFeedbackSlot();
749 DCHECK(!slot.IsInvalid()); 748 DCHECK(!slot.IsInvalid());
750 globals_->Add(handle(Smi::FromInt(slot.ToInt()), isolate()), zone()); 749 globals_->Add(handle(Smi::FromInt(slot.ToInt()), isolate()), zone());
751
752 // We need the slot where the literals array lives, too.
753 slot = declaration->fun()->LiteralFeedbackSlot();
754 DCHECK(!slot.IsInvalid());
755 globals_->Add(handle(Smi::FromInt(slot.ToInt()), isolate()), zone());
756
757 Handle<SharedFunctionInfo> function = 750 Handle<SharedFunctionInfo> function =
758 Compiler::GetSharedFunctionInfo(declaration->fun(), script(), info_); 751 Compiler::GetSharedFunctionInfo(declaration->fun(), script(), info_);
759 // Check for stack-overflow exception. 752 // Check for stack-overflow exception.
760 if (function.is_null()) return SetStackOverflow(); 753 if (function.is_null()) return SetStackOverflow();
761 globals_->Add(function, zone()); 754 globals_->Add(function, zone());
762 break; 755 break;
763 } 756 }
764 757
765 case VariableLocation::PARAMETER: 758 case VariableLocation::PARAMETER:
766 case VariableLocation::LOCAL: { 759 case VariableLocation::LOCAL: {
(...skipping 1927 matching lines...) Expand 10 before | Expand all | Expand 10 after
2694 DCHECK_EQ( 2687 DCHECK_EQ(
2695 isolate->builtins()->OnStackReplacement()->entry(), 2688 isolate->builtins()->OnStackReplacement()->entry(),
2696 Assembler::target_address_at(call_target_address, unoptimized_code)); 2689 Assembler::target_address_at(call_target_address, unoptimized_code));
2697 return ON_STACK_REPLACEMENT; 2690 return ON_STACK_REPLACEMENT;
2698 } 2691 }
2699 2692
2700 } // namespace internal 2693 } // namespace internal
2701 } // namespace v8 2694 } // namespace v8
2702 2695
2703 #endif // V8_TARGET_ARCH_X64 2696 #endif // V8_TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « src/full-codegen/s390/full-codegen-s390.cc ('k') | src/interpreter/bytecode-generator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698