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

Side by Side Diff: src/x64/stub-cache-x64.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
« src/property.h ('K') | « src/x64/lithium-codegen-x64.cc ('k') | no next file » | 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 1125 matching lines...) Expand 10 before | Expand all | Expand 10 after
1136 ASSERT(!interceptor_holder->GetNamedInterceptor()->getter()->IsUndefined()); 1136 ASSERT(!interceptor_holder->GetNamedInterceptor()->getter()->IsUndefined());
1137 1137
1138 // Check that the receiver isn't a smi. 1138 // Check that the receiver isn't a smi.
1139 __ JumpIfSmi(receiver, miss); 1139 __ JumpIfSmi(receiver, miss);
1140 1140
1141 // So far the most popular follow ups for interceptor loads are FIELD 1141 // So far the most popular follow ups for interceptor loads are FIELD
1142 // and CALLBACKS, so inline only them, other cases may be added 1142 // and CALLBACKS, so inline only them, other cases may be added
1143 // later. 1143 // later.
1144 bool compile_followup_inline = false; 1144 bool compile_followup_inline = false;
1145 if (lookup->IsFound() && lookup->IsCacheable()) { 1145 if (lookup->IsFound() && lookup->IsCacheable()) {
1146 if (lookup->type() == FIELD) { 1146 if (lookup->IsField()) {
1147 compile_followup_inline = true; 1147 compile_followup_inline = true;
1148 } else if (lookup->type() == CALLBACKS && 1148 } else if (lookup->type() == CALLBACKS &&
1149 lookup->GetCallbackObject()->IsAccessorInfo()) { 1149 lookup->GetCallbackObject()->IsAccessorInfo()) {
1150 AccessorInfo* callback = AccessorInfo::cast(lookup->GetCallbackObject()); 1150 AccessorInfo* callback = AccessorInfo::cast(lookup->GetCallbackObject());
1151 compile_followup_inline = callback->getter() != NULL && 1151 compile_followup_inline = callback->getter() != NULL &&
1152 callback->IsCompatibleReceiver(*object); 1152 callback->IsCompatibleReceiver(*object);
1153 } 1153 }
1154 } 1154 }
1155 1155
1156 if (compile_followup_inline) { 1156 if (compile_followup_inline) {
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
1214 holder_reg = CheckPrototypes(interceptor_holder, 1214 holder_reg = CheckPrototypes(interceptor_holder,
1215 holder_reg, 1215 holder_reg,
1216 Handle<JSObject>(lookup->holder()), 1216 Handle<JSObject>(lookup->holder()),
1217 scratch1, 1217 scratch1,
1218 scratch2, 1218 scratch2,
1219 scratch3, 1219 scratch3,
1220 name, 1220 name,
1221 miss); 1221 miss);
1222 } 1222 }
1223 1223
1224 if (lookup->type() == FIELD) { 1224 if (lookup->IsField()) {
1225 // We found FIELD property in prototype chain of interceptor's holder. 1225 // We found FIELD property in prototype chain of interceptor's holder.
1226 // Retrieve a field from field's holder. 1226 // Retrieve a field from field's holder.
1227 GenerateFastPropertyLoad(masm(), rax, holder_reg, 1227 GenerateFastPropertyLoad(masm(), rax, holder_reg,
1228 Handle<JSObject>(lookup->holder()), 1228 Handle<JSObject>(lookup->holder()),
1229 lookup->GetFieldIndex()); 1229 lookup->GetFieldIndex());
1230 __ ret(0); 1230 __ ret(0);
1231 } else { 1231 } else {
1232 // We found CALLBACKS property in prototype chain of interceptor's 1232 // We found CALLBACKS property in prototype chain of interceptor's
1233 // holder. 1233 // holder.
1234 ASSERT(lookup->type() == CALLBACKS); 1234 ASSERT(lookup->type() == CALLBACKS);
(...skipping 2761 matching lines...) Expand 10 before | Expand all | Expand 10 after
3996 __ jmp(ic_slow, RelocInfo::CODE_TARGET); 3996 __ jmp(ic_slow, RelocInfo::CODE_TARGET);
3997 } 3997 }
3998 } 3998 }
3999 3999
4000 4000
4001 #undef __ 4001 #undef __
4002 4002
4003 } } // namespace v8::internal 4003 } } // namespace v8::internal
4004 4004
4005 #endif // V8_TARGET_ARCH_X64 4005 #endif // V8_TARGET_ARCH_X64
OLDNEW
« src/property.h ('K') | « src/x64/lithium-codegen-x64.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698