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/compiler/js-inlining.h" | 5 #include "src/compiler/js-inlining.h" |
6 | 6 |
7 #include "src/ast/ast.h" | 7 #include "src/ast/ast.h" |
8 #include "src/compilation-info.h" | 8 #include "src/compilation-info.h" |
9 #include "src/compiler.h" | 9 #include "src/compiler.h" |
10 #include "src/compiler/all-nodes.h" | 10 #include "src/compiler/all-nodes.h" |
(...skipping 294 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
305 case IrOpcode::kJSCreateKeyValueArray: | 305 case IrOpcode::kJSCreateKeyValueArray: |
306 case IrOpcode::kJSCreateLiteralArray: | 306 case IrOpcode::kJSCreateLiteralArray: |
307 case IrOpcode::kJSCreateLiteralObject: | 307 case IrOpcode::kJSCreateLiteralObject: |
308 case IrOpcode::kJSCreateLiteralRegExp: | 308 case IrOpcode::kJSCreateLiteralRegExp: |
309 case IrOpcode::kJSConvertReceiver: | 309 case IrOpcode::kJSConvertReceiver: |
310 case IrOpcode::kJSGetSuperConstructor: | 310 case IrOpcode::kJSGetSuperConstructor: |
311 case IrOpcode::kJSToObject: { | 311 case IrOpcode::kJSToObject: { |
312 return false; | 312 return false; |
313 } | 313 } |
314 default: { | 314 default: { |
| 315 // We don't really care about the exact maps here, just the instance |
| 316 // types, which don't change across potential side-effecting operations. |
315 ZoneHandleSet<Map> maps; | 317 ZoneHandleSet<Map> maps; |
316 if (NodeProperties::InferReceiverMaps(receiver, effect, &maps)) { | 318 NodeProperties::InferReceiverMapsResult result = |
| 319 NodeProperties::InferReceiverMaps(receiver, effect, &maps); |
| 320 if (result != NodeProperties::kNoReceiverMaps) { |
317 // Check if all {maps} are actually JSReceiver maps. | 321 // Check if all {maps} are actually JSReceiver maps. |
318 for (size_t i = 0; i < maps.size(); ++i) { | 322 for (size_t i = 0; i < maps.size(); ++i) { |
319 if (!maps[i]->IsJSReceiverMap()) return true; | 323 if (!maps[i]->IsJSReceiverMap()) return true; |
320 } | 324 } |
321 return false; | 325 return false; |
322 } | 326 } |
323 return true; | 327 return true; |
324 } | 328 } |
325 } | 329 } |
326 } | 330 } |
(...skipping 399 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
726 | 730 |
727 CommonOperatorBuilder* JSInliner::common() const { return jsgraph()->common(); } | 731 CommonOperatorBuilder* JSInliner::common() const { return jsgraph()->common(); } |
728 | 732 |
729 SimplifiedOperatorBuilder* JSInliner::simplified() const { | 733 SimplifiedOperatorBuilder* JSInliner::simplified() const { |
730 return jsgraph()->simplified(); | 734 return jsgraph()->simplified(); |
731 } | 735 } |
732 | 736 |
733 } // namespace compiler | 737 } // namespace compiler |
734 } // namespace internal | 738 } // namespace internal |
735 } // namespace v8 | 739 } // namespace v8 |
OLD | NEW |