| 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 #if V8_TARGET_ARCH_X64 | 5 #if V8_TARGET_ARCH_X64 |
| 6 | 6 |
| 7 #include "src/ic/ic.h" | 7 #include "src/ic/ic.h" |
| 8 #include "src/ic/ic-compiler.h" | 8 #include "src/ic/ic-compiler.h" |
| 9 | 9 |
| 10 namespace v8 { | 10 namespace v8 { |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 48 for (int i = 0; i < receiver_count; ++i) { | 48 for (int i = 0; i < receiver_count; ++i) { |
| 49 Handle<WeakCell> cell = Map::WeakCellForMap(receiver_maps->at(i)); | 49 Handle<WeakCell> cell = Map::WeakCellForMap(receiver_maps->at(i)); |
| 50 // Check map and tail call if there's a match | 50 // Check map and tail call if there's a match |
| 51 __ CmpWeakValue(map_reg, cell, scratch2()); | 51 __ CmpWeakValue(map_reg, cell, scratch2()); |
| 52 if (transitioned_maps->at(i).is_null()) { | 52 if (transitioned_maps->at(i).is_null()) { |
| 53 __ j(equal, handler_stubs->at(i), RelocInfo::CODE_TARGET); | 53 __ j(equal, handler_stubs->at(i), RelocInfo::CODE_TARGET); |
| 54 } else { | 54 } else { |
| 55 Label next_map; | 55 Label next_map; |
| 56 __ j(not_equal, &next_map, Label::kNear); | 56 __ j(not_equal, &next_map, Label::kNear); |
| 57 Handle<WeakCell> cell = Map::WeakCellForMap(transitioned_maps->at(i)); | 57 Handle<WeakCell> cell = Map::WeakCellForMap(transitioned_maps->at(i)); |
| 58 Register transition_map = scratch1(); | 58 __ LoadWeakValue(transition_map(), cell, &miss); |
| 59 DCHECK(!FLAG_vector_stores && | |
| 60 transition_map.is(StoreTransitionDescriptor::MapRegister())); | |
| 61 __ LoadWeakValue(transition_map, cell, &miss); | |
| 62 __ jmp(handler_stubs->at(i), RelocInfo::CODE_TARGET); | 59 __ jmp(handler_stubs->at(i), RelocInfo::CODE_TARGET); |
| 63 __ bind(&next_map); | 60 __ bind(&next_map); |
| 64 } | 61 } |
| 65 } | 62 } |
| 66 | 63 |
| 67 __ bind(&miss); | 64 __ bind(&miss); |
| 68 | 65 |
| 69 TailCallBuiltin(masm(), MissBuiltin(kind())); | 66 TailCallBuiltin(masm(), MissBuiltin(kind())); |
| 70 | 67 |
| 71 // Return the generated code. | 68 // Return the generated code. |
| (...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 134 number_of_handled_maps > 1 ? POLYMORPHIC : MONOMORPHIC; | 131 number_of_handled_maps > 1 ? POLYMORPHIC : MONOMORPHIC; |
| 135 return GetCode(kind(), type, name, state); | 132 return GetCode(kind(), type, name, state); |
| 136 } | 133 } |
| 137 | 134 |
| 138 | 135 |
| 139 #undef __ | 136 #undef __ |
| 140 } // namespace internal | 137 } // namespace internal |
| 141 } // namespace v8 | 138 } // namespace v8 |
| 142 | 139 |
| 143 #endif // V8_TARGET_ARCH_X64 | 140 #endif // V8_TARGET_ARCH_X64 |
| OLD | NEW |