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 882 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
893 if (emit_debug_code()) { | 893 if (emit_debug_code()) { |
894 test(object, Immediate(kSmiTagMask)); | 894 test(object, Immediate(kSmiTagMask)); |
895 Check(not_equal, kOperandIsASmiAndNotABoundFunction); | 895 Check(not_equal, kOperandIsASmiAndNotABoundFunction); |
896 Push(object); | 896 Push(object); |
897 CmpObjectType(object, JS_BOUND_FUNCTION_TYPE, object); | 897 CmpObjectType(object, JS_BOUND_FUNCTION_TYPE, object); |
898 Pop(object); | 898 Pop(object); |
899 Check(equal, kOperandIsNotABoundFunction); | 899 Check(equal, kOperandIsNotABoundFunction); |
900 } | 900 } |
901 } | 901 } |
902 | 902 |
| 903 void MacroAssembler::AssertReceiver(Register object) { |
| 904 if (emit_debug_code()) { |
| 905 test(object, Immediate(kSmiTagMask)); |
| 906 Check(not_equal, kOperandIsASmiAndNotAReceiver); |
| 907 Push(object); |
| 908 STATIC_ASSERT(LAST_TYPE == LAST_JS_RECEIVER_TYPE); |
| 909 CmpObjectType(object, FIRST_JS_RECEIVER_TYPE, object); |
| 910 Pop(object); |
| 911 Check(above_equal, kOperandIsNotAReceiver); |
| 912 } |
| 913 } |
903 | 914 |
904 void MacroAssembler::AssertUndefinedOrAllocationSite(Register object) { | 915 void MacroAssembler::AssertUndefinedOrAllocationSite(Register object) { |
905 if (emit_debug_code()) { | 916 if (emit_debug_code()) { |
906 Label done_checking; | 917 Label done_checking; |
907 AssertNotSmi(object); | 918 AssertNotSmi(object); |
908 cmp(object, isolate()->factory()->undefined_value()); | 919 cmp(object, isolate()->factory()->undefined_value()); |
909 j(equal, &done_checking); | 920 j(equal, &done_checking); |
910 cmp(FieldOperand(object, 0), | 921 cmp(FieldOperand(object, 0), |
911 Immediate(isolate()->factory()->allocation_site_map())); | 922 Immediate(isolate()->factory()->allocation_site_map())); |
912 Assert(equal, kExpectedUndefinedOrCell); | 923 Assert(equal, kExpectedUndefinedOrCell); |
(...skipping 2151 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3064 mov(eax, dividend); | 3075 mov(eax, dividend); |
3065 shr(eax, 31); | 3076 shr(eax, 31); |
3066 add(edx, eax); | 3077 add(edx, eax); |
3067 } | 3078 } |
3068 | 3079 |
3069 | 3080 |
3070 } // namespace internal | 3081 } // namespace internal |
3071 } // namespace v8 | 3082 } // namespace v8 |
3072 | 3083 |
3073 #endif // V8_TARGET_ARCH_X87 | 3084 #endif // V8_TARGET_ARCH_X87 |
OLD | NEW |