| 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_PPC | 7 #if V8_TARGET_ARCH_PPC |
| 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 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 56 } | 56 } |
| 57 } | 57 } |
| 58 | 58 |
| 59 Label number_case; | 59 Label number_case; |
| 60 Label* smi_target = IncludesNumberMap(maps) ? &number_case : &miss; | 60 Label* smi_target = IncludesNumberMap(maps) ? &number_case : &miss; |
| 61 __ JumpIfSmi(receiver(), smi_target); | 61 __ JumpIfSmi(receiver(), smi_target); |
| 62 | 62 |
| 63 // Polymorphic keyed stores may use the map register | 63 // Polymorphic keyed stores may use the map register |
| 64 Register map_reg = scratch1(); | 64 Register map_reg = scratch1(); |
| 65 DCHECK(kind() != Code::KEYED_STORE_IC || | 65 DCHECK(kind() != Code::KEYED_STORE_IC || |
| 66 map_reg.is(ElementTransitionAndStoreDescriptor::MapRegister())); | 66 map_reg.is(StoreTransitionDescriptor::MapRegister())); |
| 67 | 67 |
| 68 int receiver_count = maps->length(); | 68 int receiver_count = maps->length(); |
| 69 int number_of_handled_maps = 0; | 69 int number_of_handled_maps = 0; |
| 70 __ LoadP(map_reg, FieldMemOperand(receiver(), HeapObject::kMapOffset)); | 70 __ LoadP(map_reg, FieldMemOperand(receiver(), HeapObject::kMapOffset)); |
| 71 for (int current = 0; current < receiver_count; ++current) { | 71 for (int current = 0; current < receiver_count; ++current) { |
| 72 Handle<Map> map = maps->at(current); | 72 Handle<Map> map = maps->at(current); |
| 73 if (!map->is_deprecated()) { | 73 if (!map->is_deprecated()) { |
| 74 number_of_handled_maps++; | 74 number_of_handled_maps++; |
| 75 Handle<WeakCell> cell = Map::WeakCellForMap(map); | 75 Handle<WeakCell> cell = Map::WeakCellForMap(map); |
| 76 __ CmpWeakValue(map_reg, cell, scratch2()); | 76 __ CmpWeakValue(map_reg, cell, scratch2()); |
| (...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 126 // Return the generated code. | 126 // Return the generated code. |
| 127 return GetCode(kind(), Code::NORMAL, factory()->empty_string(), POLYMORPHIC); | 127 return GetCode(kind(), Code::NORMAL, factory()->empty_string(), POLYMORPHIC); |
| 128 } | 128 } |
| 129 | 129 |
| 130 | 130 |
| 131 #undef __ | 131 #undef __ |
| 132 } // namespace internal | 132 } // namespace internal |
| 133 } // namespace v8 | 133 } // namespace v8 |
| 134 | 134 |
| 135 #endif // V8_TARGET_ARCH_PPC | 135 #endif // V8_TARGET_ARCH_PPC |
| OLD | NEW |