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 2977 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2988 Check(ne, kOperandIsASmiAndNotABoundFunction); | 2988 Check(ne, kOperandIsASmiAndNotABoundFunction); |
2989 push(object); | 2989 push(object); |
2990 CompareObjectType(object, object, object, JS_BOUND_FUNCTION_TYPE); | 2990 CompareObjectType(object, object, object, JS_BOUND_FUNCTION_TYPE); |
2991 pop(object); | 2991 pop(object); |
2992 Check(eq, kOperandIsNotABoundFunction); | 2992 Check(eq, kOperandIsNotABoundFunction); |
2993 } | 2993 } |
2994 } | 2994 } |
2995 | 2995 |
2996 void MacroAssembler::AssertGeneratorObject(Register object) { | 2996 void MacroAssembler::AssertGeneratorObject(Register object) { |
2997 if (emit_debug_code()) { | 2997 if (emit_debug_code()) { |
| 2998 Label ok; |
2998 STATIC_ASSERT(kSmiTag == 0); | 2999 STATIC_ASSERT(kSmiTag == 0); |
2999 tst(object, Operand(kSmiTagMask)); | 3000 tst(object, Operand(kSmiTagMask)); |
3000 Check(ne, kOperandIsASmiAndNotAGeneratorObject); | 3001 Check(ne, kOperandIsASmiAndNotAGeneratorObject); |
3001 push(object); | 3002 push(object); |
3002 CompareObjectType(object, object, object, JS_GENERATOR_OBJECT_TYPE); | 3003 CompareObjectType(object, object, object, JS_GENERATOR_OBJECT_TYPE); |
3003 pop(object); | 3004 pop(object); |
| 3005 b(eq, &ok); |
| 3006 |
| 3007 push(object); |
| 3008 CompareObjectType(object, object, object, JS_ASYNC_GENERATOR_OBJECT_TYPE); |
| 3009 pop(object); |
3004 Check(eq, kOperandIsNotAGeneratorObject); | 3010 Check(eq, kOperandIsNotAGeneratorObject); |
| 3011 |
| 3012 bind(&ok); |
3005 } | 3013 } |
3006 } | 3014 } |
3007 | 3015 |
3008 void MacroAssembler::AssertReceiver(Register object) { | 3016 void MacroAssembler::AssertReceiver(Register object) { |
3009 if (emit_debug_code()) { | 3017 if (emit_debug_code()) { |
3010 STATIC_ASSERT(kSmiTag == 0); | 3018 STATIC_ASSERT(kSmiTag == 0); |
3011 tst(object, Operand(kSmiTagMask)); | 3019 tst(object, Operand(kSmiTagMask)); |
3012 Check(ne, kOperandIsASmiAndNotAReceiver); | 3020 Check(ne, kOperandIsASmiAndNotAReceiver); |
3013 push(object); | 3021 push(object); |
3014 STATIC_ASSERT(LAST_TYPE == LAST_JS_RECEIVER_TYPE); | 3022 STATIC_ASSERT(LAST_TYPE == LAST_JS_RECEIVER_TYPE); |
(...skipping 857 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3872 } | 3880 } |
3873 } | 3881 } |
3874 if (mag.shift > 0) mov(result, Operand(result, ASR, mag.shift)); | 3882 if (mag.shift > 0) mov(result, Operand(result, ASR, mag.shift)); |
3875 add(result, result, Operand(dividend, LSR, 31)); | 3883 add(result, result, Operand(dividend, LSR, 31)); |
3876 } | 3884 } |
3877 | 3885 |
3878 } // namespace internal | 3886 } // namespace internal |
3879 } // namespace v8 | 3887 } // namespace v8 |
3880 | 3888 |
3881 #endif // V8_TARGET_ARCH_ARM | 3889 #endif // V8_TARGET_ARCH_ARM |
OLD | NEW |