| 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 1487 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1498 Function& target = Function::Handle(ic_data.GetTargetAt(0)); | 1498 Function& target = Function::Handle(ic_data.GetTargetAt(0)); |
| 1499 if (target.kind() == RawFunction::kImplicitGetter) { | 1499 if (target.kind() == RawFunction::kImplicitGetter) { |
| 1500 if (!ic_data.HasOneTarget()) { | 1500 if (!ic_data.HasOneTarget()) { |
| 1501 // TODO(srdjan): Implement for mutiple targets. | 1501 // TODO(srdjan): Implement for mutiple targets. |
| 1502 return false; | 1502 return false; |
| 1503 } | 1503 } |
| 1504 InlineImplicitInstanceGetter(call); | 1504 InlineImplicitInstanceGetter(call); |
| 1505 return true; | 1505 return true; |
| 1506 } else if (target.kind() == RawFunction::kMethodExtractor) { | 1506 } else if (target.kind() == RawFunction::kMethodExtractor) { |
| 1507 return false; | 1507 return false; |
| 1508 } else if (target.kind() == RawFunction::kNoSuchMethodDispatcher) { |
| 1509 return false; |
| 1508 } | 1510 } |
| 1509 | 1511 |
| 1510 // Not an implicit getter. | 1512 // Not an implicit getter. |
| 1511 MethodRecognizer::Kind recognized_kind = | 1513 MethodRecognizer::Kind recognized_kind = |
| 1512 MethodRecognizer::RecognizeKind(target); | 1514 MethodRecognizer::RecognizeKind(target); |
| 1513 | 1515 |
| 1514 // VM objects length getter. | 1516 // VM objects length getter. |
| 1515 switch (recognized_kind) { | 1517 switch (recognized_kind) { |
| 1516 case MethodRecognizer::kObjectCid: { | 1518 case MethodRecognizer::kObjectCid: { |
| 1517 InlineObjectCid(call); | 1519 InlineObjectCid(call); |
| (...skipping 5059 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6577 | 6579 |
| 6578 // Insert materializations at environment uses. | 6580 // Insert materializations at environment uses. |
| 6579 const Class& cls = Class::Handle(alloc->constructor().Owner()); | 6581 const Class& cls = Class::Handle(alloc->constructor().Owner()); |
| 6580 for (intptr_t i = 0; i < exits.length(); i++) { | 6582 for (intptr_t i = 0; i < exits.length(); i++) { |
| 6581 CreateMaterializationAt(exits[i], alloc, cls, *fields); | 6583 CreateMaterializationAt(exits[i], alloc, cls, *fields); |
| 6582 } | 6584 } |
| 6583 } | 6585 } |
| 6584 | 6586 |
| 6585 | 6587 |
| 6586 } // namespace dart | 6588 } // namespace dart |
| OLD | NEW |