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 6af7ca6be4
BUG=
Review URL: https://codereview.chromium.org/957393002
Cr-Commit-Position: refs/heads/master@{#26909}
This commit is contained in:
parent
235bf89c87
commit
b9eb8f1fb8
@ -463,15 +463,14 @@ 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));
|
||||
}
|
||||
|
||||
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.
|
||||
@ -484,6 +483,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));
|
||||
|
||||
|
@ -464,15 +464,14 @@ 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));
|
||||
}
|
||||
|
||||
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.
|
||||
@ -485,6 +484,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));
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user