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

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

Issue 10442129: Implement implicit instance checks for API accessors. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Addressed comments by Daniel Clifford. 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
« no previous file with comments | « src/ic.cc ('k') | src/objects.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 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 1265 matching lines...) Expand 10 before | Expand all | Expand 10 after
1276 1276
1277 // So far the most popular follow ups for interceptor loads are FIELD 1277 // So far the most popular follow ups for interceptor loads are FIELD
1278 // and CALLBACKS, so inline only them, other cases may be added 1278 // and CALLBACKS, so inline only them, other cases may be added
1279 // later. 1279 // later.
1280 bool compile_followup_inline = false; 1280 bool compile_followup_inline = false;
1281 if (lookup->IsFound() && lookup->IsCacheable()) { 1281 if (lookup->IsFound() && lookup->IsCacheable()) {
1282 if (lookup->type() == FIELD) { 1282 if (lookup->type() == FIELD) {
1283 compile_followup_inline = true; 1283 compile_followup_inline = true;
1284 } else if (lookup->type() == CALLBACKS && 1284 } else if (lookup->type() == CALLBACKS &&
1285 lookup->GetCallbackObject()->IsAccessorInfo()) { 1285 lookup->GetCallbackObject()->IsAccessorInfo()) {
1286 compile_followup_inline = 1286 AccessorInfo* callback = AccessorInfo::cast(lookup->GetCallbackObject());
1287 AccessorInfo::cast(lookup->GetCallbackObject())->getter() != NULL; 1287 compile_followup_inline = callback->getter() != NULL &&
1288 callback->IsCompatibleReceiver(*object);
1288 } 1289 }
1289 } 1290 }
1290 1291
1291 if (compile_followup_inline) { 1292 if (compile_followup_inline) {
1292 // Compile the interceptor call, followed by inline code to load the 1293 // Compile the interceptor call, followed by inline code to load the
1293 // property from further up the prototype chain if the call fails. 1294 // property from further up the prototype chain if the call fails.
1294 // Check that the maps haven't changed. 1295 // Check that the maps haven't changed.
1295 Register holder_reg = CheckPrototypes(object, receiver, interceptor_holder, 1296 Register holder_reg = CheckPrototypes(object, receiver, interceptor_holder,
1296 scratch1, scratch2, scratch3, 1297 scratch1, scratch2, scratch3,
1297 name, miss); 1298 name, miss);
(...skipping 3303 matching lines...) Expand 10 before | Expand all | Expand 10 after
4601 __ Jump(ic_slow, RelocInfo::CODE_TARGET); 4602 __ Jump(ic_slow, RelocInfo::CODE_TARGET);
4602 } 4603 }
4603 } 4604 }
4604 4605
4605 4606
4606 #undef __ 4607 #undef __
4607 4608
4608 } } // namespace v8::internal 4609 } } // namespace v8::internal
4609 4610
4610 #endif // V8_TARGET_ARCH_MIPS 4611 #endif // V8_TARGET_ARCH_MIPS
OLDNEW
« no previous file with comments | « src/ic.cc ('k') | src/objects.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698