Reviewers: Toon Verwaest,
Description:
Let KeyedStoreIC go megamorphic (instead of generic) when the same map
misses
twice
BUG=v8:3826
LOG=n
[email protected]
Please review this at https://codereview.chromium.org/859943003/
Base URL: https://chromium.googlesource.com/v8/v8.git@master
Affected files (+6, -2 lines):
M src/ic/ic.cc
Index: src/ic/ic.cc
diff --git a/src/ic/ic.cc b/src/ic/ic.cc
index
c729dfd17983a7119d3d037a39ca111b13a4c8bc..0324d992144247bba016d8eb01e4cb0faeb85a81
100644
--- a/src/ic/ic.cc
+++ b/src/ic/ic.cc
@@ -1865,9 +1865,13 @@ Handle<Code>
KeyedStoreIC::StoreElementStub(Handle<JSObject> receiver,
if (!map_added) {
// If the miss wasn't due to an unseen map, a polymorphic stub
- // won't help, use the generic stub.
+ // won't help. In theory we should use the generic stub, but in
+ // practice there are a number of hard-to-avoid reasons why this
+ // can happen occasionally, and where the additional logic in the
+ // megamorphic stub is beneficial because it can handle most cases
+ // without calling into the runtime.
TRACE_GENERIC_IC(isolate(), "KeyedStoreIC", "same map added twice");
- return generic_stub();
+ return megamorphic_stub();
}
// If the maximum number of receiver maps has been exceeded, use the
--
--
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/d/optout.