Index: src/ic.cc |
=================================================================== |
--- src/ic.cc (revision 6525) |
+++ src/ic.cc (working copy) |
@@ -1204,23 +1204,27 @@ |
if (use_ic) { |
Code* stub = generic_stub(); |
- if (object->IsString() && key->IsNumber()) { |
- stub = string_stub(); |
- } else if (object->IsJSObject()) { |
- Handle<JSObject> receiver = Handle<JSObject>::cast(object); |
- if (receiver->HasExternalArrayElements()) { |
- MaybeObject* probe = |
+ if (state == UNINITIALIZED) { |
+ if (object->IsString() && key->IsNumber()) { |
+ stub = string_stub(); |
+ } else if (object->IsJSObject()) { |
+ Handle<JSObject> receiver = Handle<JSObject>::cast(object); |
+ if (receiver->HasExternalArrayElements()) { |
+ MaybeObject* probe = |
StubCache::ComputeKeyedLoadOrStoreExternalArray(*receiver, false); |
- stub = |
+ stub = |
probe->IsFailure() ? NULL : Code::cast(probe->ToObjectUnchecked()); |
- } else if (receiver->HasIndexedInterceptor()) { |
- stub = indexed_interceptor_stub(); |
- } else if (state == UNINITIALIZED && |
- key->IsSmi() && |
- receiver->map()->has_fast_elements()) { |
- MaybeObject* probe = StubCache::ComputeKeyedLoadSpecialized(*receiver); |
- stub = |
+ } else if (receiver->HasPixelElements()) { |
+ stub = pixel_array_stub(); |
+ } else if (receiver->HasIndexedInterceptor()) { |
+ stub = indexed_interceptor_stub(); |
+ } else if (key->IsSmi() && |
+ receiver->map()->has_fast_elements()) { |
+ MaybeObject* probe = |
+ StubCache::ComputeKeyedLoadSpecialized(*receiver); |
+ stub = |
probe->IsFailure() ? NULL : Code::cast(probe->ToObjectUnchecked()); |
+ } |
} |
} |
if (stub != NULL) set_target(stub); |