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

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

Issue 11737032: Use enum instead of bool for force_generic (MISS / MISS_FORCE_GENERIC) (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 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 | Annotate | Revision Log
« no previous file with comments | « src/ic.cc ('k') | src/x64/ic-x64.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 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 840 matching lines...) Expand 10 before | Expand all | Expand 10 after
851 __ bind(&notin); 851 __ bind(&notin);
852 // The unmapped lookup expects that the parameter map is in a2. 852 // The unmapped lookup expects that the parameter map is in a2.
853 MemOperand unmapped_location = 853 MemOperand unmapped_location =
854 GenerateUnmappedArgumentsLookup(masm, a0, a2, a3, &slow); 854 GenerateUnmappedArgumentsLookup(masm, a0, a2, a3, &slow);
855 __ lw(a2, unmapped_location); 855 __ lw(a2, unmapped_location);
856 __ LoadRoot(a3, Heap::kTheHoleValueRootIndex); 856 __ LoadRoot(a3, Heap::kTheHoleValueRootIndex);
857 __ Branch(&slow, eq, a2, Operand(a3)); 857 __ Branch(&slow, eq, a2, Operand(a3));
858 __ Ret(USE_DELAY_SLOT); 858 __ Ret(USE_DELAY_SLOT);
859 __ mov(v0, a2); 859 __ mov(v0, a2);
860 __ bind(&slow); 860 __ bind(&slow);
861 GenerateMiss(masm, false); 861 GenerateMiss(masm, MISS);
862 } 862 }
863 863
864 864
865 void KeyedStoreIC::GenerateNonStrictArguments(MacroAssembler* masm) { 865 void KeyedStoreIC::GenerateNonStrictArguments(MacroAssembler* masm) {
866 // ---------- S t a t e -------------- 866 // ---------- S t a t e --------------
867 // -- a0 : value 867 // -- a0 : value
868 // -- a1 : key 868 // -- a1 : key
869 // -- a2 : receiver 869 // -- a2 : receiver
870 // -- lr : return address 870 // -- lr : return address
871 // ----------------------------------- 871 // -----------------------------------
(...skipping 14 matching lines...) Expand all
886 MemOperand unmapped_location = 886 MemOperand unmapped_location =
887 GenerateUnmappedArgumentsLookup(masm, a1, a3, t0, &slow); 887 GenerateUnmappedArgumentsLookup(masm, a1, a3, t0, &slow);
888 __ sw(a0, unmapped_location); 888 __ sw(a0, unmapped_location);
889 __ mov(t5, a0); 889 __ mov(t5, a0);
890 ASSERT_EQ(unmapped_location.offset(), 0); 890 ASSERT_EQ(unmapped_location.offset(), 0);
891 __ RecordWrite(a3, unmapped_location.rm(), t5, 891 __ RecordWrite(a3, unmapped_location.rm(), t5,
892 kRAHasNotBeenSaved, kDontSaveFPRegs); 892 kRAHasNotBeenSaved, kDontSaveFPRegs);
893 __ Ret(USE_DELAY_SLOT); 893 __ Ret(USE_DELAY_SLOT);
894 __ mov(v0, a0); // (In delay slot) return the value stored in v0. 894 __ mov(v0, a0); // (In delay slot) return the value stored in v0.
895 __ bind(&slow); 895 __ bind(&slow);
896 GenerateMiss(masm, false); 896 GenerateMiss(masm, MISS);
897 } 897 }
898 898
899 899
900 void KeyedCallIC::GenerateNonStrictArguments(MacroAssembler* masm, 900 void KeyedCallIC::GenerateNonStrictArguments(MacroAssembler* masm,
901 int argc) { 901 int argc) {
902 // ----------- S t a t e ------------- 902 // ----------- S t a t e -------------
903 // -- a2 : name 903 // -- a2 : name
904 // -- lr : return address 904 // -- lr : return address
905 // ----------------------------------- 905 // -----------------------------------
906 Label slow, notin; 906 Label slow, notin;
(...skipping 12 matching lines...) Expand all
919 __ Branch(&slow, eq, a1, Operand(a3)); 919 __ Branch(&slow, eq, a1, Operand(a3));
920 GenerateFunctionTailCall(masm, argc, &slow, a3); 920 GenerateFunctionTailCall(masm, argc, &slow, a3);
921 __ bind(&slow); 921 __ bind(&slow);
922 GenerateMiss(masm, argc); 922 GenerateMiss(masm, argc);
923 } 923 }
924 924
925 925
926 Object* KeyedLoadIC_Miss(Arguments args); 926 Object* KeyedLoadIC_Miss(Arguments args);
927 927
928 928
929 void KeyedLoadIC::GenerateMiss(MacroAssembler* masm, bool force_generic) { 929 void KeyedLoadIC::GenerateMiss(MacroAssembler* masm, ICMissMode miss_mode) {
930 // ---------- S t a t e -------------- 930 // ---------- S t a t e --------------
931 // -- ra : return address 931 // -- ra : return address
932 // -- a0 : key 932 // -- a0 : key
933 // -- a1 : receiver 933 // -- a1 : receiver
934 // ----------------------------------- 934 // -----------------------------------
935 Isolate* isolate = masm->isolate(); 935 Isolate* isolate = masm->isolate();
936 936
937 __ IncrementCounter(isolate->counters()->keyed_load_miss(), 1, a3, t0); 937 __ IncrementCounter(isolate->counters()->keyed_load_miss(), 1, a3, t0);
938 938
939 __ Push(a1, a0); 939 __ Push(a1, a0);
940 940
941 // Perform tail call to the entry. 941 // Perform tail call to the entry.
942 ExternalReference ref = force_generic 942 ExternalReference ref = miss_mode == MISS_FORCE_GENERIC
943 ? ExternalReference(IC_Utility(kKeyedLoadIC_MissForceGeneric), isolate) 943 ? ExternalReference(IC_Utility(kKeyedLoadIC_MissForceGeneric), isolate)
944 : ExternalReference(IC_Utility(kKeyedLoadIC_Miss), isolate); 944 : ExternalReference(IC_Utility(kKeyedLoadIC_Miss), isolate);
945 945
946 __ TailCallExternalReference(ref, 2, 1); 946 __ TailCallExternalReference(ref, 2, 1);
947 } 947 }
948 948
949 949
950 void KeyedLoadIC::GenerateRuntimeGetProperty(MacroAssembler* masm) { 950 void KeyedLoadIC::GenerateRuntimeGetProperty(MacroAssembler* masm) {
951 // ---------- S t a t e -------------- 951 // ---------- S t a t e --------------
952 // -- ra : return address 952 // -- ra : return address
(...skipping 206 matching lines...) Expand 10 before | Expand all | Expand 10 after
1159 &miss, // When not a number. 1159 &miss, // When not a number.
1160 &miss, // When index out of range. 1160 &miss, // When index out of range.
1161 STRING_INDEX_IS_ARRAY_INDEX); 1161 STRING_INDEX_IS_ARRAY_INDEX);
1162 char_at_generator.GenerateFast(masm); 1162 char_at_generator.GenerateFast(masm);
1163 __ Ret(); 1163 __ Ret();
1164 1164
1165 StubRuntimeCallHelper call_helper; 1165 StubRuntimeCallHelper call_helper;
1166 char_at_generator.GenerateSlow(masm, call_helper); 1166 char_at_generator.GenerateSlow(masm, call_helper);
1167 1167
1168 __ bind(&miss); 1168 __ bind(&miss);
1169 GenerateMiss(masm, false); 1169 GenerateMiss(masm, MISS);
1170 } 1170 }
1171 1171
1172 1172
1173 void KeyedStoreIC::GenerateRuntimeSetProperty(MacroAssembler* masm, 1173 void KeyedStoreIC::GenerateRuntimeSetProperty(MacroAssembler* masm,
1174 StrictModeFlag strict_mode) { 1174 StrictModeFlag strict_mode) {
1175 // ---------- S t a t e -------------- 1175 // ---------- S t a t e --------------
1176 // -- a0 : value 1176 // -- a0 : value
1177 // -- a1 : key 1177 // -- a1 : key
1178 // -- a2 : receiver 1178 // -- a2 : receiver
1179 // -- ra : return address 1179 // -- ra : return address
(...skipping 265 matching lines...) Expand 10 before | Expand all | Expand 10 after
1445 __ And(a3, a3, Operand(kSlowCaseBitFieldMask)); 1445 __ And(a3, a3, Operand(kSlowCaseBitFieldMask));
1446 __ Branch(&slow, ne, a3, Operand(1 << Map::kHasIndexedInterceptor)); 1446 __ Branch(&slow, ne, a3, Operand(1 << Map::kHasIndexedInterceptor));
1447 // Everything is fine, call runtime. 1447 // Everything is fine, call runtime.
1448 __ Push(a1, a0); // Receiver, key. 1448 __ Push(a1, a0); // Receiver, key.
1449 1449
1450 // Perform tail call to the entry. 1450 // Perform tail call to the entry.
1451 __ TailCallExternalReference(ExternalReference( 1451 __ TailCallExternalReference(ExternalReference(
1452 IC_Utility(kKeyedLoadPropertyWithInterceptor), masm->isolate()), 2, 1); 1452 IC_Utility(kKeyedLoadPropertyWithInterceptor), masm->isolate()), 2, 1);
1453 1453
1454 __ bind(&slow); 1454 __ bind(&slow);
1455 GenerateMiss(masm, false); 1455 GenerateMiss(masm, MISS);
1456 } 1456 }
1457 1457
1458 1458
1459 void KeyedStoreIC::GenerateMiss(MacroAssembler* masm, bool force_generic) { 1459 void KeyedStoreIC::GenerateMiss(MacroAssembler* masm, ICMissMode miss_mode) {
1460 // ---------- S t a t e -------------- 1460 // ---------- S t a t e --------------
1461 // -- a0 : value 1461 // -- a0 : value
1462 // -- a1 : key 1462 // -- a1 : key
1463 // -- a2 : receiver 1463 // -- a2 : receiver
1464 // -- ra : return address 1464 // -- ra : return address
1465 // ----------------------------------- 1465 // -----------------------------------
1466 1466
1467 // Push receiver, key and value for runtime call. 1467 // Push receiver, key and value for runtime call.
1468 __ Push(a2, a1, a0); 1468 __ Push(a2, a1, a0);
1469 1469
1470 ExternalReference ref = force_generic 1470 ExternalReference ref = miss_mode == MISS_FORCE_GENERIC
1471 ? ExternalReference(IC_Utility(kKeyedStoreIC_MissForceGeneric), 1471 ? ExternalReference(IC_Utility(kKeyedStoreIC_MissForceGeneric),
1472 masm->isolate()) 1472 masm->isolate())
1473 : ExternalReference(IC_Utility(kKeyedStoreIC_Miss), masm->isolate()); 1473 : ExternalReference(IC_Utility(kKeyedStoreIC_Miss), masm->isolate());
1474 __ TailCallExternalReference(ref, 3, 1); 1474 __ TailCallExternalReference(ref, 3, 1);
1475 } 1475 }
1476 1476
1477 1477
1478 void KeyedStoreIC::GenerateSlow(MacroAssembler* masm) { 1478 void KeyedStoreIC::GenerateSlow(MacroAssembler* masm) {
1479 // ---------- S t a t e -------------- 1479 // ---------- S t a t e --------------
1480 // -- a0 : value 1480 // -- a0 : value
(...skipping 285 matching lines...) Expand 10 before | Expand all | Expand 10 after
1766 } else { 1766 } else {
1767 ASSERT(Assembler::IsBne(branch_instr)); 1767 ASSERT(Assembler::IsBne(branch_instr));
1768 patcher.ChangeBranchCondition(eq); 1768 patcher.ChangeBranchCondition(eq);
1769 } 1769 }
1770 } 1770 }
1771 1771
1772 1772
1773 } } // namespace v8::internal 1773 } } // namespace v8::internal
1774 1774
1775 #endif // V8_TARGET_ARCH_MIPS 1775 #endif // V8_TARGET_ARCH_MIPS
OLDNEW
« no previous file with comments | « src/ic.cc ('k') | src/x64/ic-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698