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_X64 | 5 #if V8_TARGET_ARCH_X64 |
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 3843 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3854 if (emit_debug_code()) { | 3854 if (emit_debug_code()) { |
3855 testb(object, Immediate(kSmiTagMask)); | 3855 testb(object, Immediate(kSmiTagMask)); |
3856 Check(not_equal, kOperandIsASmiAndNotAFunction); | 3856 Check(not_equal, kOperandIsASmiAndNotAFunction); |
3857 Push(object); | 3857 Push(object); |
3858 CmpObjectType(object, JS_FUNCTION_TYPE, object); | 3858 CmpObjectType(object, JS_FUNCTION_TYPE, object); |
3859 Pop(object); | 3859 Pop(object); |
3860 Check(equal, kOperandIsNotAFunction); | 3860 Check(equal, kOperandIsNotAFunction); |
3861 } | 3861 } |
3862 } | 3862 } |
3863 | 3863 |
3864 | |
3865 void MacroAssembler::AssertBoundFunction(Register object) { | |
3866 if (emit_debug_code()) { | |
3867 testb(object, Immediate(kSmiTagMask)); | |
3868 Check(not_equal, kOperandIsASmiAndNotABoundFunction); | |
3869 Push(object); | |
3870 CmpObjectType(object, JS_BOUND_FUNCTION_TYPE, object); | |
3871 Pop(object); | |
3872 Check(equal, kOperandIsNotABoundFunction); | |
3873 } | |
3874 } | |
3875 | |
3876 | 3864 |
3877 void MacroAssembler::AssertUndefinedOrAllocationSite(Register object) { | 3865 void MacroAssembler::AssertUndefinedOrAllocationSite(Register object) { |
3878 if (emit_debug_code()) { | 3866 if (emit_debug_code()) { |
3879 Label done_checking; | 3867 Label done_checking; |
3880 AssertNotSmi(object); | 3868 AssertNotSmi(object); |
3881 Cmp(object, isolate()->factory()->undefined_value()); | 3869 Cmp(object, isolate()->factory()->undefined_value()); |
3882 j(equal, &done_checking); | 3870 j(equal, &done_checking); |
3883 Cmp(FieldOperand(object, 0), isolate()->factory()->allocation_site_map()); | 3871 Cmp(FieldOperand(object, 0), isolate()->factory()->allocation_site_map()); |
3884 Assert(equal, kExpectedUndefinedOrCell); | 3872 Assert(equal, kExpectedUndefinedOrCell); |
3885 bind(&done_checking); | 3873 bind(&done_checking); |
(...skipping 1583 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5469 movl(rax, dividend); | 5457 movl(rax, dividend); |
5470 shrl(rax, Immediate(31)); | 5458 shrl(rax, Immediate(31)); |
5471 addl(rdx, rax); | 5459 addl(rdx, rax); |
5472 } | 5460 } |
5473 | 5461 |
5474 | 5462 |
5475 } // namespace internal | 5463 } // namespace internal |
5476 } // namespace v8 | 5464 } // namespace v8 |
5477 | 5465 |
5478 #endif // V8_TARGET_ARCH_X64 | 5466 #endif // V8_TARGET_ARCH_X64 |
OLD | NEW |