OLD | NEW |
1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 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_ARM64 | 5 #if V8_TARGET_ARCH_ARM64 |
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 1608 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1619 | 1619 |
1620 UseScratchRegisterScope temps(this); | 1620 UseScratchRegisterScope temps(this); |
1621 Register temp = temps.AcquireX(); | 1621 Register temp = temps.AcquireX(); |
1622 | 1622 |
1623 CompareObjectType(object, temp, temp, JS_FUNCTION_TYPE); | 1623 CompareObjectType(object, temp, temp, JS_FUNCTION_TYPE); |
1624 Check(eq, kOperandIsNotAFunction); | 1624 Check(eq, kOperandIsNotAFunction); |
1625 } | 1625 } |
1626 } | 1626 } |
1627 | 1627 |
1628 | 1628 |
1629 void MacroAssembler::AssertBoundFunction(Register object) { | |
1630 if (emit_debug_code()) { | |
1631 AssertNotSmi(object, kOperandIsASmiAndNotABoundFunction); | |
1632 | |
1633 UseScratchRegisterScope temps(this); | |
1634 Register temp = temps.AcquireX(); | |
1635 | |
1636 CompareObjectType(object, temp, temp, JS_BOUND_FUNCTION_TYPE); | |
1637 Check(eq, kOperandIsNotABoundFunction); | |
1638 } | |
1639 } | |
1640 | |
1641 | |
1642 void MacroAssembler::AssertUndefinedOrAllocationSite(Register object, | 1629 void MacroAssembler::AssertUndefinedOrAllocationSite(Register object, |
1643 Register scratch) { | 1630 Register scratch) { |
1644 if (emit_debug_code()) { | 1631 if (emit_debug_code()) { |
1645 Label done_checking; | 1632 Label done_checking; |
1646 AssertNotSmi(object); | 1633 AssertNotSmi(object); |
1647 JumpIfRoot(object, Heap::kUndefinedValueRootIndex, &done_checking); | 1634 JumpIfRoot(object, Heap::kUndefinedValueRootIndex, &done_checking); |
1648 Ldr(scratch, FieldMemOperand(object, HeapObject::kMapOffset)); | 1635 Ldr(scratch, FieldMemOperand(object, HeapObject::kMapOffset)); |
1649 CompareRoot(scratch, Heap::kAllocationSiteMapRootIndex); | 1636 CompareRoot(scratch, Heap::kAllocationSiteMapRootIndex); |
1650 Assert(eq, kExpectedUndefinedOrCell); | 1637 Assert(eq, kExpectedUndefinedOrCell); |
1651 Bind(&done_checking); | 1638 Bind(&done_checking); |
(...skipping 3220 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4872 } | 4859 } |
4873 | 4860 |
4874 | 4861 |
4875 #undef __ | 4862 #undef __ |
4876 | 4863 |
4877 | 4864 |
4878 } // namespace internal | 4865 } // namespace internal |
4879 } // namespace v8 | 4866 } // namespace v8 |
4880 | 4867 |
4881 #endif // V8_TARGET_ARCH_ARM64 | 4868 #endif // V8_TARGET_ARCH_ARM64 |
OLD | NEW |