OLD | NEW |
1 // Copyright 2015 the V8 project authors. All rights reserved. | 1 // Copyright 2015 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/compiler/js-native-context-specialization.h" | 5 #include "src/compiler/js-native-context-specialization.h" |
6 | 6 |
7 #include "src/accessors.h" | 7 #include "src/accessors.h" |
8 #include "src/code-factory.h" | 8 #include "src/code-factory.h" |
9 #include "src/compilation-dependencies.h" | 9 #include "src/compilation-dependencies.h" |
10 #include "src/compiler/access-builder.h" | 10 #include "src/compiler/access-builder.h" |
(...skipping 1263 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1274 if (nexus.IsUninitialized()) { | 1274 if (nexus.IsUninitialized()) { |
1275 return NoChange(); | 1275 return NoChange(); |
1276 } | 1276 } |
1277 | 1277 |
1278 if (nexus.ic_state() == MEGAMORPHIC) { | 1278 if (nexus.ic_state() == MEGAMORPHIC) { |
1279 return NoChange(); | 1279 return NoChange(); |
1280 } | 1280 } |
1281 | 1281 |
1282 DCHECK_EQ(MONOMORPHIC, nexus.ic_state()); | 1282 DCHECK_EQ(MONOMORPHIC, nexus.ic_state()); |
1283 | 1283 |
1284 Handle<Map> receiver_map(nexus.FindFirstMap(), isolate()); | 1284 Map* map = nexus.FindFirstMap(); |
| 1285 if (map == nullptr) { |
| 1286 // Maps are weakly held in the type feedback vector, we may not have one. |
| 1287 return NoChange(); |
| 1288 } |
| 1289 |
| 1290 Handle<Map> receiver_map(map, isolate()); |
1285 Handle<Name> cached_name = | 1291 Handle<Name> cached_name = |
1286 handle(Name::cast(nexus.GetFeedbackExtra()), isolate()); | 1292 handle(Name::cast(nexus.GetFeedbackExtra()), isolate()); |
1287 | 1293 |
1288 PropertyAccessInfo access_info; | 1294 PropertyAccessInfo access_info; |
1289 AccessInfoFactory access_info_factory(dependencies(), native_context(), | 1295 AccessInfoFactory access_info_factory(dependencies(), native_context(), |
1290 graph()->zone()); | 1296 graph()->zone()); |
1291 if (!access_info_factory.ComputePropertyAccessInfo( | 1297 if (!access_info_factory.ComputePropertyAccessInfo( |
1292 receiver_map, cached_name, AccessMode::kStoreInLiteral, | 1298 receiver_map, cached_name, AccessMode::kStoreInLiteral, |
1293 &access_info)) { | 1299 &access_info)) { |
1294 return NoChange(); | 1300 return NoChange(); |
(...skipping 611 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1906 return jsgraph()->javascript(); | 1912 return jsgraph()->javascript(); |
1907 } | 1913 } |
1908 | 1914 |
1909 SimplifiedOperatorBuilder* JSNativeContextSpecialization::simplified() const { | 1915 SimplifiedOperatorBuilder* JSNativeContextSpecialization::simplified() const { |
1910 return jsgraph()->simplified(); | 1916 return jsgraph()->simplified(); |
1911 } | 1917 } |
1912 | 1918 |
1913 } // namespace compiler | 1919 } // namespace compiler |
1914 } // namespace internal | 1920 } // namespace internal |
1915 } // namespace v8 | 1921 } // namespace v8 |
OLD | NEW |