Revision: 15626
Author: [email protected]
Date: Thu Jul 11 04:54:43 2013
Log: Keep IC monomorphic on transition, even if previously not
STANDARD_STORE.
BUG=
[email protected]
Review URL: https://chromiumcodereview.appspot.com/18034023
http://code.google.com/p/v8/source/detail?r=15626
Modified:
/branches/bleeding_edge/src/ic.cc
=======================================
--- /branches/bleeding_edge/src/ic.cc Wed Jul 10 09:06:30 2013
+++ /branches/bleeding_edge/src/ic.cc Thu Jul 11 04:54:43 2013
@@ -1871,7 +1871,7 @@
KeyedAccessStoreMode old_store_mode =
Code::GetKeyedAccessStoreMode(target()->extra_ic_state());
Handle<Map> previous_receiver_map = target_receiver_maps.at(0);
- if (ic_state == MONOMORPHIC && old_store_mode == STANDARD_STORE) {
+ if (ic_state == MONOMORPHIC) {
// If the "old" and "new" maps are in the same elements map family,
stay
// MONOMORPHIC and use the map for the most generic ElementsKind.
Handle<Map> transitioned_receiver_map = receiver_map;
@@ -1884,16 +1884,16 @@
store_mode = GetNonTransitioningStoreMode(store_mode);
return isolate()->stub_cache()->ComputeKeyedStoreElement(
transitioned_receiver_map, strict_mode, store_mode);
- } else if (*previous_receiver_map == receiver->map()) {
- if (IsGrowStoreMode(store_mode) ||
- store_mode == STORE_NO_TRANSITION_IGNORE_OUT_OF_BOUNDS ||
- store_mode == STORE_NO_TRANSITION_HANDLE_COW) {
- // A "normal" IC that handles stores can switch to a version that
can
- // grow at the end of the array, handle OOB accesses or copy COW
arrays
- // and still stay MONOMORPHIC.
- return isolate()->stub_cache()->ComputeKeyedStoreElement(
- receiver_map, strict_mode, store_mode);
- }
+ } else if (*previous_receiver_map == receiver->map() &&
+ old_store_mode == STANDARD_STORE &&
+ (IsGrowStoreMode(store_mode) ||
+ store_mode == STORE_NO_TRANSITION_IGNORE_OUT_OF_BOUNDS ||
+ store_mode == STORE_NO_TRANSITION_HANDLE_COW)) {
+ // A "normal" IC that handles stores can switch to a version that can
+ // grow at the end of the array, handle OOB accesses or copy COW
arrays
+ // and still stay MONOMORPHIC.
+ return isolate()->stub_cache()->ComputeKeyedStoreElement(
+ receiver_map, strict_mode, store_mode);
}
}
--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
---
You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.