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 #if V8_TARGET_ARCH_IA32 | 5 #if V8_TARGET_ARCH_IA32 |
6 | 6 |
7 #include "src/crankshaft/ia32/lithium-codegen-ia32.h" | 7 #include "src/crankshaft/ia32/lithium-codegen-ia32.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 2579 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2590 // will be ruled out below. | 2590 // will be ruled out below. |
2591 if (instr->hydrogen()->ObjectNeedsSmiCheck()) { | 2591 if (instr->hydrogen()->ObjectNeedsSmiCheck()) { |
2592 __ test(object, Immediate(kSmiTagMask)); | 2592 __ test(object, Immediate(kSmiTagMask)); |
2593 EmitFalseBranch(instr, zero); | 2593 EmitFalseBranch(instr, zero); |
2594 } | 2594 } |
2595 | 2595 |
2596 // Loop through the {object}s prototype chain looking for the {prototype}. | 2596 // Loop through the {object}s prototype chain looking for the {prototype}. |
2597 __ mov(object_map, FieldOperand(object, HeapObject::kMapOffset)); | 2597 __ mov(object_map, FieldOperand(object, HeapObject::kMapOffset)); |
2598 Label loop; | 2598 Label loop; |
2599 __ bind(&loop); | 2599 __ bind(&loop); |
| 2600 __ CmpInstanceType(object_map, JS_PROXY_TYPE); |
| 2601 DeoptimizeIf(equal, instr, Deoptimizer::kProxy); |
2600 __ mov(object_prototype, FieldOperand(object_map, Map::kPrototypeOffset)); | 2602 __ mov(object_prototype, FieldOperand(object_map, Map::kPrototypeOffset)); |
2601 __ cmp(object_prototype, prototype); | 2603 __ cmp(object_prototype, prototype); |
2602 EmitTrueBranch(instr, equal); | 2604 EmitTrueBranch(instr, equal); |
2603 __ cmp(object_prototype, factory()->null_value()); | 2605 __ cmp(object_prototype, factory()->null_value()); |
2604 EmitFalseBranch(instr, equal); | 2606 EmitFalseBranch(instr, equal); |
2605 __ mov(object_map, FieldOperand(object_prototype, HeapObject::kMapOffset)); | 2607 __ mov(object_map, FieldOperand(object_prototype, HeapObject::kMapOffset)); |
2606 __ jmp(&loop); | 2608 __ jmp(&loop); |
2607 } | 2609 } |
2608 | 2610 |
2609 | 2611 |
(...skipping 2952 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5562 RecordSafepoint(Safepoint::kNoLazyDeopt); | 5564 RecordSafepoint(Safepoint::kNoLazyDeopt); |
5563 } | 5565 } |
5564 | 5566 |
5565 | 5567 |
5566 #undef __ | 5568 #undef __ |
5567 | 5569 |
5568 } // namespace internal | 5570 } // namespace internal |
5569 } // namespace v8 | 5571 } // namespace v8 |
5570 | 5572 |
5571 #endif // V8_TARGET_ARCH_IA32 | 5573 #endif // V8_TARGET_ARCH_IA32 |
OLD | NEW |