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

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

Issue 486213003: Move register conventions out of the IC classes. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: REBASE. Created 6 years, 3 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 563 matching lines...) Expand 10 before | Expand all | Expand 10 after
574 void JSEntryStub::FinishCode(Handle<Code> code) { 574 void JSEntryStub::FinishCode(Handle<Code> code) {
575 Handle<FixedArray> handler_table = 575 Handle<FixedArray> handler_table =
576 code->GetIsolate()->factory()->NewFixedArray(1, TENURED); 576 code->GetIsolate()->factory()->NewFixedArray(1, TENURED);
577 handler_table->set(0, Smi::FromInt(handler_offset_)); 577 handler_table->set(0, Smi::FromInt(handler_offset_));
578 code->set_handler_table(*handler_table); 578 code->set_handler_table(*handler_table);
579 } 579 }
580 580
581 581
582 void LoadFastElementStub::InitializeInterfaceDescriptor( 582 void LoadFastElementStub::InitializeInterfaceDescriptor(
583 CodeStubInterfaceDescriptor* descriptor) { 583 CodeStubInterfaceDescriptor* descriptor) {
584 Register registers[] = { InterfaceDescriptor::ContextRegister(), 584 Register registers[] = {InterfaceDescriptor::ContextRegister(),
585 LoadIC::ReceiverRegister(), 585 LoadConvention::ReceiverRegister(),
586 LoadIC::NameRegister() }; 586 LoadConvention::NameRegister()};
587 STATIC_ASSERT(LoadIC::kParameterCount == 2); 587 STATIC_ASSERT(LoadConvention::kParameterCount == 2);
588 descriptor->Initialize(MajorKey(), arraysize(registers), registers, 588 descriptor->Initialize(MajorKey(), arraysize(registers), registers,
589 FUNCTION_ADDR(KeyedLoadIC_MissFromStubFailure)); 589 FUNCTION_ADDR(KeyedLoadIC_MissFromStubFailure));
590 } 590 }
591 591
592 592
593 void LoadDictionaryElementStub::InitializeInterfaceDescriptor( 593 void LoadDictionaryElementStub::InitializeInterfaceDescriptor(
594 CodeStubInterfaceDescriptor* descriptor) { 594 CodeStubInterfaceDescriptor* descriptor) {
595 Register registers[] = { InterfaceDescriptor::ContextRegister(), 595 Register registers[] = {InterfaceDescriptor::ContextRegister(),
596 LoadIC::ReceiverRegister(), 596 LoadConvention::ReceiverRegister(),
597 LoadIC::NameRegister() }; 597 LoadConvention::NameRegister()};
598 STATIC_ASSERT(LoadIC::kParameterCount == 2); 598 STATIC_ASSERT(LoadConvention::kParameterCount == 2);
599 descriptor->Initialize(MajorKey(), arraysize(registers), registers, 599 descriptor->Initialize(MajorKey(), arraysize(registers), registers,
600 FUNCTION_ADDR(KeyedLoadIC_MissFromStubFailure)); 600 FUNCTION_ADDR(KeyedLoadIC_MissFromStubFailure));
601 } 601 }
602 602
603 603
604 void KeyedLoadGenericStub::InitializeInterfaceDescriptor( 604 void KeyedLoadGenericStub::InitializeInterfaceDescriptor(
605 CodeStubInterfaceDescriptor* descriptor) { 605 CodeStubInterfaceDescriptor* descriptor) {
606 Register registers[] = { InterfaceDescriptor::ContextRegister(), 606 Register registers[] = {InterfaceDescriptor::ContextRegister(),
607 LoadIC::ReceiverRegister(), 607 LoadConvention::ReceiverRegister(),
608 LoadIC::NameRegister() }; 608 LoadConvention::NameRegister()};
609 STATIC_ASSERT(LoadIC::kParameterCount == 2); 609 STATIC_ASSERT(LoadConvention::kParameterCount == 2);
610 descriptor->Initialize( 610 descriptor->Initialize(
611 MajorKey(), arraysize(registers), registers, 611 MajorKey(), arraysize(registers), registers,
612 Runtime::FunctionForId(Runtime::kKeyedGetProperty)->entry); 612 Runtime::FunctionForId(Runtime::kKeyedGetProperty)->entry);
613 } 613 }
614 614
615 615
616 void HandlerStub::InitializeInterfaceDescriptor( 616 void HandlerStub::InitializeInterfaceDescriptor(
617 CodeStubInterfaceDescriptor* descriptor) { 617 CodeStubInterfaceDescriptor* descriptor) {
618 if (kind() == Code::LOAD_IC) { 618 if (kind() == Code::LOAD_IC) {
619 Register registers[] = {InterfaceDescriptor::ContextRegister(), 619 Register registers[] = {InterfaceDescriptor::ContextRegister(),
620 LoadIC::ReceiverRegister(), LoadIC::NameRegister()}; 620 LoadConvention::ReceiverRegister(),
621 LoadConvention::NameRegister()};
621 descriptor->Initialize(MajorKey(), arraysize(registers), registers); 622 descriptor->Initialize(MajorKey(), arraysize(registers), registers);
622 } else { 623 } else {
623 DCHECK_EQ(Code::STORE_IC, kind()); 624 DCHECK_EQ(Code::STORE_IC, kind());
624 Register registers[] = {InterfaceDescriptor::ContextRegister(), 625 Register registers[] = {InterfaceDescriptor::ContextRegister(),
625 StoreIC::ReceiverRegister(), 626 StoreConvention::ReceiverRegister(),
626 StoreIC::NameRegister(), StoreIC::ValueRegister()}; 627 StoreConvention::NameRegister(),
628 StoreConvention::ValueRegister()};
627 descriptor->Initialize(MajorKey(), arraysize(registers), registers, 629 descriptor->Initialize(MajorKey(), arraysize(registers), registers,
628 FUNCTION_ADDR(StoreIC_MissFromStubFailure)); 630 FUNCTION_ADDR(StoreIC_MissFromStubFailure));
629 } 631 }
630 } 632 }
631 633
632 634
633 void StoreFastElementStub::InitializeInterfaceDescriptor( 635 void StoreFastElementStub::InitializeInterfaceDescriptor(
634 CodeStubInterfaceDescriptor* descriptor) { 636 CodeStubInterfaceDescriptor* descriptor) {
635 Register registers[] = { InterfaceDescriptor::ContextRegister(), 637 Register registers[] = {InterfaceDescriptor::ContextRegister(),
636 KeyedStoreIC::ReceiverRegister(), 638 StoreConvention::ReceiverRegister(),
637 KeyedStoreIC::NameRegister(), 639 StoreConvention::NameRegister(),
638 KeyedStoreIC::ValueRegister() }; 640 StoreConvention::ValueRegister()};
639 descriptor->Initialize(MajorKey(), arraysize(registers), registers, 641 descriptor->Initialize(MajorKey(), arraysize(registers), registers,
640 FUNCTION_ADDR(KeyedStoreIC_MissFromStubFailure)); 642 FUNCTION_ADDR(KeyedStoreIC_MissFromStubFailure));
641 } 643 }
642 644
643 645
644 void ElementsTransitionAndStoreStub::InitializeInterfaceDescriptor( 646 void ElementsTransitionAndStoreStub::InitializeInterfaceDescriptor(
645 CodeStubInterfaceDescriptor* descriptor) { 647 CodeStubInterfaceDescriptor* descriptor) {
646 Register registers[] = { InterfaceDescriptor::ContextRegister(), 648 Register registers[] = { InterfaceDescriptor::ContextRegister(),
647 ValueRegister(), 649 ValueRegister(),
648 MapRegister(), 650 MapRegister(),
(...skipping 327 matching lines...) Expand 10 before | Expand all | Expand 10 after
976 InstallDescriptor(isolate, &stub3); 978 InstallDescriptor(isolate, &stub3);
977 } 979 }
978 980
979 InternalArrayConstructorStub::InternalArrayConstructorStub( 981 InternalArrayConstructorStub::InternalArrayConstructorStub(
980 Isolate* isolate) : PlatformCodeStub(isolate) { 982 Isolate* isolate) : PlatformCodeStub(isolate) {
981 InternalArrayConstructorStubBase::GenerateStubsAheadOfTime(isolate); 983 InternalArrayConstructorStubBase::GenerateStubsAheadOfTime(isolate);
982 } 984 }
983 985
984 986
985 } } // namespace v8::internal 987 } } // 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