OLD | NEW |
1 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2016, 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/globals.h" // Needed here to get TARGET_ARCH_DBC. | 5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_DBC. |
6 #if defined(TARGET_ARCH_DBC) | 6 #if defined(TARGET_ARCH_DBC) |
7 | 7 |
8 #include "vm/flow_graph_compiler.h" | 8 #include "vm/flow_graph_compiler.h" |
9 | 9 |
10 #include "vm/ast_printer.h" | 10 #include "vm/ast_printer.h" |
(...skipping 204 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
215 | 215 |
216 | 216 |
217 void FlowGraphCompiler::GenerateAssertAssignable(TokenPosition token_pos, | 217 void FlowGraphCompiler::GenerateAssertAssignable(TokenPosition token_pos, |
218 intptr_t deopt_id, | 218 intptr_t deopt_id, |
219 const AbstractType& dst_type, | 219 const AbstractType& dst_type, |
220 const String& dst_name, | 220 const String& dst_name, |
221 LocationSummary* locs) { | 221 LocationSummary* locs) { |
222 SubtypeTestCache& test_cache = SubtypeTestCache::Handle(); | 222 SubtypeTestCache& test_cache = SubtypeTestCache::Handle(); |
223 if (!dst_type.IsVoidType() && dst_type.IsInstantiated()) { | 223 if (!dst_type.IsVoidType() && dst_type.IsInstantiated()) { |
224 test_cache = SubtypeTestCache::New(); | 224 test_cache = SubtypeTestCache::New(); |
| 225 } else if (!dst_type.IsInstantiated() && |
| 226 (dst_type.IsTypeParameter() || dst_type.IsType())) { |
| 227 test_cache = SubtypeTestCache::New(); |
225 } | 228 } |
226 | 229 |
227 if (is_optimizing()) { | 230 if (is_optimizing()) { |
228 __ Push(locs->in(0).reg()); | 231 __ Push(locs->in(0).reg()); |
229 __ Push(locs->in(1).reg()); | 232 __ Push(locs->in(1).reg()); |
230 } | 233 } |
231 __ PushConstant(dst_type); | 234 __ PushConstant(dst_type); |
232 __ PushConstant(dst_name); | 235 __ PushConstant(dst_name); |
233 | 236 |
234 if (dst_type.IsMalformedOrMalbounded()) { | 237 if (dst_type.IsMalformedOrMalbounded()) { |
(...skipping 322 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
557 void ParallelMoveResolver::RestoreFpuScratch(FpuRegister reg) { | 560 void ParallelMoveResolver::RestoreFpuScratch(FpuRegister reg) { |
558 UNIMPLEMENTED(); | 561 UNIMPLEMENTED(); |
559 } | 562 } |
560 | 563 |
561 | 564 |
562 #undef __ | 565 #undef __ |
563 | 566 |
564 } // namespace dart | 567 } // namespace dart |
565 | 568 |
566 #endif // defined TARGET_ARCH_DBC | 569 #endif // defined TARGET_ARCH_DBC |
OLD | NEW |