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)); |