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 2858 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2869 tst(object, Operand(kSmiTagMask)); | 2869 tst(object, Operand(kSmiTagMask)); |
2870 Check(ne, kOperandIsASmiAndNotABoundFunction); | 2870 Check(ne, kOperandIsASmiAndNotABoundFunction); |
2871 push(object); | 2871 push(object); |
2872 CompareObjectType(object, object, object, JS_BOUND_FUNCTION_TYPE); | 2872 CompareObjectType(object, object, object, JS_BOUND_FUNCTION_TYPE); |
2873 pop(object); | 2873 pop(object); |
2874 Check(eq, kOperandIsNotABoundFunction); | 2874 Check(eq, kOperandIsNotABoundFunction); |
2875 } | 2875 } |
2876 } | 2876 } |
2877 | 2877 |
2878 | 2878 |
| 2879 void MacroAssembler::AssertReceiver(Register object) { |
| 2880 if (emit_debug_code()) { |
| 2881 STATIC_ASSERT(kSmiTag == 0); |
| 2882 tst(object, Operand(kSmiTagMask)); |
| 2883 Check(ne, kOperandIsASmiAndNotAReceiver); |
| 2884 push(object); |
| 2885 STATIC_ASSERT(LAST_TYPE == LAST_JS_RECEIVER_TYPE); |
| 2886 CompareObjectType(object, object, object, FIRST_JS_RECEIVER_TYPE); |
| 2887 pop(object); |
| 2888 Check(hs, kOperandIsNotAReceiver); |
| 2889 } |
| 2890 } |
| 2891 |
| 2892 |
2879 void MacroAssembler::AssertUndefinedOrAllocationSite(Register object, | 2893 void MacroAssembler::AssertUndefinedOrAllocationSite(Register object, |
2880 Register scratch) { | 2894 Register scratch) { |
2881 if (emit_debug_code()) { | 2895 if (emit_debug_code()) { |
2882 Label done_checking; | 2896 Label done_checking; |
2883 AssertNotSmi(object); | 2897 AssertNotSmi(object); |
2884 CompareRoot(object, Heap::kUndefinedValueRootIndex); | 2898 CompareRoot(object, Heap::kUndefinedValueRootIndex); |
2885 b(eq, &done_checking); | 2899 b(eq, &done_checking); |
2886 ldr(scratch, FieldMemOperand(object, HeapObject::kMapOffset)); | 2900 ldr(scratch, FieldMemOperand(object, HeapObject::kMapOffset)); |
2887 CompareRoot(scratch, Heap::kAllocationSiteMapRootIndex); | 2901 CompareRoot(scratch, Heap::kAllocationSiteMapRootIndex); |
2888 Assert(eq, kExpectedUndefinedOrCell); | 2902 Assert(eq, kExpectedUndefinedOrCell); |
(...skipping 785 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3674 } | 3688 } |
3675 } | 3689 } |
3676 if (mag.shift > 0) mov(result, Operand(result, ASR, mag.shift)); | 3690 if (mag.shift > 0) mov(result, Operand(result, ASR, mag.shift)); |
3677 add(result, result, Operand(dividend, LSR, 31)); | 3691 add(result, result, Operand(dividend, LSR, 31)); |
3678 } | 3692 } |
3679 | 3693 |
3680 } // namespace internal | 3694 } // namespace internal |
3681 } // namespace v8 | 3695 } // namespace v8 |
3682 | 3696 |
3683 #endif // V8_TARGET_ARCH_ARM | 3697 #endif // V8_TARGET_ARCH_ARM |
OLD | NEW |