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 3844 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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 | 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 |
3865 void MacroAssembler::AssertUndefinedOrAllocationSite(Register object) { | 3877 void MacroAssembler::AssertUndefinedOrAllocationSite(Register object) { |
3866 if (emit_debug_code()) { | 3878 if (emit_debug_code()) { |
3867 Label done_checking; | 3879 Label done_checking; |
3868 AssertNotSmi(object); | 3880 AssertNotSmi(object); |
3869 Cmp(object, isolate()->factory()->undefined_value()); | 3881 Cmp(object, isolate()->factory()->undefined_value()); |
3870 j(equal, &done_checking); | 3882 j(equal, &done_checking); |
3871 Cmp(FieldOperand(object, 0), isolate()->factory()->allocation_site_map()); | 3883 Cmp(FieldOperand(object, 0), isolate()->factory()->allocation_site_map()); |
3872 Assert(equal, kExpectedUndefinedOrCell); | 3884 Assert(equal, kExpectedUndefinedOrCell); |
3873 bind(&done_checking); | 3885 bind(&done_checking); |
3874 } | 3886 } |
(...skipping 1682 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5557 movl(rax, dividend); | 5569 movl(rax, dividend); |
5558 shrl(rax, Immediate(31)); | 5570 shrl(rax, Immediate(31)); |
5559 addl(rdx, rax); | 5571 addl(rdx, rax); |
5560 } | 5572 } |
5561 | 5573 |
5562 | 5574 |
5563 } // namespace internal | 5575 } // namespace internal |
5564 } // namespace v8 | 5576 } // namespace v8 |
5565 | 5577 |
5566 #endif // V8_TARGET_ARCH_X64 | 5578 #endif // V8_TARGET_ARCH_X64 |
OLD | NEW |