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

Unified Diff: src/ic/ic.cc

Issue 1894203002: Fix polymorphic keyed load handler selection for proxies. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 8 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 | test/mjsunit/regress/regress-crbug-603463.js » ('j') | 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 2d2307a1b08972080d258d5ba87d70b1bdd6f8e3..63d032c566bf2027b5bf0470aff19cc810907f48 100644
--- a/src/ic/ic.cc
+++ b/src/ic/ic.cc
@@ -1148,7 +1148,8 @@ static Handle<Object> TryConvertKey(Handle<Object> key, Isolate* isolate) {
void KeyedLoadIC::UpdateLoadElement(Handle<HeapObject> receiver) {
Handle<Map> receiver_map(receiver->map(), isolate());
- DCHECK(receiver_map->instance_type() != JS_VALUE_TYPE); // Checked by caller.
+ DCHECK(receiver_map->instance_type() != JS_VALUE_TYPE &&
+ receiver_map->instance_type() != JS_PROXY_TYPE); // Checked by caller.
MapHandleList target_receiver_maps;
TargetMaps(&target_receiver_maps);
@@ -1160,11 +1161,16 @@ void KeyedLoadIC::UpdateLoadElement(Handle<HeapObject> receiver) {
}
for (int i = 0; i < target_receiver_maps.length(); i++) {
- if (!target_receiver_maps.at(i).is_null() &&
- target_receiver_maps.at(i)->instance_type() == JS_VALUE_TYPE) {
+ Handle<Map> map = target_receiver_maps.at(i);
+ if (map.is_null()) continue;
+ if (map->instance_type() == JS_VALUE_TYPE) {
TRACE_GENERIC_IC(isolate(), "KeyedLoadIC", "JSValue");
return;
}
+ if (map->instance_type() == JS_PROXY_TYPE) {
+ TRACE_GENERIC_IC(isolate(), "KeyedLoadIC", "JSProxy");
+ return;
+ }
}
// The first time a receiver is seen that is a transitioned version of the
« no previous file with comments | « no previous file | test/mjsunit/regress/regress-crbug-603463.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698