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/ic/ic-compiler.h" | 5 #include "src/ic/ic-compiler.h" |
6 | 6 |
7 #include "src/ic/handler-compiler.h" | 7 #include "src/ic/handler-compiler.h" |
8 #include "src/ic/ic-inl.h" | 8 #include "src/ic/ic-inl.h" |
9 #include "src/profiler/cpu-profiler.h" | 9 #include "src/profiler/cpu-profiler.h" |
10 | 10 |
(...skipping 217 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
228 return code; | 228 return code; |
229 } | 229 } |
230 | 230 |
231 | 231 |
232 void PropertyICCompiler::CompileKeyedStorePolymorphicHandlers( | 232 void PropertyICCompiler::CompileKeyedStorePolymorphicHandlers( |
233 MapHandleList* receiver_maps, MapHandleList* transitioned_maps, | 233 MapHandleList* receiver_maps, MapHandleList* transitioned_maps, |
234 CodeHandleList* handlers, KeyedAccessStoreMode store_mode) { | 234 CodeHandleList* handlers, KeyedAccessStoreMode store_mode) { |
235 for (int i = 0; i < receiver_maps->length(); ++i) { | 235 for (int i = 0; i < receiver_maps->length(); ++i) { |
236 Handle<Map> receiver_map(receiver_maps->at(i)); | 236 Handle<Map> receiver_map(receiver_maps->at(i)); |
237 Handle<Code> cached_stub; | 237 Handle<Code> cached_stub; |
238 Handle<Map> transitioned_map = | 238 Handle<Map> transitioned_map; |
239 Map::FindTransitionedMap(receiver_map, receiver_maps); | 239 { |
| 240 Map* tmap = receiver_map->FindElementsKindTransitionedMap(receiver_maps); |
| 241 if (tmap != nullptr) transitioned_map = handle(tmap); |
| 242 } |
240 | 243 |
241 // TODO(mvstanton): The code below is doing pessimistic elements | 244 // TODO(mvstanton): The code below is doing pessimistic elements |
242 // transitions. I would like to stop doing that and rely on Allocation Site | 245 // transitions. I would like to stop doing that and rely on Allocation Site |
243 // Tracking to do a better job of ensuring the data types are what they need | 246 // Tracking to do a better job of ensuring the data types are what they need |
244 // to be. Not all the elements are in place yet, pessimistic elements | 247 // to be. Not all the elements are in place yet, pessimistic elements |
245 // transitions are still important for performance. | 248 // transitions are still important for performance. |
246 bool is_js_array = receiver_map->instance_type() == JS_ARRAY_TYPE; | 249 bool is_js_array = receiver_map->instance_type() == JS_ARRAY_TYPE; |
247 ElementsKind elements_kind = receiver_map->elements_kind(); | 250 ElementsKind elements_kind = receiver_map->elements_kind(); |
248 if (!transitioned_map.is_null()) { | 251 if (!transitioned_map.is_null()) { |
249 cached_stub = | 252 cached_stub = |
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
307 | 310 |
308 TailCallBuiltin(masm(), Builtins::kKeyedStoreIC_Miss); | 311 TailCallBuiltin(masm(), Builtins::kKeyedStoreIC_Miss); |
309 | 312 |
310 return GetCode(kind(), Code::NORMAL, factory()->empty_string()); | 313 return GetCode(kind(), Code::NORMAL, factory()->empty_string()); |
311 } | 314 } |
312 | 315 |
313 | 316 |
314 #undef __ | 317 #undef __ |
315 } // namespace internal | 318 } // namespace internal |
316 } // namespace v8 | 319 } // namespace v8 |
OLD | NEW |