Index: src/ppc/builtins-ppc.cc |
diff --git a/src/ppc/builtins-ppc.cc b/src/ppc/builtins-ppc.cc |
index d6c58b6065a240e21bede3097e9397bb48df9f77..8cb905889ae07cfa2555f014f84a2e5def084d70 100644 |
--- a/src/ppc/builtins-ppc.cc |
+++ b/src/ppc/builtins-ppc.cc |
@@ -1309,17 +1309,10 @@ void CompatibleReceiverCheck(MacroAssembler* masm, Register receiver, |
&receiver_check_passed); |
// Walk the prototype chain. |
+ __ LoadP(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); |
- __ LoadP(map, FieldMemOperand(receiver, HeapObject::kMapOffset)); |
- __ LoadP(scratch, FieldMemOperand(map, Map::kBitField3Offset)); |
- __ DecodeField<Map::IsHiddenPrototype>(scratch, SetRC); |
- __ bne(receiver_check_failed, cr0); |
- |
- |
// Get the constructor, if any. |
__ GetMapConstructor(constructor, map, scratch, scratch); |
__ cmpi(scratch, Operand(JS_FUNCTION_TYPE)); |
@@ -1350,9 +1343,16 @@ void CompatibleReceiverCheck(MacroAssembler* masm, Register receiver, |
FieldMemOperand(type, FunctionTemplateInfo::kParentTemplateOffset)); |
__ b(&function_template_loop); |
- // Load the next prototype and iterate. |
+ // Load the next prototype. |
__ bind(&next_prototype); |
__ LoadP(receiver, FieldMemOperand(map, Map::kPrototypeOffset)); |
+ // End if the prototype is null or not hidden. |
+ __ JumpIfRoot(receiver, Heap::kNullValueRootIndex, receiver_check_failed); |
+ __ LoadP(map, FieldMemOperand(receiver, HeapObject::kMapOffset)); |
+ __ LoadP(scratch, FieldMemOperand(map, Map::kBitField3Offset)); |
+ __ DecodeField<Map::IsHiddenPrototype>(scratch, SetRC); |
+ __ beq(receiver_check_failed, cr0); |
+ // Iterate. |
__ b(&prototype_loop_start); |
__ bind(&receiver_check_passed); |