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

Unified Diff: src/ic/ic.cc

Issue 2040363003: Always mark contextual ICs as 'recompute' (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 6 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/ic.cc
diff --git a/src/ic/ic.cc b/src/ic/ic.cc
index 8036a6ede1d6618e07235f0e2dcb2ea6ba491971..d0866304e08326dbd6a4a26bddc2084086ebcc66 100644
--- a/src/ic/ic.cc
+++ b/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;
}
« 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