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

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

Issue 10626004: Cleaning up usage of lookup results. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 8 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
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 1300 matching lines...) Expand 10 before | Expand all | Expand 10 after
1311 ASSERT(!interceptor_holder->GetNamedInterceptor()->getter()->IsUndefined()); 1311 ASSERT(!interceptor_holder->GetNamedInterceptor()->getter()->IsUndefined());
1312 1312
1313 // Check that the receiver isn't a smi. 1313 // Check that the receiver isn't a smi.
1314 __ JumpIfSmi(receiver, miss); 1314 __ JumpIfSmi(receiver, miss);
1315 1315
1316 // So far the most popular follow ups for interceptor loads are FIELD 1316 // So far the most popular follow ups for interceptor loads are FIELD
1317 // and CALLBACKS, so inline only them, other cases may be added 1317 // and CALLBACKS, so inline only them, other cases may be added
1318 // later. 1318 // later.
1319 bool compile_followup_inline = false; 1319 bool compile_followup_inline = false;
1320 if (lookup->IsFound() && lookup->IsCacheable()) { 1320 if (lookup->IsFound() && lookup->IsCacheable()) {
1321 if (lookup->type() == FIELD) { 1321 if (lookup->IsField()) {
1322 compile_followup_inline = true; 1322 compile_followup_inline = true;
1323 } else if (lookup->type() == CALLBACKS && 1323 } else if (lookup->type() == CALLBACKS &&
1324 lookup->GetCallbackObject()->IsAccessorInfo()) { 1324 lookup->GetCallbackObject()->IsAccessorInfo()) {
1325 AccessorInfo* callback = AccessorInfo::cast(lookup->GetCallbackObject()); 1325 AccessorInfo* callback = AccessorInfo::cast(lookup->GetCallbackObject());
1326 compile_followup_inline = callback->getter() != NULL && 1326 compile_followup_inline = callback->getter() != NULL &&
1327 callback->IsCompatibleReceiver(*object); 1327 callback->IsCompatibleReceiver(*object);
1328 } 1328 }
1329 } 1329 }
1330 1330
1331 if (compile_followup_inline) { 1331 if (compile_followup_inline) {
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
1384 holder_reg = CheckPrototypes(interceptor_holder, 1384 holder_reg = CheckPrototypes(interceptor_holder,
1385 holder_reg, 1385 holder_reg,
1386 Handle<JSObject>(lookup->holder()), 1386 Handle<JSObject>(lookup->holder()),
1387 scratch1, 1387 scratch1,
1388 scratch2, 1388 scratch2,
1389 scratch3, 1389 scratch3,
1390 name, 1390 name,
1391 miss); 1391 miss);
1392 } 1392 }
1393 1393
1394 if (lookup->type() == FIELD) { 1394 if (lookup->IsField()) {
1395 // We found FIELD property in prototype chain of interceptor's holder. 1395 // We found FIELD property in prototype chain of interceptor's holder.
1396 // Retrieve a field from field's holder. 1396 // Retrieve a field from field's holder.
1397 GenerateFastPropertyLoad(masm(), v0, holder_reg, 1397 GenerateFastPropertyLoad(masm(), v0, holder_reg,
1398 Handle<JSObject>(lookup->holder()), 1398 Handle<JSObject>(lookup->holder()),
1399 lookup->GetFieldIndex()); 1399 lookup->GetFieldIndex());
1400 __ Ret(); 1400 __ Ret();
1401 } else { 1401 } else {
1402 // We found CALLBACKS property in prototype chain of interceptor's 1402 // We found CALLBACKS property in prototype chain of interceptor's
1403 // holder. 1403 // holder.
1404 ASSERT(lookup->type() == CALLBACKS); 1404 ASSERT(lookup->type() == CALLBACKS);
(...skipping 3332 matching lines...) Expand 10 before | Expand all | Expand 10 after
4737 __ Jump(ic_slow, RelocInfo::CODE_TARGET); 4737 __ Jump(ic_slow, RelocInfo::CODE_TARGET);
4738 } 4738 }
4739 } 4739 }
4740 4740
4741 4741
4742 #undef __ 4742 #undef __
4743 4743
4744 } } // namespace v8::internal 4744 } } // namespace v8::internal
4745 4745
4746 #endif // V8_TARGET_ARCH_MIPS 4746 #endif // V8_TARGET_ARCH_MIPS
OLDNEW
« no previous file with comments | « src/mips/lithium-codegen-mips.cc ('k') | src/objects.cc » ('j') | src/property.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698