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

Side by Side Diff: src/ia32/stub-cache-ia32.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 1139 matching lines...) Expand 10 before | Expand all | Expand 10 after
1150 ASSERT(!interceptor_holder->GetNamedInterceptor()->getter()->IsUndefined()); 1150 ASSERT(!interceptor_holder->GetNamedInterceptor()->getter()->IsUndefined());
1151 1151
1152 // Check that the receiver isn't a smi. 1152 // Check that the receiver isn't a smi.
1153 __ JumpIfSmi(receiver, miss); 1153 __ JumpIfSmi(receiver, miss);
1154 1154
1155 // So far the most popular follow ups for interceptor loads are FIELD 1155 // So far the most popular follow ups for interceptor loads are FIELD
1156 // and CALLBACKS, so inline only them, other cases may be added 1156 // and CALLBACKS, so inline only them, other cases may be added
1157 // later. 1157 // later.
1158 bool compile_followup_inline = false; 1158 bool compile_followup_inline = false;
1159 if (lookup->IsFound() && lookup->IsCacheable()) { 1159 if (lookup->IsFound() && lookup->IsCacheable()) {
1160 if (lookup->type() == FIELD) { 1160 if (lookup->IsField()) {
1161 compile_followup_inline = true; 1161 compile_followup_inline = true;
1162 } else if (lookup->type() == CALLBACKS && 1162 } else if (lookup->type() == CALLBACKS &&
1163 lookup->GetCallbackObject()->IsAccessorInfo()) { 1163 lookup->GetCallbackObject()->IsAccessorInfo()) {
1164 AccessorInfo* callback = AccessorInfo::cast(lookup->GetCallbackObject()); 1164 AccessorInfo* callback = AccessorInfo::cast(lookup->GetCallbackObject());
1165 compile_followup_inline = callback->getter() != NULL && 1165 compile_followup_inline = callback->getter() != NULL &&
1166 callback->IsCompatibleReceiver(*object); 1166 callback->IsCompatibleReceiver(*object);
1167 } 1167 }
1168 } 1168 }
1169 1169
1170 if (compile_followup_inline) { 1170 if (compile_followup_inline) {
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
1235 holder_reg = CheckPrototypes(interceptor_holder, 1235 holder_reg = CheckPrototypes(interceptor_holder,
1236 holder_reg, 1236 holder_reg,
1237 Handle<JSObject>(lookup->holder()), 1237 Handle<JSObject>(lookup->holder()),
1238 scratch1, 1238 scratch1,
1239 scratch2, 1239 scratch2,
1240 scratch3, 1240 scratch3,
1241 name, 1241 name,
1242 miss); 1242 miss);
1243 } 1243 }
1244 1244
1245 if (lookup->type() == FIELD) { 1245 if (lookup->IsField()) {
1246 // We found FIELD property in prototype chain of interceptor's holder. 1246 // We found FIELD property in prototype chain of interceptor's holder.
1247 // Retrieve a field from field's holder. 1247 // Retrieve a field from field's holder.
1248 GenerateFastPropertyLoad(masm(), eax, holder_reg, 1248 GenerateFastPropertyLoad(masm(), eax, holder_reg,
1249 Handle<JSObject>(lookup->holder()), 1249 Handle<JSObject>(lookup->holder()),
1250 lookup->GetFieldIndex()); 1250 lookup->GetFieldIndex());
1251 __ ret(0); 1251 __ ret(0);
1252 } else { 1252 } else {
1253 // We found CALLBACKS property in prototype chain of interceptor's 1253 // We found CALLBACKS property in prototype chain of interceptor's
1254 // holder. 1254 // holder.
1255 ASSERT(lookup->type() == CALLBACKS); 1255 ASSERT(lookup->type() == CALLBACKS);
(...skipping 2982 matching lines...) Expand 10 before | Expand all | Expand 10 after
4238 __ jmp(ic_slow, RelocInfo::CODE_TARGET); 4238 __ jmp(ic_slow, RelocInfo::CODE_TARGET);
4239 } 4239 }
4240 } 4240 }
4241 4241
4242 4242
4243 #undef __ 4243 #undef __
4244 4244
4245 } } // namespace v8::internal 4245 } } // namespace v8::internal
4246 4246
4247 #endif // V8_TARGET_ARCH_IA32 4247 #endif // V8_TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « src/ia32/lithium-codegen-ia32.cc ('k') | src/ic.cc » ('j') | src/property.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698