| Index: src/mips64/builtins-mips64.cc
|
| diff --git a/src/mips64/builtins-mips64.cc b/src/mips64/builtins-mips64.cc
|
| index 584946ab9fdcc204021d33d49d8fea517494ef21..3a9980beabd405d60fba64d5deba848350f98d32 100644
|
| --- a/src/mips64/builtins-mips64.cc
|
| +++ b/src/mips64/builtins-mips64.cc
|
| @@ -1312,16 +1312,10 @@ static void CompatibleReceiverCheck(MacroAssembler* masm, Register receiver,
|
| &receiver_check_passed);
|
|
|
| // Walk the prototype chain.
|
| + __ ld(map, FieldMemOperand(receiver, HeapObject::kMapOffset));
|
| Label prototype_loop_start;
|
| __ bind(&prototype_loop_start);
|
|
|
| - // End if the receiver is null or if it's a hidden type.
|
| - __ JumpIfRoot(receiver, Heap::kNullValueRootIndex, receiver_check_failed);
|
| - __ ld(map, FieldMemOperand(receiver, HeapObject::kMapOffset));
|
| - __ lwu(scratch, FieldMemOperand(map, Map::kBitField3Offset));
|
| - __ DecodeField<Map::IsHiddenPrototype>(scratch);
|
| - __ Branch(receiver_check_failed, ne, scratch, Operand(zero_reg));
|
| -
|
| // Get the constructor, if any.
|
| __ GetMapConstructor(constructor, map, scratch, scratch);
|
| Label next_prototype;
|
| @@ -1350,9 +1344,16 @@ static void CompatibleReceiverCheck(MacroAssembler* masm, Register receiver,
|
| FieldMemOperand(type, FunctionTemplateInfo::kParentTemplateOffset));
|
| __ Branch(&function_template_loop);
|
|
|
| - // Load the next prototype and iterate.
|
| + // Load the next prototype.
|
| __ bind(&next_prototype);
|
| __ ld(receiver, FieldMemOperand(map, Map::kPrototypeOffset));
|
| + // End if the prototype is null or not hidden.
|
| + __ JumpIfRoot(receiver, Heap::kNullValueRootIndex, receiver_check_failed);
|
| + __ ld(map, FieldMemOperand(receiver, HeapObject::kMapOffset));
|
| + __ lwu(scratch, FieldMemOperand(map, Map::kBitField3Offset));
|
| + __ DecodeField<Map::IsHiddenPrototype>(scratch);
|
| + __ Branch(receiver_check_failed, eq, scratch, Operand(zero_reg));
|
| + // Iterate.
|
| __ Branch(&prototype_loop_start);
|
|
|
| __ bind(&receiver_check_passed);
|
|
|