| OLD | NEW |
| 1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 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 #if V8_TARGET_ARCH_X64 | 5 #if V8_TARGET_ARCH_X64 |
| 6 | 6 |
| 7 #include "src/crankshaft/x64/lithium-codegen-x64.h" | 7 #include "src/crankshaft/x64/lithium-codegen-x64.h" |
| 8 | 8 |
| 9 #include "src/base/bits.h" | 9 #include "src/base/bits.h" |
| 10 #include "src/code-factory.h" | 10 #include "src/code-factory.h" |
| (...skipping 2638 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2649 // will be ruled out below. | 2649 // will be ruled out below. |
| 2650 if (instr->hydrogen()->ObjectNeedsSmiCheck()) { | 2650 if (instr->hydrogen()->ObjectNeedsSmiCheck()) { |
| 2651 Condition is_smi = __ CheckSmi(object); | 2651 Condition is_smi = __ CheckSmi(object); |
| 2652 EmitFalseBranch(instr, is_smi); | 2652 EmitFalseBranch(instr, is_smi); |
| 2653 } | 2653 } |
| 2654 | 2654 |
| 2655 // Loop through the {object}s prototype chain looking for the {prototype}. | 2655 // Loop through the {object}s prototype chain looking for the {prototype}. |
| 2656 __ movp(object_map, FieldOperand(object, HeapObject::kMapOffset)); | 2656 __ movp(object_map, FieldOperand(object, HeapObject::kMapOffset)); |
| 2657 Label loop; | 2657 Label loop; |
| 2658 __ bind(&loop); | 2658 __ bind(&loop); |
| 2659 __ CmpInstanceType(object_map, JS_PROXY_TYPE); |
| 2660 DeoptimizeIf(equal, instr, Deoptimizer::kProxy); |
| 2659 __ movp(object_prototype, FieldOperand(object_map, Map::kPrototypeOffset)); | 2661 __ movp(object_prototype, FieldOperand(object_map, Map::kPrototypeOffset)); |
| 2660 __ cmpp(object_prototype, prototype); | 2662 __ cmpp(object_prototype, prototype); |
| 2661 EmitTrueBranch(instr, equal); | 2663 EmitTrueBranch(instr, equal); |
| 2662 __ CompareRoot(object_prototype, Heap::kNullValueRootIndex); | 2664 __ CompareRoot(object_prototype, Heap::kNullValueRootIndex); |
| 2663 EmitFalseBranch(instr, equal); | 2665 EmitFalseBranch(instr, equal); |
| 2664 __ movp(object_map, FieldOperand(object_prototype, HeapObject::kMapOffset)); | 2666 __ movp(object_map, FieldOperand(object_prototype, HeapObject::kMapOffset)); |
| 2665 __ jmp(&loop); | 2667 __ jmp(&loop); |
| 2666 } | 2668 } |
| 2667 | 2669 |
| 2668 | 2670 |
| (...skipping 3093 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5762 RecordSafepoint(Safepoint::kNoLazyDeopt); | 5764 RecordSafepoint(Safepoint::kNoLazyDeopt); |
| 5763 } | 5765 } |
| 5764 | 5766 |
| 5765 | 5767 |
| 5766 #undef __ | 5768 #undef __ |
| 5767 | 5769 |
| 5768 } // namespace internal | 5770 } // namespace internal |
| 5769 } // namespace v8 | 5771 } // namespace v8 |
| 5770 | 5772 |
| 5771 #endif // V8_TARGET_ARCH_X64 | 5773 #endif // V8_TARGET_ARCH_X64 |
| OLD | NEW |