| 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 #include "src/v8.h" | 5 #include "src/v8.h" |
| 6 | 6 |
| 7 #if V8_TARGET_ARCH_ARM64 | 7 #if V8_TARGET_ARCH_ARM64 |
| 8 | 8 |
| 9 #include "src/base/bits.h" | 9 #include "src/base/bits.h" |
| 10 #include "src/base/division-by-constant.h" | 10 #include "src/base/division-by-constant.h" |
| (...skipping 3687 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3698 | 3698 |
| 3699 | 3699 |
| 3700 void MacroAssembler::LoadElementsKindFromMap(Register result, Register map) { | 3700 void MacroAssembler::LoadElementsKindFromMap(Register result, Register map) { |
| 3701 // Load the map's "bit field 2". | 3701 // Load the map's "bit field 2". |
| 3702 __ Ldrb(result, FieldMemOperand(map, Map::kBitField2Offset)); | 3702 __ Ldrb(result, FieldMemOperand(map, Map::kBitField2Offset)); |
| 3703 // Retrieve elements_kind from bit field 2. | 3703 // Retrieve elements_kind from bit field 2. |
| 3704 DecodeField<Map::ElementsKindBits>(result); | 3704 DecodeField<Map::ElementsKindBits>(result); |
| 3705 } | 3705 } |
| 3706 | 3706 |
| 3707 | 3707 |
| 3708 void MacroAssembler::GetMapConstructor(Register result, Register map, |
| 3709 Register temp, Register temp2) { |
| 3710 Label done, loop; |
| 3711 Ldr(result, FieldMemOperand(map, Map::kConstructorOrBackPointerOffset)); |
| 3712 Bind(&loop); |
| 3713 JumpIfSmi(result, &done); |
| 3714 CompareObjectType(result, temp, temp2, MAP_TYPE); |
| 3715 B(ne, &done); |
| 3716 Ldr(result, FieldMemOperand(result, Map::kConstructorOrBackPointerOffset)); |
| 3717 B(&loop); |
| 3718 Bind(&done); |
| 3719 } |
| 3720 |
| 3721 |
| 3708 void MacroAssembler::TryGetFunctionPrototype(Register function, | 3722 void MacroAssembler::TryGetFunctionPrototype(Register function, |
| 3709 Register result, | 3723 Register result, |
| 3710 Register scratch, | 3724 Register scratch, |
| 3711 Label* miss, | 3725 Label* miss, |
| 3712 BoundFunctionAction action) { | 3726 BoundFunctionAction action) { |
| 3713 DCHECK(!AreAliased(function, result, scratch)); | 3727 DCHECK(!AreAliased(function, result, scratch)); |
| 3714 | 3728 |
| 3715 Label non_instance; | 3729 Label non_instance; |
| 3716 if (action == kMissOnBoundFunction) { | 3730 if (action == kMissOnBoundFunction) { |
| 3717 // Check that the receiver isn't a smi. | 3731 // Check that the receiver isn't a smi. |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3749 | 3763 |
| 3750 // Get the prototype from the initial map. | 3764 // Get the prototype from the initial map. |
| 3751 Ldr(result, FieldMemOperand(result, Map::kPrototypeOffset)); | 3765 Ldr(result, FieldMemOperand(result, Map::kPrototypeOffset)); |
| 3752 | 3766 |
| 3753 if (action == kMissOnBoundFunction) { | 3767 if (action == kMissOnBoundFunction) { |
| 3754 B(&done); | 3768 B(&done); |
| 3755 | 3769 |
| 3756 // Non-instance prototype: fetch prototype from constructor field in initial | 3770 // Non-instance prototype: fetch prototype from constructor field in initial |
| 3757 // map. | 3771 // map. |
| 3758 Bind(&non_instance); | 3772 Bind(&non_instance); |
| 3759 Ldr(result, FieldMemOperand(result, Map::kConstructorOffset)); | 3773 GetMapConstructor(result, result, scratch, scratch); |
| 3760 } | 3774 } |
| 3761 | 3775 |
| 3762 // All done. | 3776 // All done. |
| 3763 Bind(&done); | 3777 Bind(&done); |
| 3764 } | 3778 } |
| 3765 | 3779 |
| 3766 | 3780 |
| 3767 void MacroAssembler::CompareRoot(const Register& obj, | 3781 void MacroAssembler::CompareRoot(const Register& obj, |
| 3768 Heap::RootListIndex index) { | 3782 Heap::RootListIndex index) { |
| 3769 UseScratchRegisterScope temps(this); | 3783 UseScratchRegisterScope temps(this); |
| (...skipping 1491 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5261 } | 5275 } |
| 5262 } | 5276 } |
| 5263 | 5277 |
| 5264 | 5278 |
| 5265 #undef __ | 5279 #undef __ |
| 5266 | 5280 |
| 5267 | 5281 |
| 5268 } } // namespace v8::internal | 5282 } } // namespace v8::internal |
| 5269 | 5283 |
| 5270 #endif // V8_TARGET_ARCH_ARM64 | 5284 #endif // V8_TARGET_ARCH_ARM64 |
| OLD | NEW |