| Index: src/ic.cc
|
| ===================================================================
|
| --- src/ic.cc (revision 14298)
|
| +++ src/ic.cc (working copy)
|
| @@ -1681,16 +1681,23 @@
|
|
|
| State ic_state = target()->ic_state();
|
| Handle<Map> receiver_map(receiver->map(), isolate());
|
| + MapHandleList target_receiver_maps;
|
| if (ic_state == UNINITIALIZED || ic_state == PREMONOMORPHIC) {
|
| // Optimistically assume that ICs that haven't reached the MONOMORPHIC state
|
| // yet will do so and stay there.
|
| Handle<Map> monomorphic_map = ComputeTransitionedMap(receiver, store_mode);
|
| store_mode = GetNonTransitioningStoreMode(store_mode);
|
| - return isolate()->stub_cache()->ComputeKeyedStoreElement(
|
| - monomorphic_map, strict_mode, store_mode);
|
| + if (*monomorphic_map != *receiver_map) {
|
| + target_receiver_maps.Add(receiver_map);
|
| + target_receiver_maps.Add(monomorphic_map);
|
| + return isolate()->stub_cache()->ComputeStoreElementPolymorphic(
|
| + &target_receiver_maps, store_mode, strict_mode);
|
| + } else {
|
| + return isolate()->stub_cache()->ComputeKeyedStoreElement(
|
| + monomorphic_map, strict_mode, store_mode);
|
| + }
|
| }
|
|
|
| - MapHandleList target_receiver_maps;
|
| target()->FindAllMaps(&target_receiver_maps);
|
| if (target_receiver_maps.length() == 0) {
|
| // In the case that there is a non-map-specific IC is installed (e.g. keyed
|
|
|