| 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_IA32 | 5 #if V8_TARGET_ARCH_IA32 |
| 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 1007 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1018 if (emit_debug_code()) { | 1018 if (emit_debug_code()) { |
| 1019 test(object, Immediate(kSmiTagMask)); | 1019 test(object, Immediate(kSmiTagMask)); |
| 1020 Check(not_equal, kOperandIsASmiAndNotABoundFunction); | 1020 Check(not_equal, kOperandIsASmiAndNotABoundFunction); |
| 1021 Push(object); | 1021 Push(object); |
| 1022 CmpObjectType(object, JS_BOUND_FUNCTION_TYPE, object); | 1022 CmpObjectType(object, JS_BOUND_FUNCTION_TYPE, object); |
| 1023 Pop(object); | 1023 Pop(object); |
| 1024 Check(equal, kOperandIsNotABoundFunction); | 1024 Check(equal, kOperandIsNotABoundFunction); |
| 1025 } | 1025 } |
| 1026 } | 1026 } |
| 1027 | 1027 |
| 1028 void MacroAssembler::AssertGeneratorObject(Register object) { |
| 1029 if (emit_debug_code()) { |
| 1030 test(object, Immediate(kSmiTagMask)); |
| 1031 Check(not_equal, kOperandIsASmiAndNotAGeneratorObject); |
| 1032 Push(object); |
| 1033 CmpObjectType(object, JS_GENERATOR_OBJECT_TYPE, object); |
| 1034 Pop(object); |
| 1035 Check(equal, kOperandIsNotAGeneratorObject); |
| 1036 } |
| 1037 } |
| 1028 | 1038 |
| 1029 void MacroAssembler::AssertReceiver(Register object) { | 1039 void MacroAssembler::AssertReceiver(Register object) { |
| 1030 if (emit_debug_code()) { | 1040 if (emit_debug_code()) { |
| 1031 test(object, Immediate(kSmiTagMask)); | 1041 test(object, Immediate(kSmiTagMask)); |
| 1032 Check(not_equal, kOperandIsASmiAndNotAReceiver); | 1042 Check(not_equal, kOperandIsASmiAndNotAReceiver); |
| 1033 Push(object); | 1043 Push(object); |
| 1034 STATIC_ASSERT(LAST_TYPE == LAST_JS_RECEIVER_TYPE); | 1044 STATIC_ASSERT(LAST_TYPE == LAST_JS_RECEIVER_TYPE); |
| 1035 CmpObjectType(object, FIRST_JS_RECEIVER_TYPE, object); | 1045 CmpObjectType(object, FIRST_JS_RECEIVER_TYPE, object); |
| 1036 Pop(object); | 1046 Pop(object); |
| 1037 Check(above_equal, kOperandIsNotAReceiver); | 1047 Check(above_equal, kOperandIsNotAReceiver); |
| (...skipping 2376 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3414 mov(eax, dividend); | 3424 mov(eax, dividend); |
| 3415 shr(eax, 31); | 3425 shr(eax, 31); |
| 3416 add(edx, eax); | 3426 add(edx, eax); |
| 3417 } | 3427 } |
| 3418 | 3428 |
| 3419 | 3429 |
| 3420 } // namespace internal | 3430 } // namespace internal |
| 3421 } // namespace v8 | 3431 } // namespace v8 |
| 3422 | 3432 |
| 3423 #endif // V8_TARGET_ARCH_IA32 | 3433 #endif // V8_TARGET_ARCH_IA32 |
| OLD | NEW |