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

Unified Diff: src/ic.cc

Issue 2889: Only remove the code object that caused the monomorphic prototype... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 12 years, 3 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 | src/objects.h » ('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 313)
+++ src/ic.cc (working copy)
@@ -143,7 +143,8 @@
// the receiver map's code cache. Therefore, if the current target
// is in the receiver map's code cache, the inline cache failed due
// to prototype check failure.
- if (map->IncludedInCodeCache(target)) {
+ int index = map->IndexInCodeCache(target);
+ if (index >= 0) {
// For keyed load/store, the most likely cause of cache failure is
// that the key has changed. We do not distinguish between
// prototype and non-prototype failures for keyed access.
@@ -152,11 +153,9 @@
return MONOMORPHIC;
}
- // Clear the code cache for this map to avoid hitting the same
- // invalid stub again. It seems likely that most of the code in
- // the cache is invalid if one of the stubs is so we flush the
- // entire code cache.
- map->ClearCodeCache();
+ // Remove the target from the code cache to avoid hitting the same
+ // invalid stub again.
+ map->RemoveFromCodeCache(index);
return MONOMORPHIC_PROTOTYPE_FAILURE;
}
« no previous file with comments | « no previous file | src/objects.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698