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

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

Issue 338963003: KeyedLoadIC should have same register spec as LoadIC. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Last comment response. Created 6 years, 5 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/arm64/stub-cache-arm64.cc ('k') | src/ia32/builtins-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 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 567 matching lines...) Expand 10 before | Expand all | Expand 10 after
578 void JSEntryStub::FinishCode(Handle<Code> code) { 578 void JSEntryStub::FinishCode(Handle<Code> code) {
579 Handle<FixedArray> handler_table = 579 Handle<FixedArray> handler_table =
580 code->GetIsolate()->factory()->NewFixedArray(1, TENURED); 580 code->GetIsolate()->factory()->NewFixedArray(1, TENURED);
581 handler_table->set(0, Smi::FromInt(handler_offset_)); 581 handler_table->set(0, Smi::FromInt(handler_offset_));
582 code->set_handler_table(*handler_table); 582 code->set_handler_table(*handler_table);
583 } 583 }
584 584
585 585
586 void KeyedLoadFastElementStub::InitializeInterfaceDescriptor( 586 void KeyedLoadFastElementStub::InitializeInterfaceDescriptor(
587 CodeStubInterfaceDescriptor* descriptor) { 587 CodeStubInterfaceDescriptor* descriptor) {
588 Register registers[] = { KeyedLoadIC::ReceiverRegister(), 588 Register registers[] = { LoadIC::ReceiverRegister(),
589 KeyedLoadIC::NameRegister() }; 589 LoadIC::NameRegister() };
590 STATIC_ASSERT(KeyedLoadIC::kRegisterArgumentCount == 2); 590 STATIC_ASSERT(LoadIC::kRegisterArgumentCount == 2);
591 descriptor->Initialize(ARRAY_SIZE(registers), registers, 591 descriptor->Initialize(ARRAY_SIZE(registers), registers,
592 FUNCTION_ADDR(KeyedLoadIC_MissFromStubFailure)); 592 FUNCTION_ADDR(KeyedLoadIC_MissFromStubFailure));
593 } 593 }
594 594
595 595
596 void KeyedLoadDictionaryElementStub::InitializeInterfaceDescriptor( 596 void KeyedLoadDictionaryElementStub::InitializeInterfaceDescriptor(
597 CodeStubInterfaceDescriptor* descriptor) { 597 CodeStubInterfaceDescriptor* descriptor) {
598 Register registers[] = { KeyedLoadIC::ReceiverRegister(), 598 Register registers[] = { LoadIC::ReceiverRegister(),
599 KeyedLoadIC::NameRegister() }; 599 LoadIC::NameRegister() };
600 STATIC_ASSERT(KeyedLoadIC::kRegisterArgumentCount == 2); 600 STATIC_ASSERT(LoadIC::kRegisterArgumentCount == 2);
601 descriptor->Initialize(ARRAY_SIZE(registers), registers, 601 descriptor->Initialize(ARRAY_SIZE(registers), registers,
602 FUNCTION_ADDR(KeyedLoadIC_MissFromStubFailure)); 602 FUNCTION_ADDR(KeyedLoadIC_MissFromStubFailure));
603 } 603 }
604 604
605 605
606 void KeyedLoadGenericElementStub::InitializeInterfaceDescriptor( 606 void KeyedLoadGenericElementStub::InitializeInterfaceDescriptor(
607 CodeStubInterfaceDescriptor* descriptor) { 607 CodeStubInterfaceDescriptor* descriptor) {
608 Register registers[] = { KeyedLoadIC::ReceiverRegister(), 608 Register registers[] = { LoadIC::ReceiverRegister(),
609 KeyedLoadIC::NameRegister() }; 609 LoadIC::NameRegister() };
610 STATIC_ASSERT(KeyedLoadIC::kRegisterArgumentCount == 2); 610 STATIC_ASSERT(LoadIC::kRegisterArgumentCount == 2);
611 descriptor->Initialize( 611 descriptor->Initialize(
612 ARRAY_SIZE(registers), registers, 612 ARRAY_SIZE(registers), registers,
613 Runtime::FunctionForId(Runtime::kKeyedGetProperty)->entry); 613 Runtime::FunctionForId(Runtime::kKeyedGetProperty)->entry);
614 } 614 }
615 615
616 616
617 void LoadFieldStub::InitializeInterfaceDescriptor( 617 void LoadFieldStub::InitializeInterfaceDescriptor(
618 CodeStubInterfaceDescriptor* descriptor) { 618 CodeStubInterfaceDescriptor* descriptor) {
619 Register registers[] = { LoadIC::ReceiverRegister() }; 619 Register registers[] = { LoadIC::ReceiverRegister() };
620 descriptor->Initialize(ARRAY_SIZE(registers), registers); 620 descriptor->Initialize(ARRAY_SIZE(registers), registers);
621 } 621 }
622 622
623 623
624 void KeyedLoadFieldStub::InitializeInterfaceDescriptor( 624 void KeyedLoadFieldStub::InitializeInterfaceDescriptor(
625 CodeStubInterfaceDescriptor* descriptor) { 625 CodeStubInterfaceDescriptor* descriptor) {
626 Register registers[] = { KeyedLoadIC::ReceiverRegister() }; 626 Register registers[] = { LoadIC::ReceiverRegister() };
627 descriptor->Initialize(ARRAY_SIZE(registers), registers); 627 descriptor->Initialize(ARRAY_SIZE(registers), registers);
628 } 628 }
629 629
630 630
631 void StringLengthStub::InitializeInterfaceDescriptor( 631 void StringLengthStub::InitializeInterfaceDescriptor(
632 CodeStubInterfaceDescriptor* descriptor) { 632 CodeStubInterfaceDescriptor* descriptor) {
633 Register registers[] = { LoadIC::ReceiverRegister(), 633 Register registers[] = { LoadIC::ReceiverRegister(),
634 LoadIC::NameRegister() }; 634 LoadIC::NameRegister() };
635 descriptor->Initialize(ARRAY_SIZE(registers), registers); 635 descriptor->Initialize(ARRAY_SIZE(registers), registers);
636 } 636 }
637 637
638 638
639 void KeyedStringLengthStub::InitializeInterfaceDescriptor( 639 void KeyedStringLengthStub::InitializeInterfaceDescriptor(
640 CodeStubInterfaceDescriptor* descriptor) { 640 CodeStubInterfaceDescriptor* descriptor) {
641 Register registers[] = { KeyedLoadIC::ReceiverRegister(), 641 Register registers[] = { LoadIC::ReceiverRegister(),
642 KeyedLoadIC::NameRegister() }; 642 LoadIC::NameRegister() };
643 descriptor->Initialize(ARRAY_SIZE(registers), registers); 643 descriptor->Initialize(ARRAY_SIZE(registers), registers);
644 } 644 }
645 645
646 646
647 void KeyedLoadDictionaryElementPlatformStub::Generate( 647 void KeyedLoadDictionaryElementPlatformStub::Generate(
648 MacroAssembler* masm) { 648 MacroAssembler* masm) {
649 KeyedLoadStubCompiler::GenerateLoadDictionaryElement(masm); 649 KeyedLoadStubCompiler::GenerateLoadDictionaryElement(masm);
650 } 650 }
651 651
652 652
(...skipping 281 matching lines...) Expand 10 before | Expand all | Expand 10 after
934 InstallDescriptor(isolate, &stub3); 934 InstallDescriptor(isolate, &stub3);
935 } 935 }
936 936
937 InternalArrayConstructorStub::InternalArrayConstructorStub( 937 InternalArrayConstructorStub::InternalArrayConstructorStub(
938 Isolate* isolate) : PlatformCodeStub(isolate) { 938 Isolate* isolate) : PlatformCodeStub(isolate) {
939 InternalArrayConstructorStubBase::GenerateStubsAheadOfTime(isolate); 939 InternalArrayConstructorStubBase::GenerateStubsAheadOfTime(isolate);
940 } 940 }
941 941
942 942
943 } } // namespace v8::internal 943 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/arm64/stub-cache-arm64.cc ('k') | src/ia32/builtins-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698