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_X64 | 7 #if V8_TARGET_ARCH_X64 |
8 | 8 |
9 #include "src/ic/ic.h" | 9 #include "src/ic/ic.h" |
10 #include "src/ic/ic-compiler.h" | 10 #include "src/ic/ic-compiler.h" |
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
98 } | 98 } |
99 } | 99 } |
100 | 100 |
101 Label number_case; | 101 Label number_case; |
102 Label* smi_target = IncludesNumberMap(maps) ? &number_case : &miss; | 102 Label* smi_target = IncludesNumberMap(maps) ? &number_case : &miss; |
103 __ JumpIfSmi(receiver(), smi_target); | 103 __ JumpIfSmi(receiver(), smi_target); |
104 | 104 |
105 // Polymorphic keyed stores may use the map register | 105 // Polymorphic keyed stores may use the map register |
106 Register map_reg = scratch1(); | 106 Register map_reg = scratch1(); |
107 DCHECK(kind() != Code::KEYED_STORE_IC || | 107 DCHECK(kind() != Code::KEYED_STORE_IC || |
108 map_reg.is(ElementTransitionAndStoreDescriptor::MapRegister())); | 108 map_reg.is(StoreTransitionDescriptor::MapRegister())); |
109 __ movp(map_reg, FieldOperand(receiver(), HeapObject::kMapOffset)); | 109 __ movp(map_reg, FieldOperand(receiver(), HeapObject::kMapOffset)); |
110 int receiver_count = maps->length(); | 110 int receiver_count = maps->length(); |
111 int number_of_handled_maps = 0; | 111 int number_of_handled_maps = 0; |
112 for (int current = 0; current < receiver_count; ++current) { | 112 for (int current = 0; current < receiver_count; ++current) { |
113 Handle<Map> map = maps->at(current); | 113 Handle<Map> map = maps->at(current); |
114 if (!map->is_deprecated()) { | 114 if (!map->is_deprecated()) { |
115 number_of_handled_maps++; | 115 number_of_handled_maps++; |
116 Handle<WeakCell> cell = Map::WeakCellForMap(map); | 116 Handle<WeakCell> cell = Map::WeakCellForMap(map); |
117 // Check map and tail call if there's a match | 117 // Check map and tail call if there's a match |
118 __ CmpWeakValue(map_reg, cell, scratch2()); | 118 __ CmpWeakValue(map_reg, cell, scratch2()); |
(...skipping 14 matching lines...) Expand all Loading... |
133 number_of_handled_maps > 1 ? POLYMORPHIC : MONOMORPHIC; | 133 number_of_handled_maps > 1 ? POLYMORPHIC : MONOMORPHIC; |
134 return GetCode(kind(), type, name, state); | 134 return GetCode(kind(), type, name, state); |
135 } | 135 } |
136 | 136 |
137 | 137 |
138 #undef __ | 138 #undef __ |
139 } // namespace internal | 139 } // namespace internal |
140 } // namespace v8 | 140 } // namespace v8 |
141 | 141 |
142 #endif // V8_TARGET_ARCH_X64 | 142 #endif // V8_TARGET_ARCH_X64 |
OLD | NEW |