Revision: 22857
Author: [email protected]
Date: Tue Aug 5 10:44:17 2014 UTC
Log: Restore performance of accesses to JSGlobalProxy after r22802
[email protected]
Review URL: https://codereview.chromium.org/446523002
http://code.google.com/p/v8/source/detail?r=22857
Modified:
/branches/bleeding_edge/src/arm/stub-cache-arm.cc
/branches/bleeding_edge/src/arm64/stub-cache-arm64.cc
/branches/bleeding_edge/src/ia32/stub-cache-ia32.cc
/branches/bleeding_edge/src/ic.cc
/branches/bleeding_edge/src/mips/stub-cache-mips.cc
/branches/bleeding_edge/src/mips64/stub-cache-mips64.cc
/branches/bleeding_edge/src/x64/stub-cache-x64.cc
/branches/bleeding_edge/src/x87/stub-cache-x87.cc
=======================================
--- /branches/bleeding_edge/src/arm/stub-cache-arm.cc Tue Aug 5 10:27:10
2014 UTC
+++ /branches/bleeding_edge/src/arm/stub-cache-arm.cc Tue Aug 5 10:44:17
2014 UTC
@@ -740,8 +740,8 @@
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));
@@ -768,6 +768,9 @@
// 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, scratch2, miss);
} else if (current_map->IsJSGlobalObjectMap()) {
=======================================
--- /branches/bleeding_edge/src/arm64/stub-cache-arm64.cc Tue Aug 5
10:27:10 2014 UTC
+++ /branches/bleeding_edge/src/arm64/stub-cache-arm64.cc Tue Aug 5
10:44:17 2014 UTC
@@ -691,8 +691,8 @@
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));
@@ -724,6 +724,9 @@
// 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()) {
UseScratchRegisterScope temps(masm());
__ CheckAccessGlobalProxy(reg, scratch2, temps.AcquireX(), miss);
=======================================
--- /branches/bleeding_edge/src/ia32/stub-cache-ia32.cc Tue Aug 5 10:27:10
2014 UTC
+++ /branches/bleeding_edge/src/ia32/stub-cache-ia32.cc Tue Aug 5 10:44:17
2014 UTC
@@ -708,8 +708,8 @@
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));
@@ -738,6 +738,9 @@
// 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()) {
=======================================
--- /branches/bleeding_edge/src/ic.cc Tue Aug 5 10:27:10 2014 UTC
+++ /branches/bleeding_edge/src/ic.cc Tue Aug 5 10:44:17 2014 UTC
@@ -211,6 +211,12 @@
break;
}
case LookupIterator::ACCESS_CHECK:
+ // PropertyHandlerCompiler::CheckPrototypes() knows how to emit
+ // access checks for global proxies.
+ if (it->GetHolder<JSObject>()->IsJSGlobalProxy() &&
+ it->HasAccess(v8::ACCESS_GET)) {
+ break;
+ }
return;
case LookupIterator::PROPERTY:
if (it->HasProperty()) return; // Yay!
=======================================
--- /branches/bleeding_edge/src/mips/stub-cache-mips.cc Tue Aug 5 10:27:10
2014 UTC
+++ /branches/bleeding_edge/src/mips/stub-cache-mips.cc Tue Aug 5 10:44:17
2014 UTC
@@ -739,8 +739,8 @@
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));
@@ -767,6 +767,9 @@
// 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, scratch2, miss);
} else if (current_map->IsJSGlobalObjectMap()) {
=======================================
--- /branches/bleeding_edge/src/mips64/stub-cache-mips64.cc Tue Aug 5
10:27:10 2014 UTC
+++ /branches/bleeding_edge/src/mips64/stub-cache-mips64.cc Tue Aug 5
10:44:17 2014 UTC
@@ -743,8 +743,8 @@
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));
@@ -777,6 +777,9 @@
// 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, scratch2, miss);
} else if (current_map->IsJSGlobalObjectMap()) {
=======================================
--- /branches/bleeding_edge/src/x64/stub-cache-x64.cc Tue Aug 5 10:27:10
2014 UTC
+++ /branches/bleeding_edge/src/x64/stub-cache-x64.cc Tue Aug 5 10:44:17
2014 UTC
@@ -651,8 +651,8 @@
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));
@@ -685,6 +685,9 @@
// 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, scratch2, miss);
} else if (current_map->IsJSGlobalObjectMap()) {
=======================================
--- /branches/bleeding_edge/src/x87/stub-cache-x87.cc Tue Aug 5 10:27:10
2014 UTC
+++ /branches/bleeding_edge/src/x87/stub-cache-x87.cc Tue Aug 5 10:44:17
2014 UTC
@@ -707,8 +707,8 @@
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));
@@ -737,6 +737,9 @@
// 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()) {
--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
---
You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.