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
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;
}