| 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 803 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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 | 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 |
| 824 void MacroAssembler::AssertUndefinedOrAllocationSite(Register object) { | 836 void MacroAssembler::AssertUndefinedOrAllocationSite(Register object) { |
| 825 if (emit_debug_code()) { | 837 if (emit_debug_code()) { |
| 826 Label done_checking; | 838 Label done_checking; |
| 827 AssertNotSmi(object); | 839 AssertNotSmi(object); |
| 828 cmp(object, isolate()->factory()->undefined_value()); | 840 cmp(object, isolate()->factory()->undefined_value()); |
| 829 j(equal, &done_checking); | 841 j(equal, &done_checking); |
| 830 cmp(FieldOperand(object, 0), | 842 cmp(FieldOperand(object, 0), |
| 831 Immediate(isolate()->factory()->allocation_site_map())); | 843 Immediate(isolate()->factory()->allocation_site_map())); |
| 832 Assert(equal, kExpectedUndefinedOrCell); | 844 Assert(equal, kExpectedUndefinedOrCell); |
| 833 bind(&done_checking); | 845 bind(&done_checking); |
| (...skipping 2247 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3081 mov(eax, dividend); | 3093 mov(eax, dividend); |
| 3082 shr(eax, 31); | 3094 shr(eax, 31); |
| 3083 add(edx, eax); | 3095 add(edx, eax); |
| 3084 } | 3096 } |
| 3085 | 3097 |
| 3086 | 3098 |
| 3087 } // namespace internal | 3099 } // namespace internal |
| 3088 } // namespace v8 | 3100 } // namespace v8 |
| 3089 | 3101 |
| 3090 #endif // V8_TARGET_ARCH_IA32 | 3102 #endif // V8_TARGET_ARCH_IA32 |
| OLD | NEW |