diff --git a/src/ic/mips/handler-compiler-mips.cc b/src/ic/mips/handler-compiler-mips.cc index 4f22c19581..73709557ea 100644 --- a/src/ic/mips/handler-compiler-mips.cc +++ b/src/ic/mips/handler-compiler-mips.cc @@ -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 cell = Map::WeakCellForMap(current_map); - __ GetWeakValue(scratch2, cell); - __ Branch(miss, ne, scratch2, Operand(map_reg)); - } if (current_map->IsJSGlobalObjectMap()) { GenerateCheckPropertyCell(masm(), Handle::cast(current), name, scratch2, miss); + } else if (depth != 1 || check == CHECK_ALL_MAPS) { + Handle 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)); diff --git a/src/ic/mips64/handler-compiler-mips64.cc b/src/ic/mips64/handler-compiler-mips64.cc index 52204dd563..4d4dfc79f0 100644 --- a/src/ic/mips64/handler-compiler-mips64.cc +++ b/src/ic/mips64/handler-compiler-mips64.cc @@ -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 cell = Map::WeakCellForMap(current_map); - __ GetWeakValue(scratch2, cell); - __ Branch(miss, ne, scratch2, Operand(map_reg)); - } if (current_map->IsJSGlobalObjectMap()) { GenerateCheckPropertyCell(masm(), Handle::cast(current), name, scratch2, miss); + } else if (depth != 1 || check == CHECK_ALL_MAPS) { + Handle 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));