OLD | NEW |
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 1218 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1229 Handle<JSObject> receiver = Handle<JSObject>::cast(object); | 1229 Handle<JSObject> receiver = Handle<JSObject>::cast(object); |
1230 if (receiver->HasExternalArrayElements()) { | 1230 if (receiver->HasExternalArrayElements()) { |
1231 MaybeObject* probe = | 1231 MaybeObject* probe = |
1232 StubCache::ComputeKeyedLoadOrStoreExternalArray(*receiver, | 1232 StubCache::ComputeKeyedLoadOrStoreExternalArray(*receiver, |
1233 false, | 1233 false, |
1234 kNonStrictMode); | 1234 kNonStrictMode); |
1235 stub = probe->IsFailure() ? | 1235 stub = probe->IsFailure() ? |
1236 NULL : Code::cast(probe->ToObjectUnchecked()); | 1236 NULL : Code::cast(probe->ToObjectUnchecked()); |
1237 } else if (receiver->HasIndexedInterceptor()) { | 1237 } else if (receiver->HasIndexedInterceptor()) { |
1238 stub = indexed_interceptor_stub(); | 1238 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() && | 1239 } else if (key->IsSmi() && |
1245 receiver->map()->has_fast_elements()) { | 1240 receiver->map()->has_fast_elements()) { |
1246 MaybeObject* probe = | 1241 MaybeObject* probe = |
1247 StubCache::ComputeKeyedLoadSpecialized(*receiver); | 1242 StubCache::ComputeKeyedLoadSpecialized(*receiver); |
1248 stub = probe->IsFailure() ? | 1243 stub = probe->IsFailure() ? |
1249 NULL : Code::cast(probe->ToObjectUnchecked()); | 1244 NULL : Code::cast(probe->ToObjectUnchecked()); |
1250 } | 1245 } |
1251 } | 1246 } |
1252 } | 1247 } |
1253 if (stub != NULL) set_target(stub); | 1248 if (stub != NULL) set_target(stub); |
(...skipping 413 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1667 (strict_mode == kStrictMode) ? generic_stub_strict() : generic_stub(); | 1662 (strict_mode == kStrictMode) ? generic_stub_strict() : generic_stub(); |
1668 if (state == UNINITIALIZED) { | 1663 if (state == UNINITIALIZED) { |
1669 if (object->IsJSObject()) { | 1664 if (object->IsJSObject()) { |
1670 Handle<JSObject> receiver = Handle<JSObject>::cast(object); | 1665 Handle<JSObject> receiver = Handle<JSObject>::cast(object); |
1671 if (receiver->HasExternalArrayElements()) { | 1666 if (receiver->HasExternalArrayElements()) { |
1672 MaybeObject* probe = | 1667 MaybeObject* probe = |
1673 StubCache::ComputeKeyedLoadOrStoreExternalArray( | 1668 StubCache::ComputeKeyedLoadOrStoreExternalArray( |
1674 *receiver, true, strict_mode); | 1669 *receiver, true, strict_mode); |
1675 stub = probe->IsFailure() ? | 1670 stub = probe->IsFailure() ? |
1676 NULL : Code::cast(probe->ToObjectUnchecked()); | 1671 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()) { | 1672 } else if (key->IsSmi() && receiver->map()->has_fast_elements()) { |
1683 MaybeObject* probe = | 1673 MaybeObject* probe = |
1684 StubCache::ComputeKeyedStoreSpecialized(*receiver, strict_mode); | 1674 StubCache::ComputeKeyedStoreSpecialized(*receiver, strict_mode); |
1685 stub = probe->IsFailure() ? | 1675 stub = probe->IsFailure() ? |
1686 NULL : Code::cast(probe->ToObjectUnchecked()); | 1676 NULL : Code::cast(probe->ToObjectUnchecked()); |
1687 } | 1677 } |
1688 } | 1678 } |
1689 } | 1679 } |
1690 if (stub != NULL) set_target(stub); | 1680 if (stub != NULL) set_target(stub); |
1691 } | 1681 } |
(...skipping 640 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2332 #undef ADDR | 2322 #undef ADDR |
2333 }; | 2323 }; |
2334 | 2324 |
2335 | 2325 |
2336 Address IC::AddressFromUtilityId(IC::UtilityId id) { | 2326 Address IC::AddressFromUtilityId(IC::UtilityId id) { |
2337 return IC_utilities[id]; | 2327 return IC_utilities[id]; |
2338 } | 2328 } |
2339 | 2329 |
2340 | 2330 |
2341 } } // namespace v8::internal | 2331 } } // namespace v8::internal |
OLD | NEW |