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

Side by Side Diff: src/ic.cc

Issue 6323002: Add custom typed ICs for pixel array loads. (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 9 years, 11 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 2006-2009 the V8 project authors. All rights reserved. 1 // Copyright 2006-2009 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 1179 matching lines...) Expand 10 before | Expand all | Expand 10 after
1190 if (use_ic) { 1190 if (use_ic) {
1191 Code* stub = generic_stub(); 1191 Code* stub = generic_stub();
1192 if (object->IsString() && key->IsNumber()) { 1192 if (object->IsString() && key->IsNumber()) {
1193 stub = string_stub(); 1193 stub = string_stub();
1194 } else if (object->IsJSObject()) { 1194 } else if (object->IsJSObject()) {
1195 Handle<JSObject> receiver = Handle<JSObject>::cast(object); 1195 Handle<JSObject> receiver = Handle<JSObject>::cast(object);
1196 if (receiver->HasExternalArrayElements()) { 1196 if (receiver->HasExternalArrayElements()) {
1197 MaybeObject* probe = 1197 MaybeObject* probe =
1198 StubCache::ComputeKeyedLoadOrStoreExternalArray(*receiver, false); 1198 StubCache::ComputeKeyedLoadOrStoreExternalArray(*receiver, false);
1199 stub = 1199 stub =
1200 probe->IsFailure() ? NULL : Code::cast(probe->ToObjectUnchecked()); 1200 probe->IsFailure() ? NULL : Code::cast(probe->ToObjectUnchecked());
1201 } else if (receiver->HasPixelElements()) {
1202 stub = pixel_array_stub();
Mads Ager (chromium) 2011/01/25 14:49:17 Let's remove the pixel array code in the generic s
danno 2011/01/25 20:56:29 This occurred to me too, but I actually think we s
Mads Ager (chromium) 2011/01/26 08:10:21 True, we don't deal with it in that case and I gue
1201 } else if (receiver->HasIndexedInterceptor()) { 1203 } else if (receiver->HasIndexedInterceptor()) {
1202 stub = indexed_interceptor_stub(); 1204 stub = indexed_interceptor_stub();
1203 } else if (state == UNINITIALIZED && 1205 } else if (state == UNINITIALIZED &&
1204 key->IsSmi() && 1206 key->IsSmi() &&
1205 receiver->map()->has_fast_elements()) { 1207 receiver->map()->has_fast_elements()) {
1206 MaybeObject* probe = StubCache::ComputeKeyedLoadSpecialized(*receiver); 1208 MaybeObject* probe = StubCache::ComputeKeyedLoadSpecialized(*receiver);
1207 stub = 1209 stub =
1208 probe->IsFailure() ? NULL : Code::cast(probe->ToObjectUnchecked()); 1210 probe->IsFailure() ? NULL : Code::cast(probe->ToObjectUnchecked());
1209 } 1211 }
1210 } 1212 }
(...skipping 1019 matching lines...) Expand 10 before | Expand all | Expand 10 after
2230 #undef ADDR 2232 #undef ADDR
2231 }; 2233 };
2232 2234
2233 2235
2234 Address IC::AddressFromUtilityId(IC::UtilityId id) { 2236 Address IC::AddressFromUtilityId(IC::UtilityId id) {
2235 return IC_utilities[id]; 2237 return IC_utilities[id];
2236 } 2238 }
2237 2239
2238 2240
2239 } } // namespace v8::internal 2241 } } // namespace v8::internal
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698