Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(53)

Side by Side Diff: src/ic.cc

Issue 196413031: Merge r19847 and r19893 to 3.23 branch. (Closed) Base URL: https://v8.googlecode.com/svn/branches/3.23
Patch Set: Created 6 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | src/version.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 1728 matching lines...) Expand 10 before | Expand all | Expand 10 after
1739 KeyedStoreIC::GetKeyedAccessStoreMode(target()->extra_ic_state()); 1739 KeyedStoreIC::GetKeyedAccessStoreMode(target()->extra_ic_state());
1740 Handle<Map> previous_receiver_map = target_receiver_maps.at(0); 1740 Handle<Map> previous_receiver_map = target_receiver_maps.at(0);
1741 if (state() == MONOMORPHIC) { 1741 if (state() == MONOMORPHIC) {
1742 // If the "old" and "new" maps are in the same elements map family, stay 1742 // If the "old" and "new" maps are in the same elements map family, stay
1743 // MONOMORPHIC and use the map for the most generic ElementsKind. 1743 // MONOMORPHIC and use the map for the most generic ElementsKind.
1744 Handle<Map> transitioned_receiver_map = receiver_map; 1744 Handle<Map> transitioned_receiver_map = receiver_map;
1745 if (IsTransitionStoreMode(store_mode)) { 1745 if (IsTransitionStoreMode(store_mode)) {
1746 transitioned_receiver_map = 1746 transitioned_receiver_map =
1747 ComputeTransitionedMap(receiver, store_mode); 1747 ComputeTransitionedMap(receiver, store_mode);
1748 } 1748 }
1749 if (IsTransitionOfMonomorphicTarget(MapToType(transitioned_receiver_map))) { 1749 if (receiver_map.is_identical_to(previous_receiver_map) ||
1750 IsTransitionOfMonomorphicTarget(MapToType(transitioned_receiver_map))) {
1750 // Element family is the same, use the "worst" case map. 1751 // Element family is the same, use the "worst" case map.
1751 store_mode = GetNonTransitioningStoreMode(store_mode); 1752 store_mode = GetNonTransitioningStoreMode(store_mode);
1752 return isolate()->stub_cache()->ComputeKeyedStoreElement( 1753 return isolate()->stub_cache()->ComputeKeyedStoreElement(
1753 transitioned_receiver_map, strict_mode(), store_mode); 1754 transitioned_receiver_map, strict_mode(), store_mode);
1754 } else if (*previous_receiver_map == receiver->map() && 1755 } else if (*previous_receiver_map == receiver->map() &&
1755 old_store_mode == STANDARD_STORE && 1756 old_store_mode == STANDARD_STORE &&
1756 (IsGrowStoreMode(store_mode) || 1757 (store_mode == STORE_AND_GROW_NO_TRANSITION ||
1757 store_mode == STORE_NO_TRANSITION_IGNORE_OUT_OF_BOUNDS || 1758 store_mode == STORE_NO_TRANSITION_IGNORE_OUT_OF_BOUNDS ||
1758 store_mode == STORE_NO_TRANSITION_HANDLE_COW)) { 1759 store_mode == STORE_NO_TRANSITION_HANDLE_COW)) {
1759 // A "normal" IC that handles stores can switch to a version that can 1760 // A "normal" IC that handles stores can switch to a version that can
1760 // grow at the end of the array, handle OOB accesses or copy COW arrays 1761 // grow at the end of the array, handle OOB accesses or copy COW arrays
1761 // and still stay MONOMORPHIC. 1762 // and still stay MONOMORPHIC.
1762 return isolate()->stub_cache()->ComputeKeyedStoreElement( 1763 return isolate()->stub_cache()->ComputeKeyedStoreElement(
1763 receiver_map, strict_mode(), store_mode); 1764 receiver_map, strict_mode(), store_mode);
1764 } 1765 }
1765 } 1766 }
1766 1767
(...skipping 1371 matching lines...) Expand 10 before | Expand all | Expand 10 after
3138 #undef ADDR 3139 #undef ADDR
3139 }; 3140 };
3140 3141
3141 3142
3142 Address IC::AddressFromUtilityId(IC::UtilityId id) { 3143 Address IC::AddressFromUtilityId(IC::UtilityId id) {
3143 return IC_utilities[id]; 3144 return IC_utilities[id];
3144 } 3145 }
3145 3146
3146 3147
3147 } } // namespace v8::internal 3148 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « no previous file | src/version.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698