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/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 1188 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1199 if (dst_type().IsInstantiated()) return this; | 1199 if (dst_type().IsInstantiated()) return this; |
1200 | 1200 |
1201 ConstantInstr* constant_type_args = | 1201 ConstantInstr* constant_type_args = |
1202 instantiator_type_arguments()->definition()->AsConstant(); | 1202 instantiator_type_arguments()->definition()->AsConstant(); |
1203 if (constant_type_args != NULL && | 1203 if (constant_type_args != NULL && |
1204 !constant_type_args->value().IsNull() && | 1204 !constant_type_args->value().IsNull() && |
1205 constant_type_args->value().IsTypeArguments()) { | 1205 constant_type_args->value().IsTypeArguments()) { |
1206 const TypeArguments& instantiator_type_args = | 1206 const TypeArguments& instantiator_type_args = |
1207 TypeArguments::Cast(constant_type_args->value()); | 1207 TypeArguments::Cast(constant_type_args->value()); |
1208 const AbstractType& new_dst_type = AbstractType::Handle( | 1208 const AbstractType& new_dst_type = AbstractType::Handle( |
1209 dst_type().InstantiateFrom(instantiator_type_args)); | 1209 dst_type().InstantiateFrom(instantiator_type_args, NULL)); |
1210 set_dst_type(AbstractType::ZoneHandle(new_dst_type.Canonicalize())); | 1210 set_dst_type(AbstractType::ZoneHandle(new_dst_type.Canonicalize())); |
1211 ConstantInstr* null_constant = new ConstantInstr(Object::ZoneHandle()); | 1211 ConstantInstr* null_constant = new ConstantInstr(Object::ZoneHandle()); |
1212 // It is ok to insert instructions before the current during | 1212 // It is ok to insert instructions before the current during |
1213 // forward iteration. | 1213 // forward iteration. |
1214 optimizer->InsertBefore(this, null_constant, NULL, Definition::kValue); | 1214 optimizer->InsertBefore(this, null_constant, NULL, Definition::kValue); |
1215 instantiator_type_arguments()->BindTo(null_constant); | 1215 instantiator_type_arguments()->BindTo(null_constant); |
1216 } | 1216 } |
1217 return this; | 1217 return this; |
1218 } | 1218 } |
1219 | 1219 |
(...skipping 1052 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2272 default: | 2272 default: |
2273 UNREACHABLE(); | 2273 UNREACHABLE(); |
2274 } | 2274 } |
2275 return kPowRuntimeEntry; | 2275 return kPowRuntimeEntry; |
2276 } | 2276 } |
2277 | 2277 |
2278 | 2278 |
2279 #undef __ | 2279 #undef __ |
2280 | 2280 |
2281 } // namespace dart | 2281 } // namespace dart |
OLD | NEW |