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 1202 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1213 } else if (object->IsJSObject()) { | 1213 } else if (object->IsJSObject()) { |
1214 Handle<JSObject> receiver = Handle<JSObject>::cast(object); | 1214 Handle<JSObject> receiver = Handle<JSObject>::cast(object); |
1215 if (receiver->HasExternalArrayElements()) { | 1215 if (receiver->HasExternalArrayElements()) { |
1216 MaybeObject* probe = | 1216 MaybeObject* probe = |
1217 StubCache::ComputeKeyedLoadOrStoreExternalArray(*receiver, | 1217 StubCache::ComputeKeyedLoadOrStoreExternalArray(*receiver, |
1218 false); | 1218 false); |
1219 stub = probe->IsFailure() ? | 1219 stub = probe->IsFailure() ? |
1220 NULL : Code::cast(probe->ToObjectUnchecked()); | 1220 NULL : Code::cast(probe->ToObjectUnchecked()); |
1221 } else if (receiver->HasIndexedInterceptor()) { | 1221 } else if (receiver->HasIndexedInterceptor()) { |
1222 stub = indexed_interceptor_stub(); | 1222 stub = indexed_interceptor_stub(); |
1223 } else if (receiver->HasPixelElements()) { | |
1224 MaybeObject* probe = | |
1225 StubCache::ComputeKeyedLoadPixelArray(*receiver); | |
1226 stub = probe->IsFailure() ? | |
1227 NULL : Code::cast(probe->ToObjectUnchecked()); | |
1228 } else if (key->IsSmi() && | 1223 } else if (key->IsSmi() && |
1229 receiver->map()->has_fast_elements()) { | 1224 receiver->map()->has_fast_elements()) { |
1230 MaybeObject* probe = | 1225 MaybeObject* probe = |
1231 StubCache::ComputeKeyedLoadSpecialized(*receiver); | 1226 StubCache::ComputeKeyedLoadSpecialized(*receiver); |
1232 stub = probe->IsFailure() ? | 1227 stub = probe->IsFailure() ? |
1233 NULL : Code::cast(probe->ToObjectUnchecked()); | 1228 NULL : Code::cast(probe->ToObjectUnchecked()); |
1234 } | 1229 } |
1235 } | 1230 } |
1236 } | 1231 } |
1237 if (stub != NULL) set_target(stub); | 1232 if (stub != NULL) set_target(stub); |
(...skipping 395 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1633 if (use_ic) { | 1628 if (use_ic) { |
1634 Code* stub = generic_stub(); | 1629 Code* stub = generic_stub(); |
1635 if (state == UNINITIALIZED) { | 1630 if (state == UNINITIALIZED) { |
1636 if (object->IsJSObject()) { | 1631 if (object->IsJSObject()) { |
1637 Handle<JSObject> receiver = Handle<JSObject>::cast(object); | 1632 Handle<JSObject> receiver = Handle<JSObject>::cast(object); |
1638 if (receiver->HasExternalArrayElements()) { | 1633 if (receiver->HasExternalArrayElements()) { |
1639 MaybeObject* probe = | 1634 MaybeObject* probe = |
1640 StubCache::ComputeKeyedLoadOrStoreExternalArray(*receiver, true); | 1635 StubCache::ComputeKeyedLoadOrStoreExternalArray(*receiver, true); |
1641 stub = probe->IsFailure() ? | 1636 stub = probe->IsFailure() ? |
1642 NULL : Code::cast(probe->ToObjectUnchecked()); | 1637 NULL : Code::cast(probe->ToObjectUnchecked()); |
1643 } else if (receiver->HasPixelElements()) { | |
1644 MaybeObject* probe = | |
1645 StubCache::ComputeKeyedStorePixelArray(*receiver); | |
1646 stub = probe->IsFailure() ? | |
1647 NULL : Code::cast(probe->ToObjectUnchecked()); | |
1648 } else if (key->IsSmi() && receiver->map()->has_fast_elements()) { | 1638 } else if (key->IsSmi() && receiver->map()->has_fast_elements()) { |
1649 MaybeObject* probe = | 1639 MaybeObject* probe = |
1650 StubCache::ComputeKeyedStoreSpecialized(*receiver); | 1640 StubCache::ComputeKeyedStoreSpecialized(*receiver); |
1651 stub = probe->IsFailure() ? | 1641 stub = probe->IsFailure() ? |
1652 NULL : Code::cast(probe->ToObjectUnchecked()); | 1642 NULL : Code::cast(probe->ToObjectUnchecked()); |
1653 } | 1643 } |
1654 } | 1644 } |
1655 } | 1645 } |
1656 if (stub != NULL) set_target(stub); | 1646 if (stub != NULL) set_target(stub); |
1657 } | 1647 } |
(...skipping 628 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2286 #undef ADDR | 2276 #undef ADDR |
2287 }; | 2277 }; |
2288 | 2278 |
2289 | 2279 |
2290 Address IC::AddressFromUtilityId(IC::UtilityId id) { | 2280 Address IC::AddressFromUtilityId(IC::UtilityId id) { |
2291 return IC_utilities[id]; | 2281 return IC_utilities[id]; |
2292 } | 2282 } |
2293 | 2283 |
2294 | 2284 |
2295 } } // namespace v8::internal | 2285 } } // namespace v8::internal |
OLD | NEW |