OLD | NEW |
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file |
2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
4 | 4 |
5 #include "vm/flow_graph_optimizer.h" | 5 #include "vm/flow_graph_optimizer.h" |
6 | 6 |
7 #include "vm/bit_vector.h" | 7 #include "vm/bit_vector.h" |
8 #include "vm/cha.h" | 8 #include "vm/cha.h" |
9 #include "vm/flow_graph_builder.h" | 9 #include "vm/flow_graph_builder.h" |
10 #include "vm/flow_graph_compiler.h" | 10 #include "vm/flow_graph_compiler.h" |
(...skipping 1485 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1496 Function& target = Function::Handle(ic_data.GetTargetAt(0)); | 1496 Function& target = Function::Handle(ic_data.GetTargetAt(0)); |
1497 if (target.kind() == RawFunction::kImplicitGetter) { | 1497 if (target.kind() == RawFunction::kImplicitGetter) { |
1498 if (!ic_data.HasOneTarget()) { | 1498 if (!ic_data.HasOneTarget()) { |
1499 // TODO(srdjan): Implement for mutiple targets. | 1499 // TODO(srdjan): Implement for mutiple targets. |
1500 return false; | 1500 return false; |
1501 } | 1501 } |
1502 InlineImplicitInstanceGetter(call); | 1502 InlineImplicitInstanceGetter(call); |
1503 return true; | 1503 return true; |
1504 } else if (target.kind() == RawFunction::kMethodExtractor) { | 1504 } else if (target.kind() == RawFunction::kMethodExtractor) { |
1505 return false; | 1505 return false; |
| 1506 } else if (target.kind() == RawFunction::kNoSuchMethodDispatcher) { |
| 1507 return false; |
1506 } | 1508 } |
1507 | 1509 |
1508 // Not an implicit getter. | 1510 // Not an implicit getter. |
1509 MethodRecognizer::Kind recognized_kind = | 1511 MethodRecognizer::Kind recognized_kind = |
1510 MethodRecognizer::RecognizeKind(target); | 1512 MethodRecognizer::RecognizeKind(target); |
1511 | 1513 |
1512 // VM objects length getter. | 1514 // VM objects length getter. |
1513 switch (recognized_kind) { | 1515 switch (recognized_kind) { |
1514 case MethodRecognizer::kObjectCid: { | 1516 case MethodRecognizer::kObjectCid: { |
1515 InlineObjectCid(call); | 1517 InlineObjectCid(call); |
(...skipping 5055 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6571 | 6573 |
6572 // Insert materializations at environment uses. | 6574 // Insert materializations at environment uses. |
6573 const Class& cls = Class::Handle(alloc->constructor().Owner()); | 6575 const Class& cls = Class::Handle(alloc->constructor().Owner()); |
6574 for (intptr_t i = 0; i < exits.length(); i++) { | 6576 for (intptr_t i = 0; i < exits.length(); i++) { |
6575 CreateMaterializationAt(exits[i], alloc, cls, *fields); | 6577 CreateMaterializationAt(exits[i], alloc, cls, *fields); |
6576 } | 6578 } |
6577 } | 6579 } |
6578 | 6580 |
6579 | 6581 |
6580 } // namespace dart | 6582 } // namespace dart |
OLD | NEW |