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/arm/lithium-codegen-arm.h" | 5 #include "src/crankshaft/arm/lithium-codegen-arm.h" |
6 | 6 |
7 #include "src/base/bits.h" | 7 #include "src/base/bits.h" |
8 #include "src/code-factory.h" | 8 #include "src/code-factory.h" |
9 #include "src/code-stubs.h" | 9 #include "src/code-stubs.h" |
10 #include "src/crankshaft/arm/lithium-gap-resolver-arm.h" | 10 #include "src/crankshaft/arm/lithium-gap-resolver-arm.h" |
(...skipping 2624 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2635 // will be ruled out below. | 2635 // will be ruled out below. |
2636 if (instr->hydrogen()->ObjectNeedsSmiCheck()) { | 2636 if (instr->hydrogen()->ObjectNeedsSmiCheck()) { |
2637 __ SmiTst(object); | 2637 __ SmiTst(object); |
2638 EmitFalseBranch(instr, eq); | 2638 EmitFalseBranch(instr, eq); |
2639 } | 2639 } |
2640 | 2640 |
2641 // Loop through the {object}s prototype chain looking for the {prototype}. | 2641 // Loop through the {object}s prototype chain looking for the {prototype}. |
2642 __ ldr(object_map, FieldMemOperand(object, HeapObject::kMapOffset)); | 2642 __ ldr(object_map, FieldMemOperand(object, HeapObject::kMapOffset)); |
2643 Label loop; | 2643 Label loop; |
2644 __ bind(&loop); | 2644 __ bind(&loop); |
| 2645 |
| 2646 // Deoptimize if the object needs to be access checked. |
| 2647 __ ldrb(object_instance_type, |
| 2648 FieldMemOperand(object_map, Map::kBitFieldOffset)); |
| 2649 __ tst(object_instance_type, Operand(1 << Map::kIsAccessCheckNeeded)); |
| 2650 DeoptimizeIf(ne, instr, Deoptimizer::kAccessCheck); |
| 2651 // Deoptimize for proxies. |
2645 __ CompareInstanceType(object_map, object_instance_type, JS_PROXY_TYPE); | 2652 __ CompareInstanceType(object_map, object_instance_type, JS_PROXY_TYPE); |
2646 DeoptimizeIf(eq, instr, Deoptimizer::kProxy); | 2653 DeoptimizeIf(eq, instr, Deoptimizer::kProxy); |
| 2654 |
2647 __ ldr(object_prototype, FieldMemOperand(object_map, Map::kPrototypeOffset)); | 2655 __ ldr(object_prototype, FieldMemOperand(object_map, Map::kPrototypeOffset)); |
2648 __ cmp(object_prototype, prototype); | 2656 __ cmp(object_prototype, prototype); |
2649 EmitTrueBranch(instr, eq); | 2657 EmitTrueBranch(instr, eq); |
2650 __ CompareRoot(object_prototype, Heap::kNullValueRootIndex); | 2658 __ CompareRoot(object_prototype, Heap::kNullValueRootIndex); |
2651 EmitFalseBranch(instr, eq); | 2659 EmitFalseBranch(instr, eq); |
2652 __ ldr(object_map, FieldMemOperand(object_prototype, HeapObject::kMapOffset)); | 2660 __ ldr(object_map, FieldMemOperand(object_prototype, HeapObject::kMapOffset)); |
2653 __ b(&loop); | 2661 __ b(&loop); |
2654 } | 2662 } |
2655 | 2663 |
2656 | 2664 |
(...skipping 2983 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5640 __ push(ToRegister(instr->function())); | 5648 __ push(ToRegister(instr->function())); |
5641 CallRuntime(Runtime::kPushBlockContext, 2, instr); | 5649 CallRuntime(Runtime::kPushBlockContext, 2, instr); |
5642 RecordSafepoint(Safepoint::kNoLazyDeopt); | 5650 RecordSafepoint(Safepoint::kNoLazyDeopt); |
5643 } | 5651 } |
5644 | 5652 |
5645 | 5653 |
5646 #undef __ | 5654 #undef __ |
5647 | 5655 |
5648 } // namespace internal | 5656 } // namespace internal |
5649 } // namespace v8 | 5657 } // namespace v8 |
OLD | NEW |