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

Side by Side Diff: src/ia32/stub-cache-ia32.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 | « src/arm/stub-cache-arm.cc ('k') | src/stub-cache.h » ('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 304 matching lines...) Expand 10 before | Expand all | Expand 10 after
315 315
316 // Return the constant value. 316 // Return the constant value.
317 __ mov(eax, Handle<Object>(value)); 317 __ mov(eax, Handle<Object>(value));
318 __ ret(0); 318 __ ret(0);
319 } 319 }
320 320
321 321
322 void StubCompiler::GenerateLoadInterceptor(MacroAssembler* masm, 322 void StubCompiler::GenerateLoadInterceptor(MacroAssembler* masm,
323 JSObject* object, 323 JSObject* object,
324 JSObject* holder, 324 JSObject* holder,
325 Register receiver,
326 Register name,
327 Register scratch1,
328 Register scratch2,
329 Label* miss_label) {
330 GenerateLoadInterceptor(masm,
331 object,
332 holder,
333 Smi::FromInt(JSObject::kLookupInHolder),
334 receiver,
335 name,
336 scratch1,
337 scratch2,
338 miss_label);
339 }
340
341 void StubCompiler::GenerateLoadInterceptor(MacroAssembler* masm,
342 JSObject* object,
343 JSObject* holder,
344 Smi* lookup_hint, 325 Smi* lookup_hint,
345 Register receiver, 326 Register receiver,
346 Register name, 327 Register name,
347 Register scratch1, 328 Register scratch1,
348 Register scratch2, 329 Register scratch2,
349 Label* miss_label) { 330 Label* miss_label) {
350 // Check that the receiver isn't a smi. 331 // Check that the receiver isn't a smi.
351 __ test(receiver, Immediate(kSmiTagMask)); 332 __ test(receiver, Immediate(kSmiTagMask));
352 __ j(zero, miss_label, not_taken); 333 __ j(zero, miss_label, not_taken);
353 334
(...skipping 763 matching lines...) Expand 10 before | Expand all | Expand 10 after
1117 Label miss; 1098 Label miss;
1118 1099
1119 __ mov(eax, (Operand(esp, kPointerSize))); 1100 __ mov(eax, (Operand(esp, kPointerSize)));
1120 __ mov(ecx, (Operand(esp, 2 * kPointerSize))); 1101 __ mov(ecx, (Operand(esp, 2 * kPointerSize)));
1121 __ IncrementCounter(&Counters::keyed_load_interceptor, 1); 1102 __ IncrementCounter(&Counters::keyed_load_interceptor, 1);
1122 1103
1123 // Check that the name has not changed. 1104 // Check that the name has not changed.
1124 __ cmp(Operand(eax), Immediate(Handle<String>(name))); 1105 __ cmp(Operand(eax), Immediate(Handle<String>(name)));
1125 __ j(not_equal, &miss, not_taken); 1106 __ j(not_equal, &miss, not_taken);
1126 1107
1127 GenerateLoadInterceptor(masm(), receiver, holder, ecx, eax, edx, ebx, &miss); 1108 GenerateLoadInterceptor(masm(),
1109 receiver,
1110 holder,
1111 Smi::FromInt(JSObject::kLookupInHolder),
1112 ecx,
1113 eax,
1114 edx,
1115 ebx,
1116 &miss);
1128 __ bind(&miss); 1117 __ bind(&miss);
1129 __ DecrementCounter(&Counters::keyed_load_interceptor, 1); 1118 __ DecrementCounter(&Counters::keyed_load_interceptor, 1);
1130 GenerateLoadMiss(masm(), Code::KEYED_LOAD_IC); 1119 GenerateLoadMiss(masm(), Code::KEYED_LOAD_IC);
1131 1120
1132 // Return the generated code. 1121 // Return the generated code.
1133 return GetCode(INTERCEPTOR, name); 1122 return GetCode(INTERCEPTOR, name);
1134 } 1123 }
1135 1124
1136 1125
1137 1126
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
1210 GenerateLoadMiss(masm(), Code::KEYED_LOAD_IC); 1199 GenerateLoadMiss(masm(), Code::KEYED_LOAD_IC);
1211 1200
1212 // Return the generated code. 1201 // Return the generated code.
1213 return GetCode(CALLBACKS, name); 1202 return GetCode(CALLBACKS, name);
1214 } 1203 }
1215 1204
1216 1205
1217 #undef __ 1206 #undef __
1218 1207
1219 } } // namespace v8::internal 1208 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/arm/stub-cache-arm.cc ('k') | src/stub-cache.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698