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

Unified Diff: src/ic.cc

Issue 2885: Keep the inline caches for the builtins object monomorphic when... (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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/ic.cc
===================================================================
--- src/ic.cc (revision 293)
+++ src/ic.cc (working copy)
@@ -167,6 +167,19 @@
return MONOMORPHIC_PROTOTYPE_FAILURE;
}
+
+ // The builtins object is special. It only changes when javascript
+ // builtins are loaded lazily. It is important to keep inline
+ // caches for the builtins object monomorphic. Therefore, if we get
+ // an inline cache miss for the builtins object after lazily loading
+ // javascript builtins, we clear the code cache and return
+ // uninitialized as the state to force the inline cache back to
+ // monomorphic state.
+ if (receiver->IsJSBuiltinsObject()) {
+ map->ClearCodeCache();
+ return UNINITIALIZED;
+ }
+
return MONOMORPHIC;
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698