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/codegen.h" | 9 #include "src/codegen.h" |
10 #include "src/ic/ic.h" | 10 #include "src/ic/ic.h" |
(...skipping 729 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
740 receiver_map, x10, x11, slow); | 740 receiver_map, x10, x11, slow); |
741 mode = AllocationSite::GetMode(FAST_DOUBLE_ELEMENTS, FAST_ELEMENTS); | 741 mode = AllocationSite::GetMode(FAST_DOUBLE_ELEMENTS, FAST_ELEMENTS); |
742 ElementsTransitionGenerator::GenerateDoubleToObject( | 742 ElementsTransitionGenerator::GenerateDoubleToObject( |
743 masm, receiver, key, value, receiver_map, mode, slow); | 743 masm, receiver, key, value, receiver_map, mode, slow); |
744 __ Ldr(elements, FieldMemOperand(receiver, JSObject::kElementsOffset)); | 744 __ Ldr(elements, FieldMemOperand(receiver, JSObject::kElementsOffset)); |
745 __ B(&finish_store); | 745 __ B(&finish_store); |
746 } | 746 } |
747 | 747 |
748 | 748 |
749 void KeyedStoreIC::GenerateMegamorphic(MacroAssembler* masm, | 749 void KeyedStoreIC::GenerateMegamorphic(MacroAssembler* masm, |
750 StrictMode strict_mode) { | 750 LanguageMode language_mode) { |
751 ASM_LOCATION("KeyedStoreIC::GenerateMegamorphic"); | 751 ASM_LOCATION("KeyedStoreIC::GenerateMegamorphic"); |
752 Label slow; | 752 Label slow; |
753 Label array; | 753 Label array; |
754 Label fast_object; | 754 Label fast_object; |
755 Label extra; | 755 Label extra; |
756 Label fast_object_grow; | 756 Label fast_object_grow; |
757 Label fast_double_grow; | 757 Label fast_double_grow; |
758 Label fast_double; | 758 Label fast_double; |
759 Label maybe_name_key; | 759 Label maybe_name_key; |
760 Label miss; | 760 Label miss; |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
795 __ Cmp(x10, Operand::UntagSmi(key)); | 795 __ Cmp(x10, Operand::UntagSmi(key)); |
796 __ B(hi, &fast_object); | 796 __ B(hi, &fast_object); |
797 | 797 |
798 | 798 |
799 __ Bind(&slow); | 799 __ Bind(&slow); |
800 // Slow case, handle jump to runtime. | 800 // Slow case, handle jump to runtime. |
801 // Live values: | 801 // Live values: |
802 // x0: value | 802 // x0: value |
803 // x1: key | 803 // x1: key |
804 // x2: receiver | 804 // x2: receiver |
805 PropertyICCompiler::GenerateRuntimeSetProperty(masm, strict_mode); | 805 PropertyICCompiler::GenerateRuntimeSetProperty(masm, language_mode); |
806 // Never returns to here. | 806 // Never returns to here. |
807 | 807 |
808 __ bind(&maybe_name_key); | 808 __ bind(&maybe_name_key); |
809 __ Ldr(x10, FieldMemOperand(key, HeapObject::kMapOffset)); | 809 __ Ldr(x10, FieldMemOperand(key, HeapObject::kMapOffset)); |
810 __ Ldrb(x10, FieldMemOperand(x10, Map::kInstanceTypeOffset)); | 810 __ Ldrb(x10, FieldMemOperand(x10, Map::kInstanceTypeOffset)); |
811 __ JumpIfNotUniqueNameInstanceType(x10, &slow); | 811 __ JumpIfNotUniqueNameInstanceType(x10, &slow); |
812 Code::Flags flags = Code::RemoveTypeAndHolderFromFlags( | 812 Code::Flags flags = Code::RemoveTypeAndHolderFromFlags( |
813 Code::ComputeHandlerFlags(Code::STORE_IC)); | 813 Code::ComputeHandlerFlags(Code::STORE_IC)); |
814 masm->isolate()->stub_cache()->GenerateProbe( | 814 masm->isolate()->stub_cache()->GenerateProbe( |
815 masm, Code::STORE_IC, flags, false, receiver, key, x3, x4, x5, x6); | 815 masm, Code::STORE_IC, flags, false, receiver, key, x3, x4, x5, x6); |
(...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
994 } else { | 994 } else { |
995 DCHECK(to_patch->Mask(TestBranchMask) == TBNZ); | 995 DCHECK(to_patch->Mask(TestBranchMask) == TBNZ); |
996 // This is JumpIfSmi(smi_reg, branch_imm). | 996 // This is JumpIfSmi(smi_reg, branch_imm). |
997 patcher.tbz(smi_reg, 0, branch_imm); | 997 patcher.tbz(smi_reg, 0, branch_imm); |
998 } | 998 } |
999 } | 999 } |
1000 } | 1000 } |
1001 } // namespace v8::internal | 1001 } // namespace v8::internal |
1002 | 1002 |
1003 #endif // V8_TARGET_ARCH_ARM64 | 1003 #endif // V8_TARGET_ARCH_ARM64 |
OLD | NEW |