Index: src/x87/builtins-x87.cc |
diff --git a/src/x87/builtins-x87.cc b/src/x87/builtins-x87.cc |
index a710dd3646be7cbee0a4e62e8adbff2bf83912c7..917d09d0b77f936b5a5c73631d9bb655b8bb00f5 100644 |
--- a/src/x87/builtins-x87.cc |
+++ b/src/x87/builtins-x87.cc |
@@ -2689,14 +2689,12 @@ static void CompatibleReceiverCheck(MacroAssembler* masm, Register receiver, |
// Load the next prototype. |
__ bind(&next_prototype); |
__ mov(receiver, FieldOperand(receiver, HeapObject::kMapOffset)); |
+ __ test(FieldOperand(receiver, Map::kBitField3Offset), |
+ Immediate(Map::HasHiddenPrototype::kMask)); |
+ __ j(zero, receiver_check_failed); |
+ |
__ mov(receiver, FieldOperand(receiver, Map::kPrototypeOffset)); |
- // End if the prototype is null or not hidden. |
- __ CompareRoot(receiver, Heap::kNullValueRootIndex); |
- __ j(equal, receiver_check_failed); |
__ mov(scratch0, FieldOperand(receiver, HeapObject::kMapOffset)); |
- __ test(FieldOperand(scratch0, Map::kBitField3Offset), |
- Immediate(Map::IsHiddenPrototype::kMask)); |
- __ j(zero, receiver_check_failed); |
// Iterate. |
__ jmp(&prototype_loop_start, Label::kNear); |