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 933 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
944 Check(not_equal, kOperandIsASmiAndNotABoundFunction); | 944 Check(not_equal, kOperandIsASmiAndNotABoundFunction); |
945 Push(object); | 945 Push(object); |
946 CmpObjectType(object, JS_BOUND_FUNCTION_TYPE, object); | 946 CmpObjectType(object, JS_BOUND_FUNCTION_TYPE, object); |
947 Pop(object); | 947 Pop(object); |
948 Check(equal, kOperandIsNotABoundFunction); | 948 Check(equal, kOperandIsNotABoundFunction); |
949 } | 949 } |
950 } | 950 } |
951 | 951 |
952 void MacroAssembler::AssertGeneratorObject(Register object) { | 952 void MacroAssembler::AssertGeneratorObject(Register object) { |
953 if (emit_debug_code()) { | 953 if (emit_debug_code()) { |
| 954 Label ok; |
954 test(object, Immediate(kSmiTagMask)); | 955 test(object, Immediate(kSmiTagMask)); |
955 Check(not_equal, kOperandIsASmiAndNotAGeneratorObject); | 956 Check(not_equal, kOperandIsASmiAndNotAGeneratorObject); |
956 Push(object); | 957 Push(object); |
957 CmpObjectType(object, JS_GENERATOR_OBJECT_TYPE, object); | 958 CmpObjectType(object, JS_GENERATOR_OBJECT_TYPE, object); |
958 Pop(object); | 959 Pop(object); |
| 960 j(equal, &ok); |
| 961 |
| 962 Push(object); |
| 963 CmpObjectType(object, JS_ASYNC_GENERATOR_OBJECT_TYPE, object); |
| 964 Pop(object); |
959 Check(equal, kOperandIsNotAGeneratorObject); | 965 Check(equal, kOperandIsNotAGeneratorObject); |
| 966 bind(&ok); |
960 } | 967 } |
961 } | 968 } |
962 | 969 |
963 void MacroAssembler::AssertReceiver(Register object) { | 970 void MacroAssembler::AssertReceiver(Register object) { |
964 if (emit_debug_code()) { | 971 if (emit_debug_code()) { |
965 test(object, Immediate(kSmiTagMask)); | 972 test(object, Immediate(kSmiTagMask)); |
966 Check(not_equal, kOperandIsASmiAndNotAReceiver); | 973 Check(not_equal, kOperandIsASmiAndNotAReceiver); |
967 Push(object); | 974 Push(object); |
968 STATIC_ASSERT(LAST_TYPE == LAST_JS_RECEIVER_TYPE); | 975 STATIC_ASSERT(LAST_TYPE == LAST_JS_RECEIVER_TYPE); |
969 CmpObjectType(object, FIRST_JS_RECEIVER_TYPE, object); | 976 CmpObjectType(object, FIRST_JS_RECEIVER_TYPE, object); |
(...skipping 1979 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2949 mov(eax, dividend); | 2956 mov(eax, dividend); |
2950 shr(eax, 31); | 2957 shr(eax, 31); |
2951 add(edx, eax); | 2958 add(edx, eax); |
2952 } | 2959 } |
2953 | 2960 |
2954 | 2961 |
2955 } // namespace internal | 2962 } // namespace internal |
2956 } // namespace v8 | 2963 } // namespace v8 |
2957 | 2964 |
2958 #endif // V8_TARGET_ARCH_IA32 | 2965 #endif // V8_TARGET_ARCH_IA32 |
OLD | NEW |