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

Unified Diff: src/ic/ic.cc

Issue 2446983002: [ic] Support negative lookup on receiver in data handlers. (Closed)
Patch Set: Addressing comments Created 4 years, 2 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 | « src/ic/handler-configuration-inl.h ('k') | 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 a4ccc489aad30e1c1678771a56aed9cc610d31d7..502d9e2056b92e4582c47a80291b762c7aaea782 100644
--- a/src/ic/ic.cc
+++ b/src/ic/ic.cc
@@ -852,8 +852,7 @@ bool LoadIC::IsPrototypeValidityCellCheckEnough(Handle<Map> receiver_map,
// The following kinds of receiver maps require custom handler compilation.
if (receiver_map->IsPrimitiveMap() || receiver_map->IsJSGlobalProxyMap() ||
- receiver_map->IsJSGlobalObjectMap() ||
- receiver_map->is_dictionary_map()) {
+ receiver_map->IsJSGlobalObjectMap()) {
return false;
}
@@ -863,12 +862,12 @@ bool LoadIC::IsPrototypeValidityCellCheckEnough(Handle<Map> receiver_map,
JSObject* current = iter.GetCurrent<JSObject>();
if (current == *holder) break;
Map* current_map = current->map();
- if (current_map->IsJSGlobalObjectMap() ||
- current_map->IsJSGlobalProxyMap() || current_map->is_dictionary_map()) {
+ if (current_map->IsJSGlobalObjectMap()) {
+ return false;
+ } else if (current_map->is_dictionary_map()) {
+ DCHECK(!current_map->IsJSGlobalProxyMap()); // Proxy maps are fast.
return false;
}
- // Only objects that do not require access checks are allowed in stubs.
- DCHECK(!current_map->is_access_check_needed());
}
return true;
}
@@ -878,6 +877,14 @@ Handle<Object> LoadIC::SimpleLoadFromPrototype(Handle<Map> receiver_map,
Handle<Object> smi_handler) {
DCHECK(IsPrototypeValidityCellCheckEnough(receiver_map, holder));
+ if (receiver_map->IsJSGlobalProxyMap() ||
+ receiver_map->IsJSGlobalObjectMap()) {
+ UNREACHABLE();
+ } else if (receiver_map->is_dictionary_map()) {
+ smi_handler =
+ LoadHandler::EnableNegativeLookupOnReceiver(isolate(), smi_handler);
+ }
+
Handle<Cell> validity_cell =
Map::GetOrCreatePrototypeChainValidityCell(receiver_map, isolate());
DCHECK(!validity_cell.is_null());
« no previous file with comments | « src/ic/handler-configuration-inl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698