OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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 1436 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1447 // superset of the original IC. Handle those here if the receiver map hasn't | 1447 // superset of the original IC. Handle those here if the receiver map hasn't |
1448 // changed or it has transitioned to a more general kind. | 1448 // changed or it has transitioned to a more general kind. |
1449 KeyedAccessStoreMode old_store_mode = | 1449 KeyedAccessStoreMode old_store_mode = |
1450 KeyedStoreIC::GetKeyedAccessStoreMode(target()->extra_ic_state()); | 1450 KeyedStoreIC::GetKeyedAccessStoreMode(target()->extra_ic_state()); |
1451 Handle<Map> previous_receiver_map = target_receiver_maps.at(0); | 1451 Handle<Map> previous_receiver_map = target_receiver_maps.at(0); |
1452 if (state() == MONOMORPHIC) { | 1452 if (state() == MONOMORPHIC) { |
1453 Handle<Map> transitioned_receiver_map = receiver_map; | 1453 Handle<Map> transitioned_receiver_map = receiver_map; |
1454 if (IsTransitionStoreMode(store_mode)) { | 1454 if (IsTransitionStoreMode(store_mode)) { |
1455 transitioned_receiver_map = ComputeTransitionedMap(receiver, store_mode); | 1455 transitioned_receiver_map = ComputeTransitionedMap(receiver, store_mode); |
1456 } | 1456 } |
1457 if (receiver_map.is_identical_to(previous_receiver_map) || | 1457 if ((receiver_map.is_identical_to(previous_receiver_map) && |
| 1458 IsTransitionStoreMode(store_mode)) || |
1458 IsTransitionOfMonomorphicTarget( | 1459 IsTransitionOfMonomorphicTarget( |
1459 MapToType<HeapType>(transitioned_receiver_map, isolate()))) { | 1460 MapToType<HeapType>(transitioned_receiver_map, isolate()))) { |
1460 // If the "old" and "new" maps are in the same elements map family, or | 1461 // If the "old" and "new" maps are in the same elements map family, or |
1461 // if they at least come from the same origin for a transitioning store, | 1462 // if they at least come from the same origin for a transitioning store, |
1462 // stay MONOMORPHIC and use the map for the most generic ElementsKind. | 1463 // stay MONOMORPHIC and use the map for the most generic ElementsKind. |
1463 store_mode = GetNonTransitioningStoreMode(store_mode); | 1464 store_mode = GetNonTransitioningStoreMode(store_mode); |
1464 return isolate()->stub_cache()->ComputeKeyedStoreElement( | 1465 return isolate()->stub_cache()->ComputeKeyedStoreElement( |
1465 transitioned_receiver_map, strict_mode(), store_mode); | 1466 transitioned_receiver_map, strict_mode(), store_mode); |
1466 } else if (*previous_receiver_map == receiver->map() && | 1467 } else if (*previous_receiver_map == receiver->map() && |
1467 old_store_mode == STANDARD_STORE && | 1468 old_store_mode == STANDARD_STORE && |
(...skipping 1369 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2837 #undef ADDR | 2838 #undef ADDR |
2838 }; | 2839 }; |
2839 | 2840 |
2840 | 2841 |
2841 Address IC::AddressFromUtilityId(IC::UtilityId id) { | 2842 Address IC::AddressFromUtilityId(IC::UtilityId id) { |
2842 return IC_utilities[id]; | 2843 return IC_utilities[id]; |
2843 } | 2844 } |
2844 | 2845 |
2845 | 2846 |
2846 } } // namespace v8::internal | 2847 } } // namespace v8::internal |
OLD | NEW |