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 3770 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3781 SmiCheckType smi_check_type) { | 3781 SmiCheckType smi_check_type) { |
3782 if (smi_check_type == DO_SMI_CHECK) { | 3782 if (smi_check_type == DO_SMI_CHECK) { |
3783 JumpIfSmi(obj_map, fail); | 3783 JumpIfSmi(obj_map, fail); |
3784 } | 3784 } |
3785 | 3785 |
3786 CompareMap(obj_map, map); | 3786 CompareMap(obj_map, map); |
3787 B(ne, fail); | 3787 B(ne, fail); |
3788 } | 3788 } |
3789 | 3789 |
3790 | 3790 |
3791 void MacroAssembler::DispatchMap(Register obj, | 3791 void MacroAssembler::DispatchWeakMap(Register obj, Register scratch1, |
3792 Register scratch, | 3792 Register scratch2, Handle<WeakCell> cell, |
3793 Handle<Map> map, | 3793 Handle<Code> success, |
3794 Handle<Code> success, | 3794 SmiCheckType smi_check_type) { |
3795 SmiCheckType smi_check_type) { | |
3796 Label fail; | 3795 Label fail; |
3797 if (smi_check_type == DO_SMI_CHECK) { | 3796 if (smi_check_type == DO_SMI_CHECK) { |
3798 JumpIfSmi(obj, &fail); | 3797 JumpIfSmi(obj, &fail); |
3799 } | 3798 } |
3800 Ldr(scratch, FieldMemOperand(obj, HeapObject::kMapOffset)); | 3799 Ldr(scratch1, FieldMemOperand(obj, HeapObject::kMapOffset)); |
3801 Cmp(scratch, Operand(map)); | 3800 CmpWeakValue(scratch1, cell, scratch2); |
3802 B(ne, &fail); | 3801 B(ne, &fail); |
3803 Jump(success, RelocInfo::CODE_TARGET); | 3802 Jump(success, RelocInfo::CODE_TARGET); |
3804 Bind(&fail); | 3803 Bind(&fail); |
3805 } | 3804 } |
3806 | 3805 |
3807 | 3806 |
3808 void MacroAssembler::CmpWeakValue(Register value, Handle<WeakCell> cell, | 3807 void MacroAssembler::CmpWeakValue(Register value, Handle<WeakCell> cell, |
3809 Register scratch) { | 3808 Register scratch) { |
3810 Mov(scratch, Operand(cell)); | 3809 Mov(scratch, Operand(cell)); |
3811 Ldr(scratch, FieldMemOperand(scratch, WeakCell::kValueOffset)); | 3810 Ldr(scratch, FieldMemOperand(scratch, WeakCell::kValueOffset)); |
(...skipping 1582 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5394 } | 5393 } |
5395 } | 5394 } |
5396 | 5395 |
5397 | 5396 |
5398 #undef __ | 5397 #undef __ |
5399 | 5398 |
5400 | 5399 |
5401 } } // namespace v8::internal | 5400 } } // namespace v8::internal |
5402 | 5401 |
5403 #endif // V8_TARGET_ARCH_ARM64 | 5402 #endif // V8_TARGET_ARCH_ARM64 |
OLD | NEW |