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 <limits.h> // For LONG_MIN, LONG_MAX. | 5 #include <limits.h> // For LONG_MIN, LONG_MAX. |
6 | 6 |
7 #if V8_TARGET_ARCH_ARM | 7 #if V8_TARGET_ARCH_ARM |
8 | 8 |
9 #include "src/base/bits.h" | 9 #include "src/base/bits.h" |
10 #include "src/base/division-by-constant.h" | 10 #include "src/base/division-by-constant.h" |
(...skipping 2797 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2808 tst(object, Operand(kSmiTagMask)); | 2808 tst(object, Operand(kSmiTagMask)); |
2809 Check(ne, kOperandIsASmiAndNotAFunction); | 2809 Check(ne, kOperandIsASmiAndNotAFunction); |
2810 push(object); | 2810 push(object); |
2811 CompareObjectType(object, object, object, JS_FUNCTION_TYPE); | 2811 CompareObjectType(object, object, object, JS_FUNCTION_TYPE); |
2812 pop(object); | 2812 pop(object); |
2813 Check(eq, kOperandIsNotAFunction); | 2813 Check(eq, kOperandIsNotAFunction); |
2814 } | 2814 } |
2815 } | 2815 } |
2816 | 2816 |
2817 | 2817 |
| 2818 void MacroAssembler::AssertBoundFunction(Register object) { |
| 2819 if (emit_debug_code()) { |
| 2820 STATIC_ASSERT(kSmiTag == 0); |
| 2821 tst(object, Operand(kSmiTagMask)); |
| 2822 Check(ne, kOperandIsASmiAndNotABoundFunction); |
| 2823 push(object); |
| 2824 CompareObjectType(object, object, object, JS_BOUND_FUNCTION_TYPE); |
| 2825 pop(object); |
| 2826 Check(eq, kOperandIsNotABoundFunction); |
| 2827 } |
| 2828 } |
| 2829 |
| 2830 |
2818 void MacroAssembler::AssertUndefinedOrAllocationSite(Register object, | 2831 void MacroAssembler::AssertUndefinedOrAllocationSite(Register object, |
2819 Register scratch) { | 2832 Register scratch) { |
2820 if (emit_debug_code()) { | 2833 if (emit_debug_code()) { |
2821 Label done_checking; | 2834 Label done_checking; |
2822 AssertNotSmi(object); | 2835 AssertNotSmi(object); |
2823 CompareRoot(object, Heap::kUndefinedValueRootIndex); | 2836 CompareRoot(object, Heap::kUndefinedValueRootIndex); |
2824 b(eq, &done_checking); | 2837 b(eq, &done_checking); |
2825 ldr(scratch, FieldMemOperand(object, HeapObject::kMapOffset)); | 2838 ldr(scratch, FieldMemOperand(object, HeapObject::kMapOffset)); |
2826 CompareRoot(scratch, Heap::kAllocationSiteMapRootIndex); | 2839 CompareRoot(scratch, Heap::kAllocationSiteMapRootIndex); |
2827 Assert(eq, kExpectedUndefinedOrCell); | 2840 Assert(eq, kExpectedUndefinedOrCell); |
(...skipping 760 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3588 } | 3601 } |
3589 } | 3602 } |
3590 if (mag.shift > 0) mov(result, Operand(result, ASR, mag.shift)); | 3603 if (mag.shift > 0) mov(result, Operand(result, ASR, mag.shift)); |
3591 add(result, result, Operand(dividend, LSR, 31)); | 3604 add(result, result, Operand(dividend, LSR, 31)); |
3592 } | 3605 } |
3593 | 3606 |
3594 } // namespace internal | 3607 } // namespace internal |
3595 } // namespace v8 | 3608 } // namespace v8 |
3596 | 3609 |
3597 #endif // V8_TARGET_ARCH_ARM | 3610 #endif // V8_TARGET_ARCH_ARM |
OLD | NEW |