| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "src/crankshaft/mips64/lithium-codegen-mips64.h" | 5 #include "src/crankshaft/mips64/lithium-codegen-mips64.h" |
| 6 | 6 |
| 7 #include "src/code-factory.h" | 7 #include "src/code-factory.h" |
| 8 #include "src/code-stubs.h" | 8 #include "src/code-stubs.h" |
| 9 #include "src/crankshaft/hydrogen-osr.h" | 9 #include "src/crankshaft/hydrogen-osr.h" |
| 10 #include "src/crankshaft/mips64/lithium-gap-resolver-mips64.h" | 10 #include "src/crankshaft/mips64/lithium-gap-resolver-mips64.h" |
| (...skipping 2656 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2667 // will be ruled out below. | 2667 // will be ruled out below. |
| 2668 if (instr->hydrogen()->ObjectNeedsSmiCheck()) { | 2668 if (instr->hydrogen()->ObjectNeedsSmiCheck()) { |
| 2669 __ SmiTst(object, at); | 2669 __ SmiTst(object, at); |
| 2670 EmitFalseBranch(instr, eq, at, Operand(zero_reg)); | 2670 EmitFalseBranch(instr, eq, at, Operand(zero_reg)); |
| 2671 } | 2671 } |
| 2672 | 2672 |
| 2673 // Loop through the {object}s prototype chain looking for the {prototype}. | 2673 // Loop through the {object}s prototype chain looking for the {prototype}. |
| 2674 __ ld(object_map, FieldMemOperand(object, HeapObject::kMapOffset)); | 2674 __ ld(object_map, FieldMemOperand(object, HeapObject::kMapOffset)); |
| 2675 Label loop; | 2675 Label loop; |
| 2676 __ bind(&loop); | 2676 __ bind(&loop); |
| 2677 |
| 2678 // Deoptimize if the object needs to be access checked. |
| 2679 __ lbu(object_instance_type, |
| 2680 FieldMemOperand(object_map, Map::kBitFieldOffset)); |
| 2681 __ And(object_instance_type, object_instance_type, |
| 2682 Operand(1 << Map::kIsAccessCheckNeeded)); |
| 2683 DeoptimizeIf(ne, instr, Deoptimizer::kAccessCheck, object_instance_type, |
| 2684 Operand(zero_reg)); |
| 2677 __ lbu(object_instance_type, | 2685 __ lbu(object_instance_type, |
| 2678 FieldMemOperand(object_map, Map::kInstanceTypeOffset)); | 2686 FieldMemOperand(object_map, Map::kInstanceTypeOffset)); |
| 2679 DeoptimizeIf(eq, instr, Deoptimizer::kProxy, object_instance_type, | 2687 DeoptimizeIf(eq, instr, Deoptimizer::kProxy, object_instance_type, |
| 2680 Operand(JS_PROXY_TYPE)); | 2688 Operand(JS_PROXY_TYPE)); |
| 2689 |
| 2681 __ ld(object_prototype, FieldMemOperand(object_map, Map::kPrototypeOffset)); | 2690 __ ld(object_prototype, FieldMemOperand(object_map, Map::kPrototypeOffset)); |
| 2682 EmitTrueBranch(instr, eq, object_prototype, Operand(prototype)); | 2691 EmitTrueBranch(instr, eq, object_prototype, Operand(prototype)); |
| 2683 __ LoadRoot(at, Heap::kNullValueRootIndex); | 2692 __ LoadRoot(at, Heap::kNullValueRootIndex); |
| 2684 EmitFalseBranch(instr, eq, object_prototype, Operand(at)); | 2693 EmitFalseBranch(instr, eq, object_prototype, Operand(at)); |
| 2685 __ Branch(&loop, USE_DELAY_SLOT); | 2694 __ Branch(&loop, USE_DELAY_SLOT); |
| 2686 __ ld(object_map, FieldMemOperand(object_prototype, | 2695 __ ld(object_map, FieldMemOperand(object_prototype, |
| 2687 HeapObject::kMapOffset)); // In delay slot. | 2696 HeapObject::kMapOffset)); // In delay slot. |
| 2688 } | 2697 } |
| 2689 | 2698 |
| 2690 | 2699 |
| (...skipping 3179 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5870 __ Push(at, ToRegister(instr->function())); | 5879 __ Push(at, ToRegister(instr->function())); |
| 5871 CallRuntime(Runtime::kPushBlockContext, 2, instr); | 5880 CallRuntime(Runtime::kPushBlockContext, 2, instr); |
| 5872 RecordSafepoint(Safepoint::kNoLazyDeopt); | 5881 RecordSafepoint(Safepoint::kNoLazyDeopt); |
| 5873 } | 5882 } |
| 5874 | 5883 |
| 5875 | 5884 |
| 5876 #undef __ | 5885 #undef __ |
| 5877 | 5886 |
| 5878 } // namespace internal | 5887 } // namespace internal |
| 5879 } // namespace v8 | 5888 } // namespace v8 |
| OLD | NEW |