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

Side by Side Diff: src/arm/stub-cache-arm.cc

Issue 118163: Store lookup index in ARM stubs as well (see r2093 and 2094 for more info). (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 11 years, 6 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/ia32/stub-cache-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 2006-2009 the V8 project authors. All rights reserved. 1 // Copyright 2006-2009 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 228 matching lines...) Expand 10 before | Expand all | Expand 10 after
239 // Do tail-call to the runtime system. 239 // Do tail-call to the runtime system.
240 ExternalReference load_callback_property = 240 ExternalReference load_callback_property =
241 ExternalReference(IC_Utility(IC::kLoadCallbackProperty)); 241 ExternalReference(IC_Utility(IC::kLoadCallbackProperty));
242 __ TailCallRuntime(load_callback_property, 4); 242 __ TailCallRuntime(load_callback_property, 4);
243 } 243 }
244 244
245 245
246 void StubCompiler::GenerateLoadInterceptor(MacroAssembler* masm, 246 void StubCompiler::GenerateLoadInterceptor(MacroAssembler* masm,
247 JSObject* object, 247 JSObject* object,
248 JSObject* holder, 248 JSObject* holder,
249 Smi* lookup_hint,
249 Register receiver, 250 Register receiver,
250 Register name, 251 Register name,
251 Register scratch1, 252 Register scratch1,
252 Register scratch2, 253 Register scratch2,
253 Label* miss_label) { 254 Label* miss_label) {
254 // Check that the receiver isn't a smi. 255 // Check that the receiver isn't a smi.
255 __ tst(receiver, Operand(kSmiTagMask)); 256 __ tst(receiver, Operand(kSmiTagMask));
256 __ b(eq, miss_label); 257 __ b(eq, miss_label);
257 258
258 // Check that the maps haven't changed. 259 // Check that the maps haven't changed.
259 Register reg = 260 Register reg =
260 masm->CheckMaps(object, receiver, holder, scratch1, scratch2, miss_label); 261 masm->CheckMaps(object, receiver, holder, scratch1, scratch2, miss_label);
261 262
262 // Push the arguments on the JS stack of the caller. 263 // Push the arguments on the JS stack of the caller.
263 __ push(receiver); // receiver 264 __ push(receiver); // receiver
264 __ push(reg); // holder 265 __ push(reg); // holder
265 __ push(name); // name 266 __ push(name); // name
267 __ mov(scratch1, Operand(lookup_hint));
268 __ push(scratch1);
266 269
267 // Do tail-call to the runtime system. 270 // Do tail-call to the runtime system.
268 ExternalReference load_ic_property = 271 ExternalReference load_ic_property =
269 ExternalReference(IC_Utility(IC::kLoadInterceptorProperty)); 272 ExternalReference(IC_Utility(IC::kLoadInterceptorProperty));
270 __ TailCallRuntime(load_ic_property, 3); 273 __ TailCallRuntime(load_ic_property, 4);
271 } 274 }
272 275
273 276
274 void StubCompiler::GenerateLoadArrayLength(MacroAssembler* masm, 277 void StubCompiler::GenerateLoadArrayLength(MacroAssembler* masm,
275 Register receiver, 278 Register receiver,
276 Register scratch, 279 Register scratch,
277 Label* miss_label) { 280 Label* miss_label) {
278 // Check that the receiver isn't a smi. 281 // Check that the receiver isn't a smi.
279 __ tst(receiver, Operand(kSmiTagMask)); 282 __ tst(receiver, Operand(kSmiTagMask));
280 __ b(eq, miss_label); 283 __ b(eq, miss_label);
(...skipping 621 matching lines...) Expand 10 before | Expand all | Expand 10 after
902 String* name) { 905 String* name) {
903 // ----------- S t a t e ------------- 906 // ----------- S t a t e -------------
904 // -- r2 : name 907 // -- r2 : name
905 // -- lr : return address 908 // -- lr : return address
906 // -- [sp] : receiver 909 // -- [sp] : receiver
907 // ----------------------------------- 910 // -----------------------------------
908 Label miss; 911 Label miss;
909 912
910 __ ldr(r0, MemOperand(sp, 0)); 913 __ ldr(r0, MemOperand(sp, 0));
911 914
912 GenerateLoadInterceptor(masm(), object, holder, r0, r2, r3, r1, &miss); 915 GenerateLoadInterceptor(masm(),
916 object,
917 holder,
918 holder->InterceptorPropertyLookupHint(name),
919 r0,
920 r2,
921 r3,
922 r1,
923 &miss);
913 __ bind(&miss); 924 __ bind(&miss);
914 GenerateLoadMiss(masm(), Code::LOAD_IC); 925 GenerateLoadMiss(masm(), Code::LOAD_IC);
915 926
916 // Return the generated code. 927 // Return the generated code.
917 return GetCode(INTERCEPTOR, name); 928 return GetCode(INTERCEPTOR, name);
918 } 929 }
919 930
920 931
921 // TODO(1224671): IC stubs for keyed loads have not been implemented 932 // TODO(1224671): IC stubs for keyed loads have not been implemented
922 // for ARM. 933 // for ARM.
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
1008 // ----------------------------------- 1019 // -----------------------------------
1009 Label miss; 1020 Label miss;
1010 1021
1011 // Check the key is the cached one 1022 // Check the key is the cached one
1012 __ ldr(r2, MemOperand(sp, 0)); 1023 __ ldr(r2, MemOperand(sp, 0));
1013 __ ldr(r0, MemOperand(sp, kPointerSize)); 1024 __ ldr(r0, MemOperand(sp, kPointerSize));
1014 1025
1015 __ cmp(r2, Operand(Handle<String>(name))); 1026 __ cmp(r2, Operand(Handle<String>(name)));
1016 __ b(ne, &miss); 1027 __ b(ne, &miss);
1017 1028
1018 GenerateLoadInterceptor(masm(), receiver, holder, r0, r2, r3, r1, &miss); 1029 GenerateLoadInterceptor(masm(),
1030 receiver,
1031 holder,
1032 Smi::FromInt(JSObject::kLookupInHolder),
1033 r0,
1034 r2,
1035 r3,
1036 r1,
1037 &miss);
1019 __ bind(&miss); 1038 __ bind(&miss);
1020 GenerateLoadMiss(masm(), Code::KEYED_LOAD_IC); 1039 GenerateLoadMiss(masm(), Code::KEYED_LOAD_IC);
1021 1040
1022 return GetCode(INTERCEPTOR, name); 1041 return GetCode(INTERCEPTOR, name);
1023 } 1042 }
1024 1043
1025 1044
1026 Object* KeyedLoadStubCompiler::CompileLoadArrayLength(String* name) { 1045 Object* KeyedLoadStubCompiler::CompileLoadArrayLength(String* name) {
1027 // ----------- S t a t e ------------- 1046 // ----------- S t a t e -------------
1028 // -- lr : return address 1047 // -- lr : return address
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
1120 __ Jump(ic, RelocInfo::CODE_TARGET); 1139 __ Jump(ic, RelocInfo::CODE_TARGET);
1121 1140
1122 // Return the generated code. 1141 // Return the generated code.
1123 return GetCode(transition == NULL ? FIELD : MAP_TRANSITION, name); 1142 return GetCode(transition == NULL ? FIELD : MAP_TRANSITION, name);
1124 } 1143 }
1125 1144
1126 1145
1127 #undef __ 1146 #undef __
1128 1147
1129 } } // namespace v8::internal 1148 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « no previous file | src/ia32/stub-cache-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698