Index: src/x87/stub-cache-x87.cc |
diff --git a/src/x87/stub-cache-x87.cc b/src/x87/stub-cache-x87.cc |
index 0574cb03a42f9fb24e3081e7a85ca3e55b782611..0d67c545c007ff349a483729f96ef85896c9836d 100644 |
--- a/src/x87/stub-cache-x87.cc |
+++ b/src/x87/stub-cache-x87.cc |
@@ -710,8 +710,8 @@ Register PropertyHandlerCompiler::CheckPrototypes( |
prototype = handle(JSObject::cast(current_map->prototype())); |
if (current_map->is_dictionary_map() && |
- !current_map->IsJSGlobalObjectMap() && |
- !current_map->IsJSGlobalProxyMap()) { |
+ !current_map->IsJSGlobalObjectMap()) { |
+ DCHECK(!current_map->IsJSGlobalProxyMap()); // Proxy maps are fast. |
if (!name->IsUniqueName()) { |
DCHECK(name->IsString()); |
name = factory()->InternalizeString(Handle<String>::cast(name)); |
@@ -740,6 +740,9 @@ Register PropertyHandlerCompiler::CheckPrototypes( |
// Check access rights to the global object. This has to happen after |
// the map check so that we know that the object is actually a global |
// object. |
+ // This allows us to install generated handlers for accesses to the |
+ // global proxy (as opposed to using slow ICs). See corresponding code |
+ // in LookupForRead(). |
if (current_map->IsJSGlobalProxyMap()) { |
__ CheckAccessGlobalProxy(reg, scratch1, scratch2, miss); |
} else if (current_map->IsJSGlobalObjectMap()) { |