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

Side by Side Diff: src/ic.cc

Issue 6664001: [Isolates] Merge (7083,7111] from bleeding_edge. (Closed)
Patch Set: 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
« no previous file with comments | « src/ia32/stub-cache-ia32.cc ('k') | src/jsregexp.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 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 255 matching lines...) Expand 10 before | Expand all | Expand 10 after
266 266
267 267
268 void IC::Clear(Address address) { 268 void IC::Clear(Address address) {
269 Code* target = GetTargetAtAddress(address); 269 Code* target = GetTargetAtAddress(address);
270 270
271 // Don't clear debug break inline cache as it will remove the break point. 271 // Don't clear debug break inline cache as it will remove the break point.
272 if (target->ic_state() == DEBUG_BREAK) return; 272 if (target->ic_state() == DEBUG_BREAK) return;
273 273
274 switch (target->kind()) { 274 switch (target->kind()) {
275 case Code::LOAD_IC: return LoadIC::Clear(address, target); 275 case Code::LOAD_IC: return LoadIC::Clear(address, target);
276 case Code::KEYED_LOAD_IC: return KeyedLoadIC::Clear(address, target); 276 case Code::KEYED_LOAD_IC:
277 case Code::KEYED_EXTERNAL_ARRAY_LOAD_IC:
278 return KeyedLoadIC::Clear(address, target);
277 case Code::STORE_IC: return StoreIC::Clear(address, target); 279 case Code::STORE_IC: return StoreIC::Clear(address, target);
278 case Code::KEYED_STORE_IC: return KeyedStoreIC::Clear(address, target); 280 case Code::KEYED_STORE_IC:
281 case Code::KEYED_EXTERNAL_ARRAY_STORE_IC:
282 return KeyedStoreIC::Clear(address, target);
279 case Code::CALL_IC: return CallIC::Clear(address, target); 283 case Code::CALL_IC: return CallIC::Clear(address, target);
280 case Code::KEYED_CALL_IC: return KeyedCallIC::Clear(address, target); 284 case Code::KEYED_CALL_IC: return KeyedCallIC::Clear(address, target);
281 case Code::BINARY_OP_IC: 285 case Code::BINARY_OP_IC:
282 case Code::TYPE_RECORDING_BINARY_OP_IC: 286 case Code::TYPE_RECORDING_BINARY_OP_IC:
283 case Code::COMPARE_IC: 287 case Code::COMPARE_IC:
284 // Clearing these is tricky and does not 288 // Clearing these is tricky and does not
285 // make any performance difference. 289 // make any performance difference.
286 return; 290 return;
287 default: UNREACHABLE(); 291 default: UNREACHABLE();
288 } 292 }
(...skipping 971 matching lines...) Expand 10 before | Expand all | Expand 10 after
1260 } else if (object->IsJSObject()) { 1264 } else if (object->IsJSObject()) {
1261 Handle<JSObject> receiver = Handle<JSObject>::cast(object); 1265 Handle<JSObject> receiver = Handle<JSObject>::cast(object);
1262 if (receiver->HasExternalArrayElements()) { 1266 if (receiver->HasExternalArrayElements()) {
1263 MaybeObject* probe = 1267 MaybeObject* probe =
1264 isolate()->stub_cache()->ComputeKeyedLoadOrStoreExternalArray( 1268 isolate()->stub_cache()->ComputeKeyedLoadOrStoreExternalArray(
1265 *receiver, false, kNonStrictMode); 1269 *receiver, false, kNonStrictMode);
1266 stub = probe->IsFailure() ? 1270 stub = probe->IsFailure() ?
1267 NULL : Code::cast(probe->ToObjectUnchecked()); 1271 NULL : Code::cast(probe->ToObjectUnchecked());
1268 } else if (receiver->HasIndexedInterceptor()) { 1272 } else if (receiver->HasIndexedInterceptor()) {
1269 stub = indexed_interceptor_stub(); 1273 stub = indexed_interceptor_stub();
1270 } else if (receiver->HasPixelElements()) {
1271 MaybeObject* probe =
1272 isolate()->stub_cache()->ComputeKeyedLoadPixelArray(*receiver);
1273 stub = probe->IsFailure() ?
1274 NULL : Code::cast(probe->ToObjectUnchecked());
1275 } else if (key->IsSmi() && 1274 } else if (key->IsSmi() &&
1276 receiver->map()->has_fast_elements()) { 1275 receiver->map()->has_fast_elements()) {
1277 MaybeObject* probe = 1276 MaybeObject* probe =
1278 isolate()->stub_cache()->ComputeKeyedLoadSpecialized(*receiver); 1277 isolate()->stub_cache()->ComputeKeyedLoadSpecialized(*receiver);
1279 stub = probe->IsFailure() ? 1278 stub = probe->IsFailure() ?
1280 NULL : Code::cast(probe->ToObjectUnchecked()); 1279 NULL : Code::cast(probe->ToObjectUnchecked());
1281 } 1280 }
1282 } 1281 }
1283 } 1282 }
1284 if (stub != NULL) set_target(stub); 1283 if (stub != NULL) set_target(stub);
(...skipping 410 matching lines...) Expand 10 before | Expand all | Expand 10 after
1695 (strict_mode == kStrictMode) ? generic_stub_strict() : generic_stub(); 1694 (strict_mode == kStrictMode) ? generic_stub_strict() : generic_stub();
1696 if (state == UNINITIALIZED) { 1695 if (state == UNINITIALIZED) {
1697 if (object->IsJSObject()) { 1696 if (object->IsJSObject()) {
1698 Handle<JSObject> receiver = Handle<JSObject>::cast(object); 1697 Handle<JSObject> receiver = Handle<JSObject>::cast(object);
1699 if (receiver->HasExternalArrayElements()) { 1698 if (receiver->HasExternalArrayElements()) {
1700 MaybeObject* probe = 1699 MaybeObject* probe =
1701 isolate()->stub_cache()->ComputeKeyedLoadOrStoreExternalArray( 1700 isolate()->stub_cache()->ComputeKeyedLoadOrStoreExternalArray(
1702 *receiver, true, strict_mode); 1701 *receiver, true, strict_mode);
1703 stub = probe->IsFailure() ? 1702 stub = probe->IsFailure() ?
1704 NULL : Code::cast(probe->ToObjectUnchecked()); 1703 NULL : Code::cast(probe->ToObjectUnchecked());
1705 } else if (receiver->HasPixelElements()) {
1706 MaybeObject* probe =
1707 isolate()->stub_cache()->ComputeKeyedStorePixelArray(
1708 *receiver, strict_mode);
1709 stub = probe->IsFailure() ?
1710 NULL : Code::cast(probe->ToObjectUnchecked());
1711 } else if (key->IsSmi() && receiver->map()->has_fast_elements()) { 1704 } else if (key->IsSmi() && receiver->map()->has_fast_elements()) {
1712 MaybeObject* probe = 1705 MaybeObject* probe =
1713 isolate()->stub_cache()->ComputeKeyedStoreSpecialized( 1706 isolate()->stub_cache()->ComputeKeyedStoreSpecialized(
1714 *receiver, strict_mode); 1707 *receiver, strict_mode);
1715 stub = probe->IsFailure() ? 1708 stub = probe->IsFailure() ?
1716 NULL : Code::cast(probe->ToObjectUnchecked()); 1709 NULL : Code::cast(probe->ToObjectUnchecked());
1717 } 1710 }
1718 } 1711 }
1719 } 1712 }
1720 if (stub != NULL) set_target(stub); 1713 if (stub != NULL) set_target(stub);
(...skipping 662 matching lines...) Expand 10 before | Expand all | Expand 10 after
2383 #undef ADDR 2376 #undef ADDR
2384 }; 2377 };
2385 2378
2386 2379
2387 Address IC::AddressFromUtilityId(IC::UtilityId id) { 2380 Address IC::AddressFromUtilityId(IC::UtilityId id) {
2388 return IC_utilities[id]; 2381 return IC_utilities[id];
2389 } 2382 }
2390 2383
2391 2384
2392 } } // namespace v8::internal 2385 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/ia32/stub-cache-ia32.cc ('k') | src/jsregexp.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698