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

Unified Diff: src/ic.cc

Issue 10545080: Optimize call sites that only ever have a single elements transition (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 8 years, 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | test/mjsunit/elements-kind.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/ic.cc
===================================================================
--- src/ic.cc (revision 11733)
+++ src/ic.cc (working copy)
@@ -1567,6 +1567,7 @@
}
bool monomorphic = false;
+ bool maybe_monomorphic = false;
MapHandleList target_receiver_maps;
if (ic_state != UNINITIALIZED && ic_state != PREMONOMORPHIC) {
GetReceiverMapsForStub(Handle<Code>(target()), &target_receiver_maps);
@@ -1588,6 +1589,10 @@
receiver->GetElementsKind());
}
}
+ } else {
+ if (ic_state == UNINITIALIZED || ic_state == PREMONOMORPHIC) {
+ maybe_monomorphic = true;
+ }
}
if (monomorphic) {
@@ -1600,6 +1605,7 @@
// adding the map that was just encountered.
Handle<Map> receiver_map(receiver->map());
bool map_added =
+ maybe_monomorphic ? false :
AddOneReceiverMapIfMissing(&target_receiver_maps, receiver_map);
if (IsTransitionStubKind(stub_kind)) {
Handle<Map> new_map = ComputeTransitionedMap(receiver, stub_kind);
« no previous file with comments | « no previous file | test/mjsunit/elements-kind.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698