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

Side by Side Diff: src/ic/x87/ic-x87.cc

Issue 2147043002: Cleanup interface descriptors to reflect that vectors are part of stores. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@rename-store-ic
Patch Set: Rebasing Created 4 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
« no previous file with comments | « src/ic/x87/handler-compiler-x87.cc ('k') | src/ic/x87/stub-cache-x87.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 #if V8_TARGET_ARCH_X87 5 #if V8_TARGET_ARCH_X87
6 6
7 #include "src/codegen.h" 7 #include "src/codegen.h"
8 #include "src/ic/ic.h" 8 #include "src/ic/ic.h"
9 #include "src/ic/ic-compiler.h" 9 #include "src/ic/ic-compiler.h"
10 #include "src/ic/stub-cache.h" 10 #include "src/ic/stub-cache.h"
(...skipping 546 matching lines...) Expand 10 before | Expand all | Expand 10 after
557 Handle<TypeFeedbackVector> dummy_vector = 557 Handle<TypeFeedbackVector> dummy_vector =
558 TypeFeedbackVector::DummyVector(masm->isolate()); 558 TypeFeedbackVector::DummyVector(masm->isolate());
559 int slot = dummy_vector->GetIndex( 559 int slot = dummy_vector->GetIndex(
560 FeedbackVectorSlot(TypeFeedbackVector::kDummyKeyedStoreICSlot)); 560 FeedbackVectorSlot(TypeFeedbackVector::kDummyKeyedStoreICSlot));
561 __ push(Immediate(Smi::FromInt(slot))); 561 __ push(Immediate(Smi::FromInt(slot)));
562 __ push(Immediate(dummy_vector)); 562 __ push(Immediate(dummy_vector));
563 563
564 masm->isolate()->store_stub_cache()->GenerateProbe(masm, receiver, key, edi, 564 masm->isolate()->store_stub_cache()->GenerateProbe(masm, receiver, key, edi,
565 no_reg); 565 no_reg);
566 566
567 __ pop(VectorStoreICDescriptor::VectorRegister()); 567 __ pop(StoreWithVectorDescriptor::VectorRegister());
568 __ pop(VectorStoreICDescriptor::SlotRegister()); 568 __ pop(StoreWithVectorDescriptor::SlotRegister());
569 569
570 // Cache miss. 570 // Cache miss.
571 __ jmp(&miss); 571 __ jmp(&miss);
572 572
573 // Extra capacity case: Check if there is extra capacity to 573 // Extra capacity case: Check if there is extra capacity to
574 // perform the store and update the length. Used for adding one 574 // perform the store and update the length. Used for adding one
575 // element to the array by writing to array[array.length]. 575 // element to the array by writing to array[array.length].
576 __ bind(&extra); 576 __ bind(&extra);
577 // receiver is a JSArray. 577 // receiver is a JSArray.
578 // key is a smi. 578 // key is a smi.
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after
701 __ push(ebx); 701 __ push(ebx);
702 702
703 // Do tail-call to runtime routine. 703 // Do tail-call to runtime routine.
704 __ TailCallRuntime(Runtime::kKeyedGetProperty); 704 __ TailCallRuntime(Runtime::kKeyedGetProperty);
705 } 705 }
706 706
707 static void StoreIC_PushArgs(MacroAssembler* masm) { 707 static void StoreIC_PushArgs(MacroAssembler* masm) {
708 Register receiver = StoreDescriptor::ReceiverRegister(); 708 Register receiver = StoreDescriptor::ReceiverRegister();
709 Register name = StoreDescriptor::NameRegister(); 709 Register name = StoreDescriptor::NameRegister();
710 Register value = StoreDescriptor::ValueRegister(); 710 Register value = StoreDescriptor::ValueRegister();
711 Register slot = VectorStoreICDescriptor::SlotRegister(); 711 Register slot = StoreWithVectorDescriptor::SlotRegister();
712 Register vector = VectorStoreICDescriptor::VectorRegister(); 712 Register vector = StoreWithVectorDescriptor::VectorRegister();
713 713
714 __ xchg(receiver, Operand(esp, 0)); 714 __ xchg(receiver, Operand(esp, 0));
715 __ push(name); 715 __ push(name);
716 __ push(value); 716 __ push(value);
717 __ push(slot); 717 __ push(slot);
718 __ push(vector); 718 __ push(vector);
719 __ push(receiver); // Contains the return address. 719 __ push(receiver); // Contains the return address.
720 } 720 }
721 721
722 722
723 void StoreIC::GenerateMiss(MacroAssembler* masm) { 723 void StoreIC::GenerateMiss(MacroAssembler* masm) {
724 // Return address is on the stack. 724 // Return address is on the stack.
725 StoreIC_PushArgs(masm); 725 StoreIC_PushArgs(masm);
726 726
727 // Perform tail call to the entry. 727 // Perform tail call to the entry.
728 __ TailCallRuntime(Runtime::kStoreIC_Miss); 728 __ TailCallRuntime(Runtime::kStoreIC_Miss);
729 } 729 }
730 730
731 731
732 void StoreIC::GenerateNormal(MacroAssembler* masm) { 732 void StoreIC::GenerateNormal(MacroAssembler* masm) {
733 Label restore_miss; 733 Label restore_miss;
734 Register receiver = StoreDescriptor::ReceiverRegister(); 734 Register receiver = StoreDescriptor::ReceiverRegister();
735 Register name = StoreDescriptor::NameRegister(); 735 Register name = StoreDescriptor::NameRegister();
736 Register value = StoreDescriptor::ValueRegister(); 736 Register value = StoreDescriptor::ValueRegister();
737 Register vector = VectorStoreICDescriptor::VectorRegister(); 737 Register vector = StoreWithVectorDescriptor::VectorRegister();
738 Register slot = VectorStoreICDescriptor::SlotRegister(); 738 Register slot = StoreWithVectorDescriptor::SlotRegister();
739 739
740 // A lot of registers are needed for storing to slow case 740 // A lot of registers are needed for storing to slow case
741 // objects. Push and restore receiver but rely on 741 // objects. Push and restore receiver but rely on
742 // GenerateDictionaryStore preserving the value and name. 742 // GenerateDictionaryStore preserving the value and name.
743 __ push(receiver); 743 __ push(receiver);
744 __ push(vector); 744 __ push(vector);
745 __ push(slot); 745 __ push(slot);
746 746
747 Register dictionary = ebx; 747 Register dictionary = ebx;
748 __ mov(dictionary, FieldOperand(receiver, JSObject::kPropertiesOffset)); 748 __ mov(dictionary, FieldOperand(receiver, JSObject::kPropertiesOffset));
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
840 Condition cc = 840 Condition cc =
841 (check == ENABLE_INLINED_SMI_CHECK) 841 (check == ENABLE_INLINED_SMI_CHECK)
842 ? (*jmp_address == Assembler::kJncShortOpcode ? not_zero : zero) 842 ? (*jmp_address == Assembler::kJncShortOpcode ? not_zero : zero)
843 : (*jmp_address == Assembler::kJnzShortOpcode ? not_carry : carry); 843 : (*jmp_address == Assembler::kJnzShortOpcode ? not_carry : carry);
844 *jmp_address = static_cast<byte>(Assembler::kJccShortPrefix | cc); 844 *jmp_address = static_cast<byte>(Assembler::kJccShortPrefix | cc);
845 } 845 }
846 } // namespace internal 846 } // namespace internal
847 } // namespace v8 847 } // namespace v8
848 848
849 #endif // V8_TARGET_ARCH_X87 849 #endif // V8_TARGET_ARCH_X87
OLDNEW
« no previous file with comments | « src/ic/x87/handler-compiler-x87.cc ('k') | src/ic/x87/stub-cache-x87.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698