Commit ec5a24dd authored by ager@chromium.org's avatar ager@chromium.org

Keep the inline caches for the builtins object monomorphic when

libraries are loaded lazily.

Review URL: http://codereview.chromium.org/2885

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@313 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent 3f67d5b9
......@@ -160,6 +160,19 @@ IC::State IC::StateFrom(Code* target, Object* receiver) {
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;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment