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

Side by Side Diff: src/code-stubs.cc

Issue 442763002: Load constants from the DescriptorArray (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Also removed from arm64 Created 6 years, 4 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 | Annotate | Revision Log
« no previous file with comments | « src/code-stubs.h ('k') | src/code-stubs-hydrogen.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 #include "src/v8.h" 5 #include "src/v8.h"
6 6
7 #include "src/bootstrapper.h" 7 #include "src/bootstrapper.h"
8 #include "src/code-stubs.h" 8 #include "src/code-stubs.h"
9 #include "src/cpu-profiler.h" 9 #include "src/cpu-profiler.h"
10 #include "src/factory.h" 10 #include "src/factory.h"
(...skipping 595 matching lines...) Expand 10 before | Expand all | Expand 10 after
606 Register registers[] = { InterfaceDescriptor::ContextRegister(), 606 Register registers[] = { InterfaceDescriptor::ContextRegister(),
607 LoadIC::ReceiverRegister(), 607 LoadIC::ReceiverRegister(),
608 LoadIC::NameRegister() }; 608 LoadIC::NameRegister() };
609 STATIC_ASSERT(LoadIC::kParameterCount == 2); 609 STATIC_ASSERT(LoadIC::kParameterCount == 2);
610 descriptor->Initialize( 610 descriptor->Initialize(
611 MajorKey(), ARRAY_SIZE(registers), registers, 611 MajorKey(), ARRAY_SIZE(registers), registers,
612 Runtime::FunctionForId(Runtime::kKeyedGetProperty)->entry); 612 Runtime::FunctionForId(Runtime::kKeyedGetProperty)->entry);
613 } 613 }
614 614
615 615
616 void LoadFieldStub::InitializeInterfaceDescriptor( 616 void HandlerStub::InitializeInterfaceDescriptor(
617 CodeStubInterfaceDescriptor* descriptor) { 617 CodeStubInterfaceDescriptor* descriptor) {
618 Register registers[] = { InterfaceDescriptor::ContextRegister(), 618 if (kind() == Code::LOAD_IC) {
619 LoadIC::ReceiverRegister() }; 619 Register registers[] = {InterfaceDescriptor::ContextRegister(),
620 descriptor->Initialize(MajorKey(), ARRAY_SIZE(registers), registers); 620 LoadIC::ReceiverRegister(), LoadIC::NameRegister()};
621 descriptor->Initialize(MajorKey(), ARRAY_SIZE(registers), registers);
622 } else {
623 DCHECK_EQ(Code::STORE_IC, kind());
624 Register registers[] = {InterfaceDescriptor::ContextRegister(),
625 StoreIC::ReceiverRegister(),
626 StoreIC::NameRegister(), StoreIC::ValueRegister()};
627 descriptor->Initialize(MajorKey(), ARRAY_SIZE(registers), registers,
628 FUNCTION_ADDR(StoreIC_MissFromStubFailure));
629 }
621 } 630 }
622 631
623 632
624 void StringLengthStub::InitializeInterfaceDescriptor(
625 CodeStubInterfaceDescriptor* descriptor) {
626 Register registers[] = { InterfaceDescriptor::ContextRegister(),
627 LoadIC::ReceiverRegister(),
628 LoadIC::NameRegister() };
629 descriptor->Initialize(MajorKey(), ARRAY_SIZE(registers), registers);
630 }
631
632
633 void StoreFastElementStub::InitializeInterfaceDescriptor( 633 void StoreFastElementStub::InitializeInterfaceDescriptor(
634 CodeStubInterfaceDescriptor* descriptor) { 634 CodeStubInterfaceDescriptor* descriptor) {
635 Register registers[] = { InterfaceDescriptor::ContextRegister(), 635 Register registers[] = { InterfaceDescriptor::ContextRegister(),
636 KeyedStoreIC::ReceiverRegister(), 636 KeyedStoreIC::ReceiverRegister(),
637 KeyedStoreIC::NameRegister(), 637 KeyedStoreIC::NameRegister(),
638 KeyedStoreIC::ValueRegister() }; 638 KeyedStoreIC::ValueRegister() };
639 descriptor->Initialize(MajorKey(), ARRAY_SIZE(registers), registers, 639 descriptor->Initialize(MajorKey(), ARRAY_SIZE(registers), registers,
640 FUNCTION_ADDR(KeyedStoreIC_MissFromStubFailure)); 640 FUNCTION_ADDR(KeyedStoreIC_MissFromStubFailure));
641 } 641 }
642 642
643 643
644 void ElementsTransitionAndStoreStub::InitializeInterfaceDescriptor( 644 void ElementsTransitionAndStoreStub::InitializeInterfaceDescriptor(
645 CodeStubInterfaceDescriptor* descriptor) { 645 CodeStubInterfaceDescriptor* descriptor) {
646 Register registers[] = { InterfaceDescriptor::ContextRegister(), 646 Register registers[] = { InterfaceDescriptor::ContextRegister(),
647 ValueRegister(), 647 ValueRegister(),
648 MapRegister(), 648 MapRegister(),
649 KeyRegister(), 649 KeyRegister(),
650 ObjectRegister() }; 650 ObjectRegister() };
651 descriptor->Initialize(MajorKey(), ARRAY_SIZE(registers), registers, 651 descriptor->Initialize(MajorKey(), ARRAY_SIZE(registers), registers,
652 FUNCTION_ADDR(ElementsTransitionAndStoreIC_Miss)); 652 FUNCTION_ADDR(ElementsTransitionAndStoreIC_Miss));
653 } 653 }
654 654
655 655
656 void StoreGlobalStub::InitializeInterfaceDescriptor(
657 CodeStubInterfaceDescriptor* descriptor) {
658 Register registers[] = { InterfaceDescriptor::ContextRegister(),
659 StoreIC::ReceiverRegister(),
660 StoreIC::NameRegister(),
661 StoreIC::ValueRegister() };
662 descriptor->Initialize(MajorKey(), ARRAY_SIZE(registers), registers,
663 FUNCTION_ADDR(StoreIC_MissFromStubFailure));
664 }
665
666
667 void InstanceofStub::InitializeInterfaceDescriptor( 656 void InstanceofStub::InitializeInterfaceDescriptor(
668 CodeStubInterfaceDescriptor* descriptor) { 657 CodeStubInterfaceDescriptor* descriptor) {
669 Register registers[] = { InterfaceDescriptor::ContextRegister(), 658 Register registers[] = { InterfaceDescriptor::ContextRegister(),
670 InstanceofStub::left(), 659 InstanceofStub::left(),
671 InstanceofStub::right() }; 660 InstanceofStub::right() };
672 descriptor->Initialize(MajorKey(), ARRAY_SIZE(registers), registers); 661 descriptor->Initialize(MajorKey(), ARRAY_SIZE(registers), registers);
673 } 662 }
674 663
675 664
676 void LoadDictionaryElementPlatformStub::Generate(MacroAssembler* masm) { 665 void LoadDictionaryElementPlatformStub::Generate(MacroAssembler* masm) {
(...skipping 302 matching lines...) Expand 10 before | Expand all | Expand 10 after
979 InstallDescriptor(isolate, &stub3); 968 InstallDescriptor(isolate, &stub3);
980 } 969 }
981 970
982 InternalArrayConstructorStub::InternalArrayConstructorStub( 971 InternalArrayConstructorStub::InternalArrayConstructorStub(
983 Isolate* isolate) : PlatformCodeStub(isolate) { 972 Isolate* isolate) : PlatformCodeStub(isolate) {
984 InternalArrayConstructorStubBase::GenerateStubsAheadOfTime(isolate); 973 InternalArrayConstructorStubBase::GenerateStubsAheadOfTime(isolate);
985 } 974 }
986 975
987 976
988 } } // namespace v8::internal 977 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/code-stubs.h ('k') | src/code-stubs-hydrogen.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698