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}
This commit is contained in:
parent
7c3cad2d14
commit
58f753bf33
13
src/ic/ic.cc
13
src/ic/ic.cc
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user