| OLD | NEW |
| 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, 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/intermediate_language.h" | 5 #include "vm/intermediate_language.h" |
| 6 | 6 |
| 7 #include "vm/bit_vector.h" | 7 #include "vm/bit_vector.h" |
| 8 #include "vm/dart_entry.h" | 8 #include "vm/dart_entry.h" |
| 9 #include "vm/flow_graph_allocator.h" | 9 #include "vm/flow_graph_allocator.h" |
| 10 #include "vm/flow_graph_builder.h" | 10 #include "vm/flow_graph_builder.h" |
| (...skipping 724 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 735 // The compile type may be requested when building the flow graph, i.e. before | 735 // The compile type may be requested when building the flow graph, i.e. before |
| 736 // type propagation has occurred. To avoid repeatedly computing the compile | 736 // type propagation has occurred. To avoid repeatedly computing the compile |
| 737 // type of the definition, we store it as initial propagated type. | 737 // type of the definition, we store it as initial propagated type. |
| 738 AbstractType& type = AbstractType::Handle(definition()->CompileType()); | 738 AbstractType& type = AbstractType::Handle(definition()->CompileType()); |
| 739 definition()->SetPropagatedType(type); | 739 definition()->SetPropagatedType(type); |
| 740 return type.raw(); | 740 return type.raw(); |
| 741 } | 741 } |
| 742 | 742 |
| 743 | 743 |
| 744 intptr_t Value::ResultCid() const { | 744 intptr_t Value::ResultCid() const { |
| 745 return definition()->GetPropagatedCid(); | 745 if (reaching_cid() == kIllegalCid) { |
| 746 return definition()->GetPropagatedCid(); |
| 747 } |
| 748 return reaching_cid(); |
| 746 } | 749 } |
| 747 | 750 |
| 748 | 751 |
| 749 | 752 |
| 750 RawAbstractType* ConstantInstr::CompileType() const { | 753 RawAbstractType* ConstantInstr::CompileType() const { |
| 751 if (value().IsNull()) { | 754 if (value().IsNull()) { |
| 752 return Type::NullType(); | 755 return Type::NullType(); |
| 753 } | 756 } |
| 754 if (value().IsInstance()) { | 757 if (value().IsInstance()) { |
| 755 return Instance::Cast(value()).GetType(); | 758 return Instance::Cast(value()).GetType(); |
| (...skipping 907 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1663 value->set_use_index(use_index++); | 1666 value->set_use_index(use_index++); |
| 1664 value->AddToEnvUseList(); | 1667 value->AddToEnvUseList(); |
| 1665 } | 1668 } |
| 1666 instr->set_env(copy); | 1669 instr->set_env(copy); |
| 1667 } | 1670 } |
| 1668 | 1671 |
| 1669 | 1672 |
| 1670 #undef __ | 1673 #undef __ |
| 1671 | 1674 |
| 1672 } // namespace dart | 1675 } // namespace dart |
| OLD | NEW |