Commit 58f753bf authored by verwaest's avatar verwaest Committed by Commit bot

Always mark contextual ICs as 'recompute'

Now that we track feedback per realm, this kind of IC is always guaranteed to be an update to the object structure.

BUG=

Review-Url: https://codereview.chromium.org/2040363003
Cr-Commit-Position: refs/heads/master@{#36819}
parent 7c3cad2d
......@@ -258,6 +258,10 @@ static void LookupForRead(LookupIterator* it) {
bool IC::ShouldRecomputeHandler(Handle<Object> receiver, Handle<String> name) {
if (!RecomputeHandlerForName(name)) return false;
// This is a contextual access, always just update the handler and stay
// monomorphic.
if (receiver->IsJSGlobalObject()) return true;
DCHECK(UseVector());
maybe_handler_ = nexus()->FindHandlerForMap(receiver_map());
......@@ -276,15 +280,6 @@ bool IC::ShouldRecomputeHandler(Handle<Object> receiver, Handle<String> name) {
receiver_map()->elements_kind());
}
if (receiver->IsJSGlobalObject()) {
Handle<JSGlobalObject> global = Handle<JSGlobalObject>::cast(receiver);
LookupIterator it(global, name, LookupIterator::OWN_SKIP_INTERCEPTOR);
if (it.state() == LookupIterator::ACCESS_CHECK) return false;
if (!it.IsFound()) return false;
if (!it.GetHolder<JSReceiver>()->IsJSGlobalObject()) return false;
return it.property_details().cell_type() == PropertyCellType::kConstant;
}
return true;
}
......
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