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

Side by Side Diff: src/full-codegen/ppc/full-codegen-ppc.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
OLDNEW
1 // Copyright 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 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_PPC 5 #if V8_TARGET_ARCH_PPC
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 733 matching lines...) Expand 10 before | Expand all | Expand 10 after
744 } 744 }
745 745
746 746
747 void FullCodeGenerator::VisitVariableDeclaration( 747 void FullCodeGenerator::VisitVariableDeclaration(
748 VariableDeclaration* declaration) { 748 VariableDeclaration* declaration) {
749 VariableProxy* proxy = declaration->proxy(); 749 VariableProxy* proxy = declaration->proxy();
750 Variable* variable = proxy->var(); 750 Variable* variable = proxy->var();
751 switch (variable->location()) { 751 switch (variable->location()) {
752 case VariableLocation::UNALLOCATED: { 752 case VariableLocation::UNALLOCATED: {
753 DCHECK(!variable->binding_needs_init()); 753 DCHECK(!variable->binding_needs_init());
754 globals_->Add(variable->name(), zone());
754 FeedbackVectorSlot slot = proxy->VariableFeedbackSlot(); 755 FeedbackVectorSlot slot = proxy->VariableFeedbackSlot();
755 DCHECK(!slot.IsInvalid()); 756 DCHECK(!slot.IsInvalid());
756 globals_->Add(handle(Smi::FromInt(slot.ToInt()), isolate()), zone()); 757 globals_->Add(handle(Smi::FromInt(slot.ToInt()), isolate()), zone());
757 globals_->Add(isolate()->factory()->undefined_value(), zone()); 758 globals_->Add(isolate()->factory()->undefined_value(), zone());
758 break; 759 break;
759 } 760 }
760 case VariableLocation::PARAMETER: 761 case VariableLocation::PARAMETER:
761 case VariableLocation::LOCAL: 762 case VariableLocation::LOCAL:
762 if (variable->binding_needs_init()) { 763 if (variable->binding_needs_init()) {
763 Comment cmnt(masm_, "[ VariableDeclaration"); 764 Comment cmnt(masm_, "[ VariableDeclaration");
(...skipping 29 matching lines...) Expand all
793 } 794 }
794 } 795 }
795 796
796 797
797 void FullCodeGenerator::VisitFunctionDeclaration( 798 void FullCodeGenerator::VisitFunctionDeclaration(
798 FunctionDeclaration* declaration) { 799 FunctionDeclaration* declaration) {
799 VariableProxy* proxy = declaration->proxy(); 800 VariableProxy* proxy = declaration->proxy();
800 Variable* variable = proxy->var(); 801 Variable* variable = proxy->var();
801 switch (variable->location()) { 802 switch (variable->location()) {
802 case VariableLocation::UNALLOCATED: { 803 case VariableLocation::UNALLOCATED: {
804 globals_->Add(variable->name(), zone());
803 FeedbackVectorSlot slot = proxy->VariableFeedbackSlot(); 805 FeedbackVectorSlot slot = proxy->VariableFeedbackSlot();
804 DCHECK(!slot.IsInvalid()); 806 DCHECK(!slot.IsInvalid());
805 globals_->Add(handle(Smi::FromInt(slot.ToInt()), isolate()), zone()); 807 globals_->Add(handle(Smi::FromInt(slot.ToInt()), isolate()), zone());
806 Handle<SharedFunctionInfo> function = 808 Handle<SharedFunctionInfo> function =
807 Compiler::GetSharedFunctionInfo(declaration->fun(), script(), info_); 809 Compiler::GetSharedFunctionInfo(declaration->fun(), script(), info_);
808 // Check for stack-overflow exception. 810 // Check for stack-overflow exception.
809 if (function.is_null()) return SetStackOverflow(); 811 if (function.is_null()) return SetStackOverflow();
810 globals_->Add(function, zone()); 812 globals_->Add(function, zone());
811 break; 813 break;
812 } 814 }
(...skipping 2812 matching lines...) Expand 10 before | Expand all | Expand 10 after
3625 3627
3626 DCHECK(Assembler::IsCrSet(Assembler::instr_at(cmp_address))); 3628 DCHECK(Assembler::IsCrSet(Assembler::instr_at(cmp_address)));
3627 3629
3628 DCHECK(interrupt_address == 3630 DCHECK(interrupt_address ==
3629 isolate->builtins()->OnStackReplacement()->entry()); 3631 isolate->builtins()->OnStackReplacement()->entry());
3630 return ON_STACK_REPLACEMENT; 3632 return ON_STACK_REPLACEMENT;
3631 } 3633 }
3632 } // namespace internal 3634 } // namespace internal
3633 } // namespace v8 3635 } // namespace v8
3634 #endif // V8_TARGET_ARCH_PPC 3636 #endif // V8_TARGET_ARCH_PPC
OLDNEW
« no previous file with comments | « src/full-codegen/mips64/full-codegen-mips64.cc ('k') | src/full-codegen/s390/full-codegen-s390.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698