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 227 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
238 AccessInfoFactory access_info_factory(dependencies(), native_context(), | 238 AccessInfoFactory access_info_factory(dependencies(), native_context(), |
239 graph()->zone()); | 239 graph()->zone()); |
240 ZoneVector<PropertyAccessInfo> access_infos(zone()); | 240 ZoneVector<PropertyAccessInfo> access_infos(zone()); |
241 if (!access_info_factory.ComputePropertyAccessInfos( | 241 if (!access_info_factory.ComputePropertyAccessInfos( |
242 receiver_maps, name, access_mode, &access_infos)) { | 242 receiver_maps, name, access_mode, &access_infos)) { |
243 return NoChange(); | 243 return NoChange(); |
244 } | 244 } |
245 | 245 |
246 // TODO(turbofan): Add support for inlining into try blocks. | 246 // TODO(turbofan): Add support for inlining into try blocks. |
247 bool is_exceptional = NodeProperties::IsExceptionalCall(node); | 247 bool is_exceptional = NodeProperties::IsExceptionalCall(node); |
248 for (auto access_info : access_infos) { | 248 for (const auto& access_info : access_infos) { |
249 if (access_info.IsAccessorConstant()) { | 249 if (access_info.IsAccessorConstant()) { |
250 // Accessor in try-blocks are not supported yet. | 250 // Accessor in try-blocks are not supported yet. |
251 if (is_exceptional || !(flags() & kAccessorInliningEnabled)) { | 251 if (is_exceptional || !(flags() & kAccessorInliningEnabled)) { |
252 return NoChange(); | 252 return NoChange(); |
253 } | 253 } |
254 } else if (access_info.IsGeneric()) { | 254 } else if (access_info.IsGeneric()) { |
255 // We do not handle generic calls in try blocks. | 255 // We do not handle generic calls in try blocks. |
256 if (is_exceptional) return NoChange(); | 256 if (is_exceptional) return NoChange(); |
257 // We only handle the generic store IC case. | 257 // We only handle the generic store IC case. |
258 if (vector->GetKind(slot) != FeedbackVectorSlotKind::STORE_IC) { | 258 if (vector->GetKind(slot) != FeedbackVectorSlotKind::STORE_IC) { |
(...skipping 1570 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1829 return jsgraph()->javascript(); | 1829 return jsgraph()->javascript(); |
1830 } | 1830 } |
1831 | 1831 |
1832 SimplifiedOperatorBuilder* JSNativeContextSpecialization::simplified() const { | 1832 SimplifiedOperatorBuilder* JSNativeContextSpecialization::simplified() const { |
1833 return jsgraph()->simplified(); | 1833 return jsgraph()->simplified(); |
1834 } | 1834 } |
1835 | 1835 |
1836 } // namespace compiler | 1836 } // namespace compiler |
1837 } // namespace internal | 1837 } // namespace internal |
1838 } // namespace v8 | 1838 } // namespace v8 |
OLD | NEW |