Reviewers: danno, Toon Verwaest, paul.l..., gergely.kis.imgtec,
akos.palfi.imgtec, dusmil.imgtec,
Description:
MIPS: 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).
Port 6af7ca6be4cd768b3326f0b8c32d4fbc3baa20c8
BUG=
Please review this at https://codereview.chromium.org/957393002/
Base URL: https://chromium.googlesource.com/v8/v8.git@master
Affected files (+12, -10 lines):
M src/ic/mips/handler-compiler-mips.cc
M src/ic/mips64/handler-compiler-mips64.cc
Index: src/ic/mips/handler-compiler-mips.cc
diff --git a/src/ic/mips/handler-compiler-mips.cc
b/src/ic/mips/handler-compiler-mips.cc
index
93106ea0e15c8f0d6ac3f069c89938bed190d752..1f451e1bce3ce3ef50fb62294e3a78d3b6518ddb
100644
--- a/src/ic/mips/handler-compiler-mips.cc
+++ b/src/ic/mips/handler-compiler-mips.cc
@@ -452,11 +452,6 @@ Register PropertyHandlerCompiler::CheckPrototypes(
} else {
Register map_reg = scratch1;
__ lw(map_reg, FieldMemOperand(reg, HeapObject::kMapOffset));
- if (depth != 1 || check == CHECK_ALL_MAPS) {
- Handle<WeakCell> cell = Map::WeakCellForMap(current_map);
- __ GetWeakValue(scratch2, cell);
- __ Branch(miss, ne, scratch2, Operand(map_reg));
- }
// 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
@@ -469,6 +464,10 @@ Register PropertyHandlerCompiler::CheckPrototypes(
} else if (current_map->IsJSGlobalObjectMap()) {
GenerateCheckPropertyCell(masm(),
Handle<JSGlobalObject>::cast(current),
name, scratch2, miss);
+ } else if (depth != 1 || check == CHECK_ALL_MAPS) {
+ Handle<WeakCell> cell = Map::WeakCellForMap(current_map);
+ __ GetWeakValue(scratch2, cell);
+ __ Branch(miss, ne, scratch2, Operand(map_reg));
}
reg = holder_reg; // From now on the object will be in holder_reg.
@@ -481,6 +480,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/mips64/handler-compiler-mips64.cc
diff --git a/src/ic/mips64/handler-compiler-mips64.cc
b/src/ic/mips64/handler-compiler-mips64.cc
index
a68a418fa2795ddee817c301d1c15e3bcfbd7c88..1fa6e5bc4e7b9fea1276787e27f9d4f27a5cb3d7
100644
--- a/src/ic/mips64/handler-compiler-mips64.cc
+++ b/src/ic/mips64/handler-compiler-mips64.cc
@@ -453,11 +453,6 @@ Register PropertyHandlerCompiler::CheckPrototypes(
} else {
Register map_reg = scratch1;
__ ld(map_reg, FieldMemOperand(reg, HeapObject::kMapOffset));
- if (depth != 1 || check == CHECK_ALL_MAPS) {
- Handle<WeakCell> cell = Map::WeakCellForMap(current_map);
- __ GetWeakValue(scratch2, cell);
- __ Branch(miss, ne, scratch2, Operand(map_reg));
- }
// 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
@@ -470,6 +465,10 @@ Register PropertyHandlerCompiler::CheckPrototypes(
} else if (current_map->IsJSGlobalObjectMap()) {
GenerateCheckPropertyCell(masm(),
Handle<JSGlobalObject>::cast(current),
name, scratch2, miss);
+ } else if (depth != 1 || check == CHECK_ALL_MAPS) {
+ Handle<WeakCell> cell = Map::WeakCellForMap(current_map);
+ __ GetWeakValue(scratch2, cell);
+ __ Branch(miss, ne, scratch2, Operand(map_reg));
}
reg = holder_reg; // From now on the object will be in holder_reg.
@@ -482,6 +481,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));
--
--
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.