OLD | NEW |
1 // Copyright 2014 the V8 project authors. All rights reserved. | 1 // Copyright 2014 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/ic/ic-compiler.h" | 9 #include "src/ic/ic-compiler.h" |
10 | 10 |
11 namespace v8 { | 11 namespace v8 { |
12 namespace internal { | 12 namespace internal { |
13 | 13 |
14 #define __ ACCESS_MASM(masm) | 14 #define __ ACCESS_MASM(masm) |
15 | 15 |
16 void PropertyICCompiler::GenerateRuntimeSetProperty(MacroAssembler* masm, | 16 void PropertyICCompiler::GenerateRuntimeSetProperty(MacroAssembler* masm, |
17 StrictMode strict_mode) { | 17 StrictMode strict_mode) { |
18 ASM_LOCATION("PropertyICCompiler::GenerateRuntimeSetProperty"); | 18 ASM_LOCATION("PropertyICCompiler::GenerateRuntimeSetProperty"); |
19 | 19 |
20 __ Push(StoreIC::ReceiverRegister(), StoreIC::NameRegister(), | 20 __ Push(StoreConvention::ReceiverRegister(), StoreConvention::NameRegister(), |
21 StoreIC::ValueRegister()); | 21 StoreConvention::ValueRegister()); |
22 | 22 |
23 __ Mov(x10, Smi::FromInt(strict_mode)); | 23 __ Mov(x10, Smi::FromInt(strict_mode)); |
24 __ Push(x10); | 24 __ Push(x10); |
25 | 25 |
26 // Do tail-call to runtime routine. | 26 // Do tail-call to runtime routine. |
27 __ TailCallRuntime(Runtime::kSetProperty, 4, 1); | 27 __ TailCallRuntime(Runtime::kSetProperty, 4, 1); |
28 } | 28 } |
29 | 29 |
30 | 30 |
31 #undef __ | 31 #undef __ |
(...skipping 18 matching lines...) Expand all Loading... |
50 } | 50 } |
51 } | 51 } |
52 | 52 |
53 Label number_case; | 53 Label number_case; |
54 Label* smi_target = IncludesNumberType(types) ? &number_case : &miss; | 54 Label* smi_target = IncludesNumberType(types) ? &number_case : &miss; |
55 __ JumpIfSmi(receiver(), smi_target); | 55 __ JumpIfSmi(receiver(), smi_target); |
56 | 56 |
57 // Polymorphic keyed stores may use the map register | 57 // Polymorphic keyed stores may use the map register |
58 Register map_reg = scratch1(); | 58 Register map_reg = scratch1(); |
59 DCHECK(kind() != Code::KEYED_STORE_IC || | 59 DCHECK(kind() != Code::KEYED_STORE_IC || |
60 map_reg.is(KeyedStoreIC::MapRegister())); | 60 map_reg.is(StoreConvention::MapRegister())); |
61 __ Ldr(map_reg, FieldMemOperand(receiver(), HeapObject::kMapOffset)); | 61 __ Ldr(map_reg, FieldMemOperand(receiver(), HeapObject::kMapOffset)); |
62 int receiver_count = types->length(); | 62 int receiver_count = types->length(); |
63 int number_of_handled_maps = 0; | 63 int number_of_handled_maps = 0; |
64 for (int current = 0; current < receiver_count; ++current) { | 64 for (int current = 0; current < receiver_count; ++current) { |
65 Handle<HeapType> type = types->at(current); | 65 Handle<HeapType> type = types->at(current); |
66 Handle<Map> map = IC::TypeToMap(*type, isolate()); | 66 Handle<Map> map = IC::TypeToMap(*type, isolate()); |
67 if (!map->is_deprecated()) { | 67 if (!map->is_deprecated()) { |
68 number_of_handled_maps++; | 68 number_of_handled_maps++; |
69 Label try_next; | 69 Label try_next; |
70 __ Cmp(map_reg, Operand(map)); | 70 __ Cmp(map_reg, Operand(map)); |
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
119 | 119 |
120 return GetCode(kind(), Code::NORMAL, factory()->empty_string(), POLYMORPHIC); | 120 return GetCode(kind(), Code::NORMAL, factory()->empty_string(), POLYMORPHIC); |
121 } | 121 } |
122 | 122 |
123 | 123 |
124 #undef __ | 124 #undef __ |
125 } | 125 } |
126 } // namespace v8::internal | 126 } // namespace v8::internal |
127 | 127 |
128 #endif // V8_TARGET_ARCH_ARM64 | 128 #endif // V8_TARGET_ARCH_ARM64 |
OLD | NEW |