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

Side by Side Diff: src/ia32/stub-cache-ia32.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/arm/stub-cache-arm.cc ('k') | src/ic.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 1106 matching lines...) Expand 10 before | Expand all | Expand 10 after
1117 1117
1118 // So far the most popular follow ups for interceptor loads are FIELD 1118 // So far the most popular follow ups for interceptor loads are FIELD
1119 // and CALLBACKS, so inline only them, other cases may be added 1119 // and CALLBACKS, so inline only them, other cases may be added
1120 // later. 1120 // later.
1121 bool compile_followup_inline = false; 1121 bool compile_followup_inline = false;
1122 if (lookup->IsFound() && lookup->IsCacheable()) { 1122 if (lookup->IsFound() && lookup->IsCacheable()) {
1123 if (lookup->type() == FIELD) { 1123 if (lookup->type() == FIELD) {
1124 compile_followup_inline = true; 1124 compile_followup_inline = true;
1125 } else if (lookup->type() == CALLBACKS && 1125 } else if (lookup->type() == CALLBACKS &&
1126 lookup->GetCallbackObject()->IsAccessorInfo()) { 1126 lookup->GetCallbackObject()->IsAccessorInfo()) {
1127 compile_followup_inline = 1127 AccessorInfo* callback = AccessorInfo::cast(lookup->GetCallbackObject());
1128 AccessorInfo::cast(lookup->GetCallbackObject())->getter() != NULL; 1128 compile_followup_inline = callback->getter() != NULL &&
1129 callback->IsCompatibleReceiver(*object);
1129 } 1130 }
1130 } 1131 }
1131 1132
1132 if (compile_followup_inline) { 1133 if (compile_followup_inline) {
1133 // Compile the interceptor call, followed by inline code to load the 1134 // Compile the interceptor call, followed by inline code to load the
1134 // property from further up the prototype chain if the call fails. 1135 // property from further up the prototype chain if the call fails.
1135 // Check that the maps haven't changed. 1136 // Check that the maps haven't changed.
1136 Register holder_reg = CheckPrototypes(object, receiver, interceptor_holder, 1137 Register holder_reg = CheckPrototypes(object, receiver, interceptor_holder,
1137 scratch1, scratch2, scratch3, 1138 scratch1, scratch2, scratch3,
1138 name, miss); 1139 name, miss);
(...skipping 2966 matching lines...) Expand 10 before | Expand all | Expand 10 after
4105 __ jmp(ic_slow, RelocInfo::CODE_TARGET); 4106 __ jmp(ic_slow, RelocInfo::CODE_TARGET);
4106 } 4107 }
4107 } 4108 }
4108 4109
4109 4110
4110 #undef __ 4111 #undef __
4111 4112
4112 } } // namespace v8::internal 4113 } } // namespace v8::internal
4113 4114
4114 #endif // V8_TARGET_ARCH_IA32 4115 #endif // V8_TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « src/arm/stub-cache-arm.cc ('k') | src/ic.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698