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

Side by Side Diff: src/arm/ic-arm.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 | « no previous file | src/builtins.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 844 matching lines...) Expand 10 before | Expand all | Expand 10 after
855 // The unmapped lookup expects that the parameter map is in r2. 855 // The unmapped lookup expects that the parameter map is in r2.
856 MemOperand unmapped_location = 856 MemOperand unmapped_location =
857 GenerateUnmappedArgumentsLookup(masm, r0, r2, r3, &slow); 857 GenerateUnmappedArgumentsLookup(masm, r0, r2, r3, &slow);
858 __ ldr(r2, unmapped_location); 858 __ ldr(r2, unmapped_location);
859 __ LoadRoot(r3, Heap::kTheHoleValueRootIndex); 859 __ LoadRoot(r3, Heap::kTheHoleValueRootIndex);
860 __ cmp(r2, r3); 860 __ cmp(r2, r3);
861 __ b(eq, &slow); 861 __ b(eq, &slow);
862 __ mov(r0, r2); 862 __ mov(r0, r2);
863 __ Ret(); 863 __ Ret();
864 __ bind(&slow); 864 __ bind(&slow);
865 GenerateMiss(masm, false); 865 GenerateMiss(masm, MISS);
866 } 866 }
867 867
868 868
869 void KeyedStoreIC::GenerateNonStrictArguments(MacroAssembler* masm) { 869 void KeyedStoreIC::GenerateNonStrictArguments(MacroAssembler* masm) {
870 // ---------- S t a t e -------------- 870 // ---------- S t a t e --------------
871 // -- r0 : value 871 // -- r0 : value
872 // -- r1 : key 872 // -- r1 : key
873 // -- r2 : receiver 873 // -- r2 : receiver
874 // -- lr : return address 874 // -- lr : return address
875 // ----------------------------------- 875 // -----------------------------------
876 Label slow, notin; 876 Label slow, notin;
877 MemOperand mapped_location = 877 MemOperand mapped_location =
878 GenerateMappedArgumentsLookup(masm, r2, r1, r3, r4, r5, &notin, &slow); 878 GenerateMappedArgumentsLookup(masm, r2, r1, r3, r4, r5, &notin, &slow);
879 __ str(r0, mapped_location); 879 __ str(r0, mapped_location);
880 __ add(r6, r3, r5); 880 __ add(r6, r3, r5);
881 __ mov(r9, r0); 881 __ mov(r9, r0);
882 __ RecordWrite(r3, r6, r9, kLRHasNotBeenSaved, kDontSaveFPRegs); 882 __ RecordWrite(r3, r6, r9, kLRHasNotBeenSaved, kDontSaveFPRegs);
883 __ Ret(); 883 __ Ret();
884 __ bind(&notin); 884 __ bind(&notin);
885 // The unmapped lookup expects that the parameter map is in r3. 885 // The unmapped lookup expects that the parameter map is in r3.
886 MemOperand unmapped_location = 886 MemOperand unmapped_location =
887 GenerateUnmappedArgumentsLookup(masm, r1, r3, r4, &slow); 887 GenerateUnmappedArgumentsLookup(masm, r1, r3, r4, &slow);
888 __ str(r0, unmapped_location); 888 __ str(r0, unmapped_location);
889 __ add(r6, r3, r4); 889 __ add(r6, r3, r4);
890 __ mov(r9, r0); 890 __ mov(r9, r0);
891 __ RecordWrite(r3, r6, r9, kLRHasNotBeenSaved, kDontSaveFPRegs); 891 __ RecordWrite(r3, r6, r9, kLRHasNotBeenSaved, kDontSaveFPRegs);
892 __ Ret(); 892 __ Ret();
893 __ bind(&slow); 893 __ bind(&slow);
894 GenerateMiss(masm, false); 894 GenerateMiss(masm, MISS);
895 } 895 }
896 896
897 897
898 void KeyedCallIC::GenerateNonStrictArguments(MacroAssembler* masm, 898 void KeyedCallIC::GenerateNonStrictArguments(MacroAssembler* masm,
899 int argc) { 899 int argc) {
900 // ----------- S t a t e ------------- 900 // ----------- S t a t e -------------
901 // -- r2 : name 901 // -- r2 : name
902 // -- lr : return address 902 // -- lr : return address
903 // ----------------------------------- 903 // -----------------------------------
904 Label slow, notin; 904 Label slow, notin;
(...skipping 13 matching lines...) Expand all
918 __ b(eq, &slow); 918 __ b(eq, &slow);
919 GenerateFunctionTailCall(masm, argc, &slow, r3); 919 GenerateFunctionTailCall(masm, argc, &slow, r3);
920 __ bind(&slow); 920 __ bind(&slow);
921 GenerateMiss(masm, argc); 921 GenerateMiss(masm, argc);
922 } 922 }
923 923
924 924
925 Object* KeyedLoadIC_Miss(Arguments args); 925 Object* KeyedLoadIC_Miss(Arguments args);
926 926
927 927
928 void KeyedLoadIC::GenerateMiss(MacroAssembler* masm, bool force_generic) { 928 void KeyedLoadIC::GenerateMiss(MacroAssembler* masm, ICMissMode miss_mode) {
929 // ---------- S t a t e -------------- 929 // ---------- S t a t e --------------
930 // -- lr : return address 930 // -- lr : return address
931 // -- r0 : key 931 // -- r0 : key
932 // -- r1 : receiver 932 // -- r1 : receiver
933 // ----------------------------------- 933 // -----------------------------------
934 Isolate* isolate = masm->isolate(); 934 Isolate* isolate = masm->isolate();
935 935
936 __ IncrementCounter(isolate->counters()->keyed_load_miss(), 1, r3, r4); 936 __ IncrementCounter(isolate->counters()->keyed_load_miss(), 1, r3, r4);
937 937
938 __ Push(r1, r0); 938 __ Push(r1, r0);
939 939
940 // Perform tail call to the entry. 940 // Perform tail call to the entry.
941 ExternalReference ref = force_generic 941 ExternalReference ref = miss_mode == MISS_FORCE_GENERIC
942 ? ExternalReference(IC_Utility(kKeyedLoadIC_MissForceGeneric), isolate) 942 ? ExternalReference(IC_Utility(kKeyedLoadIC_MissForceGeneric), isolate)
943 : ExternalReference(IC_Utility(kKeyedLoadIC_Miss), isolate); 943 : ExternalReference(IC_Utility(kKeyedLoadIC_Miss), isolate);
944 944
945 __ TailCallExternalReference(ref, 2, 1); 945 __ TailCallExternalReference(ref, 2, 1);
946 } 946 }
947 947
948 948
949 void KeyedLoadIC::GenerateRuntimeGetProperty(MacroAssembler* masm) { 949 void KeyedLoadIC::GenerateRuntimeGetProperty(MacroAssembler* masm) {
950 // ---------- S t a t e -------------- 950 // ---------- S t a t e --------------
951 // -- lr : return address 951 // -- lr : return address
(...skipping 199 matching lines...) Expand 10 before | Expand all | Expand 10 after
1151 &miss, // When not a number. 1151 &miss, // When not a number.
1152 &miss, // When index out of range. 1152 &miss, // When index out of range.
1153 STRING_INDEX_IS_ARRAY_INDEX); 1153 STRING_INDEX_IS_ARRAY_INDEX);
1154 char_at_generator.GenerateFast(masm); 1154 char_at_generator.GenerateFast(masm);
1155 __ Ret(); 1155 __ Ret();
1156 1156
1157 StubRuntimeCallHelper call_helper; 1157 StubRuntimeCallHelper call_helper;
1158 char_at_generator.GenerateSlow(masm, call_helper); 1158 char_at_generator.GenerateSlow(masm, call_helper);
1159 1159
1160 __ bind(&miss); 1160 __ bind(&miss);
1161 GenerateMiss(masm, false); 1161 GenerateMiss(masm, MISS);
1162 } 1162 }
1163 1163
1164 1164
1165 void KeyedLoadIC::GenerateIndexedInterceptor(MacroAssembler* masm) { 1165 void KeyedLoadIC::GenerateIndexedInterceptor(MacroAssembler* masm) {
1166 // ---------- S t a t e -------------- 1166 // ---------- S t a t e --------------
1167 // -- lr : return address 1167 // -- lr : return address
1168 // -- r0 : key 1168 // -- r0 : key
1169 // -- r1 : receiver 1169 // -- r1 : receiver
1170 // ----------------------------------- 1170 // -----------------------------------
1171 Label slow; 1171 Label slow;
(...skipping 19 matching lines...) Expand all
1191 __ Push(r1, r0); // Receiver, key. 1191 __ Push(r1, r0); // Receiver, key.
1192 1192
1193 // Perform tail call to the entry. 1193 // Perform tail call to the entry.
1194 __ TailCallExternalReference( 1194 __ TailCallExternalReference(
1195 ExternalReference(IC_Utility(kKeyedLoadPropertyWithInterceptor), 1195 ExternalReference(IC_Utility(kKeyedLoadPropertyWithInterceptor),
1196 masm->isolate()), 1196 masm->isolate()),
1197 2, 1197 2,
1198 1); 1198 1);
1199 1199
1200 __ bind(&slow); 1200 __ bind(&slow);
1201 GenerateMiss(masm, false); 1201 GenerateMiss(masm, MISS);
1202 } 1202 }
1203 1203
1204 1204
1205 void KeyedStoreIC::GenerateMiss(MacroAssembler* masm, bool force_generic) { 1205 void KeyedStoreIC::GenerateMiss(MacroAssembler* masm, ICMissMode miss_mode) {
1206 // ---------- S t a t e -------------- 1206 // ---------- S t a t e --------------
1207 // -- r0 : value 1207 // -- r0 : value
1208 // -- r1 : key 1208 // -- r1 : key
1209 // -- r2 : receiver 1209 // -- r2 : receiver
1210 // -- lr : return address 1210 // -- lr : return address
1211 // ----------------------------------- 1211 // -----------------------------------
1212 1212
1213 // Push receiver, key and value for runtime call. 1213 // Push receiver, key and value for runtime call.
1214 __ Push(r2, r1, r0); 1214 __ Push(r2, r1, r0);
1215 1215
1216 ExternalReference ref = force_generic 1216 ExternalReference ref = miss_mode == MISS_FORCE_GENERIC
1217 ? ExternalReference(IC_Utility(kKeyedStoreIC_MissForceGeneric), 1217 ? ExternalReference(IC_Utility(kKeyedStoreIC_MissForceGeneric),
1218 masm->isolate()) 1218 masm->isolate())
1219 : ExternalReference(IC_Utility(kKeyedStoreIC_Miss), masm->isolate()); 1219 : ExternalReference(IC_Utility(kKeyedStoreIC_Miss), masm->isolate());
1220 __ TailCallExternalReference(ref, 3, 1); 1220 __ TailCallExternalReference(ref, 3, 1);
1221 } 1221 }
1222 1222
1223 1223
1224 void KeyedStoreIC::GenerateSlow(MacroAssembler* masm) { 1224 void KeyedStoreIC::GenerateSlow(MacroAssembler* masm) {
1225 // ---------- S t a t e -------------- 1225 // ---------- S t a t e --------------
1226 // -- r0 : value 1226 // -- r0 : value
(...skipping 543 matching lines...) Expand 10 before | Expand all | Expand 10 after
1770 } else { 1770 } else {
1771 ASSERT(Assembler::GetCondition(branch_instr) == ne); 1771 ASSERT(Assembler::GetCondition(branch_instr) == ne);
1772 patcher.EmitCondition(eq); 1772 patcher.EmitCondition(eq);
1773 } 1773 }
1774 } 1774 }
1775 1775
1776 1776
1777 } } // namespace v8::internal 1777 } } // namespace v8::internal
1778 1778
1779 #endif // V8_TARGET_ARCH_ARM 1779 #endif // V8_TARGET_ARCH_ARM
OLDNEW
« no previous file with comments | « no previous file | src/builtins.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698