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

Side by Side Diff: src/full-codegen/arm64/full-codegen-arm64.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/arm/full-codegen-arm.cc ('k') | src/full-codegen/ia32/full-codegen-ia32.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/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 760 matching lines...) Expand 10 before | Expand all | Expand 10 after
771 } 771 }
772 772
773 773
774 void FullCodeGenerator::VisitVariableDeclaration( 774 void FullCodeGenerator::VisitVariableDeclaration(
775 VariableDeclaration* declaration) { 775 VariableDeclaration* declaration) {
776 VariableProxy* proxy = declaration->proxy(); 776 VariableProxy* proxy = declaration->proxy();
777 Variable* variable = proxy->var(); 777 Variable* variable = proxy->var();
778 switch (variable->location()) { 778 switch (variable->location()) {
779 case VariableLocation::UNALLOCATED: { 779 case VariableLocation::UNALLOCATED: {
780 DCHECK(!variable->binding_needs_init()); 780 DCHECK(!variable->binding_needs_init());
781 globals_->Add(variable->name(), zone());
781 FeedbackVectorSlot slot = proxy->VariableFeedbackSlot(); 782 FeedbackVectorSlot slot = proxy->VariableFeedbackSlot();
782 DCHECK(!slot.IsInvalid()); 783 DCHECK(!slot.IsInvalid());
783 globals_->Add(handle(Smi::FromInt(slot.ToInt()), isolate()), zone()); 784 globals_->Add(handle(Smi::FromInt(slot.ToInt()), isolate()), zone());
784 globals_->Add(isolate()->factory()->undefined_value(), zone()); 785 globals_->Add(isolate()->factory()->undefined_value(), zone());
785 break; 786 break;
786 } 787 }
787 case VariableLocation::PARAMETER: 788 case VariableLocation::PARAMETER:
788 case VariableLocation::LOCAL: 789 case VariableLocation::LOCAL:
789 if (variable->binding_needs_init()) { 790 if (variable->binding_needs_init()) {
790 Comment cmnt(masm_, "[ VariableDeclaration"); 791 Comment cmnt(masm_, "[ VariableDeclaration");
(...skipping 29 matching lines...) Expand all
820 } 821 }
821 } 822 }
822 823
823 824
824 void FullCodeGenerator::VisitFunctionDeclaration( 825 void FullCodeGenerator::VisitFunctionDeclaration(
825 FunctionDeclaration* declaration) { 826 FunctionDeclaration* declaration) {
826 VariableProxy* proxy = declaration->proxy(); 827 VariableProxy* proxy = declaration->proxy();
827 Variable* variable = proxy->var(); 828 Variable* variable = proxy->var();
828 switch (variable->location()) { 829 switch (variable->location()) {
829 case VariableLocation::UNALLOCATED: { 830 case VariableLocation::UNALLOCATED: {
831 globals_->Add(variable->name(), zone());
830 FeedbackVectorSlot slot = proxy->VariableFeedbackSlot(); 832 FeedbackVectorSlot slot = proxy->VariableFeedbackSlot();
831 DCHECK(!slot.IsInvalid()); 833 DCHECK(!slot.IsInvalid());
832 globals_->Add(handle(Smi::FromInt(slot.ToInt()), isolate()), zone()); 834 globals_->Add(handle(Smi::FromInt(slot.ToInt()), isolate()), zone());
833 Handle<SharedFunctionInfo> function = 835 Handle<SharedFunctionInfo> function =
834 Compiler::GetSharedFunctionInfo(declaration->fun(), script(), info_); 836 Compiler::GetSharedFunctionInfo(declaration->fun(), script(), info_);
835 // Check for stack overflow exception. 837 // Check for stack overflow exception.
836 if (function.is_null()) return SetStackOverflow(); 838 if (function.is_null()) return SetStackOverflow();
837 globals_->Add(function, zone()); 839 globals_->Add(function, zone());
838 break; 840 break;
839 } 841 }
(...skipping 2859 matching lines...) Expand 10 before | Expand all | Expand 10 after
3699 } 3701 }
3700 3702
3701 return INTERRUPT; 3703 return INTERRUPT;
3702 } 3704 }
3703 3705
3704 3706
3705 } // namespace internal 3707 } // namespace internal
3706 } // namespace v8 3708 } // namespace v8
3707 3709
3708 #endif // V8_TARGET_ARCH_ARM64 3710 #endif // V8_TARGET_ARCH_ARM64
OLDNEW
« no previous file with comments | « src/full-codegen/arm/full-codegen-arm.cc ('k') | src/full-codegen/ia32/full-codegen-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698