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

Side by Side Diff: src/arm/stub-cache-arm.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/api.cc ('k') | 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 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 1251 matching lines...) Expand 10 before | Expand all | Expand 10 after
1262 1262
1263 // So far the most popular follow ups for interceptor loads are FIELD 1263 // So far the most popular follow ups for interceptor loads are FIELD
1264 // and CALLBACKS, so inline only them, other cases may be added 1264 // and CALLBACKS, so inline only them, other cases may be added
1265 // later. 1265 // later.
1266 bool compile_followup_inline = false; 1266 bool compile_followup_inline = false;
1267 if (lookup->IsFound() && lookup->IsCacheable()) { 1267 if (lookup->IsFound() && lookup->IsCacheable()) {
1268 if (lookup->type() == FIELD) { 1268 if (lookup->type() == FIELD) {
1269 compile_followup_inline = true; 1269 compile_followup_inline = true;
1270 } else if (lookup->type() == CALLBACKS && 1270 } else if (lookup->type() == CALLBACKS &&
1271 lookup->GetCallbackObject()->IsAccessorInfo()) { 1271 lookup->GetCallbackObject()->IsAccessorInfo()) {
1272 compile_followup_inline = 1272 AccessorInfo* callback = AccessorInfo::cast(lookup->GetCallbackObject());
1273 AccessorInfo::cast(lookup->GetCallbackObject())->getter() != NULL; 1273 compile_followup_inline = callback->getter() != NULL &&
1274 callback->IsCompatibleReceiver(*object);
1274 } 1275 }
1275 } 1276 }
1276 1277
1277 if (compile_followup_inline) { 1278 if (compile_followup_inline) {
1278 // Compile the interceptor call, followed by inline code to load the 1279 // Compile the interceptor call, followed by inline code to load the
1279 // property from further up the prototype chain if the call fails. 1280 // property from further up the prototype chain if the call fails.
1280 // Check that the maps haven't changed. 1281 // Check that the maps haven't changed.
1281 Register holder_reg = CheckPrototypes(object, receiver, interceptor_holder, 1282 Register holder_reg = CheckPrototypes(object, receiver, interceptor_holder,
1282 scratch1, scratch2, scratch3, 1283 scratch1, scratch2, scratch3,
1283 name, miss); 1284 name, miss);
(...skipping 3257 matching lines...) Expand 10 before | Expand all | Expand 10 after
4541 __ Jump(ic_slow, RelocInfo::CODE_TARGET); 4542 __ Jump(ic_slow, RelocInfo::CODE_TARGET);
4542 } 4543 }
4543 } 4544 }
4544 4545
4545 4546
4546 #undef __ 4547 #undef __
4547 4548
4548 } } // namespace v8::internal 4549 } } // namespace v8::internal
4549 4550
4550 #endif // V8_TARGET_ARCH_ARM 4551 #endif // V8_TARGET_ARCH_ARM
OLDNEW
« no previous file with comments | « src/api.cc ('k') | src/ia32/stub-cache-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698