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_X87 | 5 #if V8_TARGET_ARCH_X87 |
6 | 6 |
7 #include "src/base/bits.h" | 7 #include "src/base/bits.h" |
8 #include "src/base/division-by-constant.h" | 8 #include "src/base/division-by-constant.h" |
9 #include "src/bootstrapper.h" | 9 #include "src/bootstrapper.h" |
10 #include "src/codegen.h" | 10 #include "src/codegen.h" |
(...skipping 955 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
966 if (emit_debug_code()) { | 966 if (emit_debug_code()) { |
967 test(object, Immediate(kSmiTagMask)); | 967 test(object, Immediate(kSmiTagMask)); |
968 Check(not_equal, kOperandIsASmiAndNotABoundFunction); | 968 Check(not_equal, kOperandIsASmiAndNotABoundFunction); |
969 Push(object); | 969 Push(object); |
970 CmpObjectType(object, JS_BOUND_FUNCTION_TYPE, object); | 970 CmpObjectType(object, JS_BOUND_FUNCTION_TYPE, object); |
971 Pop(object); | 971 Pop(object); |
972 Check(equal, kOperandIsNotABoundFunction); | 972 Check(equal, kOperandIsNotABoundFunction); |
973 } | 973 } |
974 } | 974 } |
975 | 975 |
| 976 void MacroAssembler::AssertGeneratorObject(Register object) { |
| 977 if (emit_debug_code()) { |
| 978 test(object, Immediate(kSmiTagMask)); |
| 979 Check(not_equal, kOperandIsASmiAndNotAGeneratorObject); |
| 980 Push(object); |
| 981 CmpObjectType(object, JS_GENERATOR_OBJECT_TYPE, object); |
| 982 Pop(object); |
| 983 Check(equal, kOperandIsNotAGeneratorObject); |
| 984 } |
| 985 } |
| 986 |
976 void MacroAssembler::AssertReceiver(Register object) { | 987 void MacroAssembler::AssertReceiver(Register object) { |
977 if (emit_debug_code()) { | 988 if (emit_debug_code()) { |
978 test(object, Immediate(kSmiTagMask)); | 989 test(object, Immediate(kSmiTagMask)); |
979 Check(not_equal, kOperandIsASmiAndNotAReceiver); | 990 Check(not_equal, kOperandIsASmiAndNotAReceiver); |
980 Push(object); | 991 Push(object); |
981 STATIC_ASSERT(LAST_TYPE == LAST_JS_RECEIVER_TYPE); | 992 STATIC_ASSERT(LAST_TYPE == LAST_JS_RECEIVER_TYPE); |
982 CmpObjectType(object, FIRST_JS_RECEIVER_TYPE, object); | 993 CmpObjectType(object, FIRST_JS_RECEIVER_TYPE, object); |
983 Pop(object); | 994 Pop(object); |
984 Check(above_equal, kOperandIsNotAReceiver); | 995 Check(above_equal, kOperandIsNotAReceiver); |
985 } | 996 } |
(...skipping 2275 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3261 mov(eax, dividend); | 3272 mov(eax, dividend); |
3262 shr(eax, 31); | 3273 shr(eax, 31); |
3263 add(edx, eax); | 3274 add(edx, eax); |
3264 } | 3275 } |
3265 | 3276 |
3266 | 3277 |
3267 } // namespace internal | 3278 } // namespace internal |
3268 } // namespace v8 | 3279 } // namespace v8 |
3269 | 3280 |
3270 #endif // V8_TARGET_ARCH_X87 | 3281 #endif // V8_TARGET_ARCH_X87 |
OLD | NEW |