Reviewers: Jakob,
Message:
PTAL
Description:
Skip the mapcheck on the global object since the global proxy and cell are
already checked (or the global object map for contextual global loads).
BUG=
Please review this at https://codereview.chromium.org/961693002/
Base URL: https://chromium.googlesource.com/v8/v8.git@master
Affected files (+11, -4 lines):
M src/ic/arm/handler-compiler-arm.cc
M src/ic/arm64/handler-compiler-arm64.cc
M src/ic/ia32/handler-compiler-ia32.cc
M src/ic/x64/handler-compiler-x64.cc
Index: src/ic/arm/handler-compiler-arm.cc
diff --git a/src/ic/arm/handler-compiler-arm.cc
b/src/ic/arm/handler-compiler-arm.cc
index
a4c06079051c48cf63f453657d5f34e7f6131a45..ef79a49bacb2328f2fc96234ead5ff9c00810211
100644
--- a/src/ic/arm/handler-compiler-arm.cc
+++ b/src/ic/arm/handler-compiler-arm.cc
@@ -473,7 +473,9 @@ Register PropertyHandlerCompiler::CheckPrototypes(
} else {
Register map_reg = scratch1;
__ ldr(map_reg, FieldMemOperand(reg, HeapObject::kMapOffset));
- if (depth != 1 || check == CHECK_ALL_MAPS) {
+
+ if (!current_map->IsJSGlobalObjectMap() &&
+ (depth != 1 || check == CHECK_ALL_MAPS)) {
Handle<WeakCell> cell = Map::WeakCellForMap(current_map);
__ CmpWeakValue(map_reg, cell, scratch2);
__ b(ne, miss);
Index: src/ic/arm64/handler-compiler-arm64.cc
diff --git a/src/ic/arm64/handler-compiler-arm64.cc
b/src/ic/arm64/handler-compiler-arm64.cc
index
53519179f269d54e7d307bbc9ce2189d4320931c..9477d194a240fdeb19ca4bd52701a47f91c70a7e
100644
--- a/src/ic/arm64/handler-compiler-arm64.cc
+++ b/src/ic/arm64/handler-compiler-arm64.cc
@@ -523,7 +523,8 @@ Register PropertyHandlerCompiler::CheckPrototypes(
Register map_reg = scratch1;
__ Ldr(map_reg, FieldMemOperand(reg, HeapObject::kMapOffset));
- if (depth != 1 || check == CHECK_ALL_MAPS) {
+ if (!current_map->IsJSGlobalObjectMap() &&
+ (depth != 1 || check == CHECK_ALL_MAPS)) {
Handle<WeakCell> cell = Map::WeakCellForMap(current_map);
__ CmpWeakValue(map_reg, cell, scratch2);
__ B(ne, miss);
Index: src/ic/ia32/handler-compiler-ia32.cc
diff --git a/src/ic/ia32/handler-compiler-ia32.cc
b/src/ic/ia32/handler-compiler-ia32.cc
index
7bb426c61e559d847f11707a6d5439a04f04193c..3985ded0e6c78b81d1299a3485ad8d90a79b3502
100644
--- a/src/ic/ia32/handler-compiler-ia32.cc
+++ b/src/ic/ia32/handler-compiler-ia32.cc
@@ -476,7 +476,8 @@ Register PropertyHandlerCompiler::CheckPrototypes(
} else {
Register map_reg = scratch1;
__ mov(map_reg, FieldOperand(reg, HeapObject::kMapOffset));
- if (depth != 1 || check == CHECK_ALL_MAPS) {
+ if (!current_map->IsJSGlobalObjectMap() &&
+ (depth != 1 || check == CHECK_ALL_MAPS)) {
Handle<WeakCell> cell = Map::WeakCellForMap(current_map);
__ CmpWeakValue(map_reg, cell, scratch2);
__ j(not_equal, miss);
@@ -495,6 +496,8 @@ Register PropertyHandlerCompiler::CheckPrototypes(
current_map = handle(current->map());
}
+ DCHECK(!current_map->IsJSGlobalProxyMap());
+
// Log the check depth.
LOG(isolate(), IntEvent("check-maps-depth", depth + 1));
Index: src/ic/x64/handler-compiler-x64.cc
diff --git a/src/ic/x64/handler-compiler-x64.cc
b/src/ic/x64/handler-compiler-x64.cc
index
4b066f2d4291e2d2f3f48104c55c515add11ff77..64839e18a8707da50f28bb97df1ab5f586c7a8b3
100644
--- a/src/ic/x64/handler-compiler-x64.cc
+++ b/src/ic/x64/handler-compiler-x64.cc
@@ -477,7 +477,8 @@ Register PropertyHandlerCompiler::CheckPrototypes(
Register map_reg = scratch1;
__ movp(map_reg, FieldOperand(reg, HeapObject::kMapOffset));
- if (depth != 1 || check == CHECK_ALL_MAPS) {
+ if (!current_map->IsJSGlobalObjectMap() &&
+ (depth != 1 || check == CHECK_ALL_MAPS)) {
Handle<WeakCell> cell = Map::WeakCellForMap(current_map);
__ CmpWeakValue(map_reg, cell, scratch2);
__ j(not_equal, miss);
--
--
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.