| 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 802 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 813 if (emit_debug_code()) { | 813 if (emit_debug_code()) { |
| 814 test(object, Immediate(kSmiTagMask)); | 814 test(object, Immediate(kSmiTagMask)); |
| 815 Check(not_equal, kOperandIsASmiAndNotAFunction); | 815 Check(not_equal, kOperandIsASmiAndNotAFunction); |
| 816 Push(object); | 816 Push(object); |
| 817 CmpObjectType(object, JS_FUNCTION_TYPE, object); | 817 CmpObjectType(object, JS_FUNCTION_TYPE, object); |
| 818 Pop(object); | 818 Pop(object); |
| 819 Check(equal, kOperandIsNotAFunction); | 819 Check(equal, kOperandIsNotAFunction); |
| 820 } | 820 } |
| 821 } | 821 } |
| 822 | 822 |
| 823 | |
| 824 void MacroAssembler::AssertBoundFunction(Register object) { | |
| 825 if (emit_debug_code()) { | |
| 826 test(object, Immediate(kSmiTagMask)); | |
| 827 Check(not_equal, kOperandIsASmiAndNotABoundFunction); | |
| 828 Push(object); | |
| 829 CmpObjectType(object, JS_BOUND_FUNCTION_TYPE, object); | |
| 830 Pop(object); | |
| 831 Check(equal, kOperandIsNotABoundFunction); | |
| 832 } | |
| 833 } | |
| 834 | |
| 835 | 823 |
| 836 void MacroAssembler::AssertUndefinedOrAllocationSite(Register object) { | 824 void MacroAssembler::AssertUndefinedOrAllocationSite(Register object) { |
| 837 if (emit_debug_code()) { | 825 if (emit_debug_code()) { |
| 838 Label done_checking; | 826 Label done_checking; |
| 839 AssertNotSmi(object); | 827 AssertNotSmi(object); |
| 840 cmp(object, isolate()->factory()->undefined_value()); | 828 cmp(object, isolate()->factory()->undefined_value()); |
| 841 j(equal, &done_checking); | 829 j(equal, &done_checking); |
| 842 cmp(FieldOperand(object, 0), | 830 cmp(FieldOperand(object, 0), |
| 843 Immediate(isolate()->factory()->allocation_site_map())); | 831 Immediate(isolate()->factory()->allocation_site_map())); |
| 844 Assert(equal, kExpectedUndefinedOrCell); | 832 Assert(equal, kExpectedUndefinedOrCell); |
| (...skipping 2248 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3093 mov(eax, dividend); | 3081 mov(eax, dividend); |
| 3094 shr(eax, 31); | 3082 shr(eax, 31); |
| 3095 add(edx, eax); | 3083 add(edx, eax); |
| 3096 } | 3084 } |
| 3097 | 3085 |
| 3098 | 3086 |
| 3099 } // namespace internal | 3087 } // namespace internal |
| 3100 } // namespace v8 | 3088 } // namespace v8 |
| 3101 | 3089 |
| 3102 #endif // V8_TARGET_ARCH_IA32 | 3090 #endif // V8_TARGET_ARCH_IA32 |
| OLD | NEW |