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

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

Issue 1553703002: [runtime] TailCallRuntime and CallRuntime should use default argument counts (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@2015-12-29_TailCallRuntime_default_result_size_1_1550923002
Patch Set: Created 4 years, 11 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
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_IA32 5 #if V8_TARGET_ARCH_IA32
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 654 matching lines...) Expand 10 before | Expand all | Expand 10 after
665 __ push(edi); 665 __ push(edi);
666 } 666 }
667 667
668 668
669 void LoadIC::GenerateMiss(MacroAssembler* masm) { 669 void LoadIC::GenerateMiss(MacroAssembler* masm) {
670 // Return address is on the stack. 670 // Return address is on the stack.
671 __ IncrementCounter(masm->isolate()->counters()->load_miss(), 1); 671 __ IncrementCounter(masm->isolate()->counters()->load_miss(), 1);
672 LoadIC_PushArgs(masm); 672 LoadIC_PushArgs(masm);
673 673
674 // Perform tail call to the entry. 674 // Perform tail call to the entry.
675 int arg_count = 4; 675 __ TailCallRuntime(Runtime::kLoadIC_Miss);
676 __ TailCallRuntime(Runtime::kLoadIC_Miss, arg_count);
677 } 676 }
678 677
679 678
680 void LoadIC::GenerateRuntimeGetProperty(MacroAssembler* masm, 679 void LoadIC::GenerateRuntimeGetProperty(MacroAssembler* masm,
681 LanguageMode language_mode) { 680 LanguageMode language_mode) {
682 // Return address is on the stack. 681 // Return address is on the stack.
683 Register receiver = LoadDescriptor::ReceiverRegister(); 682 Register receiver = LoadDescriptor::ReceiverRegister();
684 Register name = LoadDescriptor::NameRegister(); 683 Register name = LoadDescriptor::NameRegister();
685 DCHECK(!ebx.is(receiver) && !ebx.is(name)); 684 DCHECK(!ebx.is(receiver) && !ebx.is(name));
686 685
687 __ pop(ebx); 686 __ pop(ebx);
688 __ push(receiver); 687 __ push(receiver);
689 __ push(name); 688 __ push(name);
690 __ push(ebx); 689 __ push(ebx);
691 690
692 // Do tail-call to runtime routine. 691 // Do tail-call to runtime routine.
693 __ TailCallRuntime(is_strong(language_mode) ? Runtime::kGetPropertyStrong 692 __ TailCallRuntime(is_strong(language_mode) ? Runtime::kGetPropertyStrong
694 : Runtime::kGetProperty, 693 : Runtime::kGetProperty);
695 2);
696 } 694 }
697 695
698 696
699 void KeyedLoadIC::GenerateMiss(MacroAssembler* masm) { 697 void KeyedLoadIC::GenerateMiss(MacroAssembler* masm) {
700 // Return address is on the stack. 698 // Return address is on the stack.
701 __ IncrementCounter(masm->isolate()->counters()->keyed_load_miss(), 1); 699 __ IncrementCounter(masm->isolate()->counters()->keyed_load_miss(), 1);
702 700
703 LoadIC_PushArgs(masm); 701 LoadIC_PushArgs(masm);
704 702
705 // Perform tail call to the entry. 703 // Perform tail call to the entry.
706 int arg_count = 4; 704 __ TailCallRuntime(Runtime::kKeyedLoadIC_Miss);
707 __ TailCallRuntime(Runtime::kKeyedLoadIC_Miss, arg_count);
708 } 705 }
709 706
710 707
711 void KeyedLoadIC::GenerateRuntimeGetProperty(MacroAssembler* masm, 708 void KeyedLoadIC::GenerateRuntimeGetProperty(MacroAssembler* masm,
712 LanguageMode language_mode) { 709 LanguageMode language_mode) {
713 // Return address is on the stack. 710 // Return address is on the stack.
714 Register receiver = LoadDescriptor::ReceiverRegister(); 711 Register receiver = LoadDescriptor::ReceiverRegister();
715 Register name = LoadDescriptor::NameRegister(); 712 Register name = LoadDescriptor::NameRegister();
716 DCHECK(!ebx.is(receiver) && !ebx.is(name)); 713 DCHECK(!ebx.is(receiver) && !ebx.is(name));
717 714
718 __ pop(ebx); 715 __ pop(ebx);
719 __ push(receiver); 716 __ push(receiver);
720 __ push(name); 717 __ push(name);
721 __ push(ebx); 718 __ push(ebx);
722 719
723 // Do tail-call to runtime routine. 720 // Do tail-call to runtime routine.
724 __ TailCallRuntime(is_strong(language_mode) ? Runtime::kKeyedGetPropertyStrong 721 __ TailCallRuntime(is_strong(language_mode) ? Runtime::kKeyedGetPropertyStrong
725 : Runtime::kKeyedGetProperty, 722 : Runtime::kKeyedGetProperty);
726 2);
727 } 723 }
728 724
729 725
730 void StoreIC::GenerateMegamorphic(MacroAssembler* masm) { 726 void StoreIC::GenerateMegamorphic(MacroAssembler* masm) {
731 // This shouldn't be called. 727 // This shouldn't be called.
732 // TODO(mvstanton): remove this method. 728 // TODO(mvstanton): remove this method.
733 __ int3(); 729 __ int3();
734 return; 730 return;
735 } 731 }
736 732
(...skipping 12 matching lines...) Expand all
749 __ push(vector); 745 __ push(vector);
750 __ push(receiver); // Contains the return address. 746 __ push(receiver); // Contains the return address.
751 } 747 }
752 748
753 749
754 void StoreIC::GenerateMiss(MacroAssembler* masm) { 750 void StoreIC::GenerateMiss(MacroAssembler* masm) {
755 // Return address is on the stack. 751 // Return address is on the stack.
756 StoreIC_PushArgs(masm); 752 StoreIC_PushArgs(masm);
757 753
758 // Perform tail call to the entry. 754 // Perform tail call to the entry.
759 __ TailCallRuntime(Runtime::kStoreIC_Miss, 5); 755 __ TailCallRuntime(Runtime::kStoreIC_Miss);
760 } 756 }
761 757
762 758
763 void StoreIC::GenerateNormal(MacroAssembler* masm) { 759 void StoreIC::GenerateNormal(MacroAssembler* masm) {
764 Label restore_miss; 760 Label restore_miss;
765 Register receiver = StoreDescriptor::ReceiverRegister(); 761 Register receiver = StoreDescriptor::ReceiverRegister();
766 Register name = StoreDescriptor::NameRegister(); 762 Register name = StoreDescriptor::NameRegister();
767 Register value = StoreDescriptor::ValueRegister(); 763 Register value = StoreDescriptor::ValueRegister();
768 Register vector = VectorStoreICDescriptor::VectorRegister(); 764 Register vector = VectorStoreICDescriptor::VectorRegister();
769 Register slot = VectorStoreICDescriptor::SlotRegister(); 765 Register slot = VectorStoreICDescriptor::SlotRegister();
(...skipping 21 matching lines...) Expand all
791 __ IncrementCounter(counters->store_normal_miss(), 1); 787 __ IncrementCounter(counters->store_normal_miss(), 1);
792 GenerateMiss(masm); 788 GenerateMiss(masm);
793 } 789 }
794 790
795 791
796 void KeyedStoreIC::GenerateMiss(MacroAssembler* masm) { 792 void KeyedStoreIC::GenerateMiss(MacroAssembler* masm) {
797 // Return address is on the stack. 793 // Return address is on the stack.
798 StoreIC_PushArgs(masm); 794 StoreIC_PushArgs(masm);
799 795
800 // Do tail-call to runtime routine. 796 // Do tail-call to runtime routine.
801 __ TailCallRuntime(Runtime::kKeyedStoreIC_Miss, 5); 797 __ TailCallRuntime(Runtime::kKeyedStoreIC_Miss);
802 } 798 }
803 799
804 800
805 #undef __ 801 #undef __
806 802
807 803
808 Condition CompareIC::ComputeCondition(Token::Value op) { 804 Condition CompareIC::ComputeCondition(Token::Value op) {
809 switch (op) { 805 switch (op) {
810 case Token::EQ_STRICT: 806 case Token::EQ_STRICT:
811 case Token::EQ: 807 case Token::EQ:
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
870 Condition cc = 866 Condition cc =
871 (check == ENABLE_INLINED_SMI_CHECK) 867 (check == ENABLE_INLINED_SMI_CHECK)
872 ? (*jmp_address == Assembler::kJncShortOpcode ? not_zero : zero) 868 ? (*jmp_address == Assembler::kJncShortOpcode ? not_zero : zero)
873 : (*jmp_address == Assembler::kJnzShortOpcode ? not_carry : carry); 869 : (*jmp_address == Assembler::kJnzShortOpcode ? not_carry : carry);
874 *jmp_address = static_cast<byte>(Assembler::kJccShortPrefix | cc); 870 *jmp_address = static_cast<byte>(Assembler::kJccShortPrefix | cc);
875 } 871 }
876 } // namespace internal 872 } // namespace internal
877 } // namespace v8 873 } // namespace v8
878 874
879 #endif // V8_TARGET_ARCH_IA32 875 #endif // V8_TARGET_ARCH_IA32
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698