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

Side by Side Diff: src/ic.cc

Issue 6546036: Combine typed and pixel arrays. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: final version Created 9 years, 9 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/ia32/stub-cache-ia32.cc ('k') | src/log.h » ('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 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 250 matching lines...) Expand 10 before | Expand all | Expand 10 after
261 261
262 262
263 void IC::Clear(Address address) { 263 void IC::Clear(Address address) {
264 Code* target = GetTargetAtAddress(address); 264 Code* target = GetTargetAtAddress(address);
265 265
266 // Don't clear debug break inline cache as it will remove the break point. 266 // Don't clear debug break inline cache as it will remove the break point.
267 if (target->ic_state() == DEBUG_BREAK) return; 267 if (target->ic_state() == DEBUG_BREAK) return;
268 268
269 switch (target->kind()) { 269 switch (target->kind()) {
270 case Code::LOAD_IC: return LoadIC::Clear(address, target); 270 case Code::LOAD_IC: return LoadIC::Clear(address, target);
271 case Code::KEYED_LOAD_IC: return KeyedLoadIC::Clear(address, target); 271 case Code::KEYED_LOAD_IC:
272 case Code::KEYED_EXTERNAL_ARRAY_LOAD_IC:
273 return KeyedLoadIC::Clear(address, target);
272 case Code::STORE_IC: return StoreIC::Clear(address, target); 274 case Code::STORE_IC: return StoreIC::Clear(address, target);
273 case Code::KEYED_STORE_IC: return KeyedStoreIC::Clear(address, target); 275 case Code::KEYED_STORE_IC:
276 case Code::KEYED_EXTERNAL_ARRAY_STORE_IC:
277 return KeyedStoreIC::Clear(address, target);
274 case Code::CALL_IC: return CallIC::Clear(address, target); 278 case Code::CALL_IC: return CallIC::Clear(address, target);
275 case Code::KEYED_CALL_IC: return KeyedCallIC::Clear(address, target); 279 case Code::KEYED_CALL_IC: return KeyedCallIC::Clear(address, target);
276 case Code::BINARY_OP_IC: 280 case Code::BINARY_OP_IC:
277 case Code::TYPE_RECORDING_BINARY_OP_IC: 281 case Code::TYPE_RECORDING_BINARY_OP_IC:
278 case Code::COMPARE_IC: 282 case Code::COMPARE_IC:
279 // Clearing these is tricky and does not 283 // Clearing these is tricky and does not
280 // make any performance difference. 284 // make any performance difference.
281 return; 285 return;
282 default: UNREACHABLE(); 286 default: UNREACHABLE();
283 } 287 }
(...skipping 945 matching lines...) Expand 10 before | Expand all | Expand 10 after
1229 Handle<JSObject> receiver = Handle<JSObject>::cast(object); 1233 Handle<JSObject> receiver = Handle<JSObject>::cast(object);
1230 if (receiver->HasExternalArrayElements()) { 1234 if (receiver->HasExternalArrayElements()) {
1231 MaybeObject* probe = 1235 MaybeObject* probe =
1232 StubCache::ComputeKeyedLoadOrStoreExternalArray(*receiver, 1236 StubCache::ComputeKeyedLoadOrStoreExternalArray(*receiver,
1233 false, 1237 false,
1234 kNonStrictMode); 1238 kNonStrictMode);
1235 stub = probe->IsFailure() ? 1239 stub = probe->IsFailure() ?
1236 NULL : Code::cast(probe->ToObjectUnchecked()); 1240 NULL : Code::cast(probe->ToObjectUnchecked());
1237 } else if (receiver->HasIndexedInterceptor()) { 1241 } else if (receiver->HasIndexedInterceptor()) {
1238 stub = indexed_interceptor_stub(); 1242 stub = indexed_interceptor_stub();
1239 } else if (receiver->HasPixelElements()) {
1240 MaybeObject* probe =
1241 StubCache::ComputeKeyedLoadPixelArray(*receiver);
1242 stub = probe->IsFailure() ?
1243 NULL : Code::cast(probe->ToObjectUnchecked());
1244 } else if (key->IsSmi() && 1243 } else if (key->IsSmi() &&
1245 receiver->map()->has_fast_elements()) { 1244 receiver->map()->has_fast_elements()) {
1246 MaybeObject* probe = 1245 MaybeObject* probe =
1247 StubCache::ComputeKeyedLoadSpecialized(*receiver); 1246 StubCache::ComputeKeyedLoadSpecialized(*receiver);
1248 stub = probe->IsFailure() ? 1247 stub = probe->IsFailure() ?
1249 NULL : Code::cast(probe->ToObjectUnchecked()); 1248 NULL : Code::cast(probe->ToObjectUnchecked());
1250 } 1249 }
1251 } 1250 }
1252 } 1251 }
1253 if (stub != NULL) set_target(stub); 1252 if (stub != NULL) set_target(stub);
(...skipping 413 matching lines...) Expand 10 before | Expand all | Expand 10 after
1667 (strict_mode == kStrictMode) ? generic_stub_strict() : generic_stub(); 1666 (strict_mode == kStrictMode) ? generic_stub_strict() : generic_stub();
1668 if (state == UNINITIALIZED) { 1667 if (state == UNINITIALIZED) {
1669 if (object->IsJSObject()) { 1668 if (object->IsJSObject()) {
1670 Handle<JSObject> receiver = Handle<JSObject>::cast(object); 1669 Handle<JSObject> receiver = Handle<JSObject>::cast(object);
1671 if (receiver->HasExternalArrayElements()) { 1670 if (receiver->HasExternalArrayElements()) {
1672 MaybeObject* probe = 1671 MaybeObject* probe =
1673 StubCache::ComputeKeyedLoadOrStoreExternalArray( 1672 StubCache::ComputeKeyedLoadOrStoreExternalArray(
1674 *receiver, true, strict_mode); 1673 *receiver, true, strict_mode);
1675 stub = probe->IsFailure() ? 1674 stub = probe->IsFailure() ?
1676 NULL : Code::cast(probe->ToObjectUnchecked()); 1675 NULL : Code::cast(probe->ToObjectUnchecked());
1677 } else if (receiver->HasPixelElements()) {
1678 MaybeObject* probe =
1679 StubCache::ComputeKeyedStorePixelArray(*receiver, strict_mode);
1680 stub = probe->IsFailure() ?
1681 NULL : Code::cast(probe->ToObjectUnchecked());
1682 } else if (key->IsSmi() && receiver->map()->has_fast_elements()) { 1676 } else if (key->IsSmi() && receiver->map()->has_fast_elements()) {
1683 MaybeObject* probe = 1677 MaybeObject* probe =
1684 StubCache::ComputeKeyedStoreSpecialized(*receiver, strict_mode); 1678 StubCache::ComputeKeyedStoreSpecialized(*receiver, strict_mode);
1685 stub = probe->IsFailure() ? 1679 stub = probe->IsFailure() ?
1686 NULL : Code::cast(probe->ToObjectUnchecked()); 1680 NULL : Code::cast(probe->ToObjectUnchecked());
1687 } 1681 }
1688 } 1682 }
1689 } 1683 }
1690 if (stub != NULL) set_target(stub); 1684 if (stub != NULL) set_target(stub);
1691 } 1685 }
(...skipping 640 matching lines...) Expand 10 before | Expand all | Expand 10 after
2332 #undef ADDR 2326 #undef ADDR
2333 }; 2327 };
2334 2328
2335 2329
2336 Address IC::AddressFromUtilityId(IC::UtilityId id) { 2330 Address IC::AddressFromUtilityId(IC::UtilityId id) {
2337 return IC_utilities[id]; 2331 return IC_utilities[id];
2338 } 2332 }
2339 2333
2340 2334
2341 } } // namespace v8::internal 2335 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/ia32/stub-cache-ia32.cc ('k') | src/log.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698