OLD | NEW |
1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2014, 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 library dart2js.cps_ir.type_propagation; | 4 library dart2js.cps_ir.type_propagation; |
5 | 5 |
6 import 'optimizers.dart'; | 6 import 'optimizers.dart'; |
7 | 7 |
8 import '../closure.dart' show | 8 import '../closure.dart' show |
9 ClosureClassElement, Identifiers; | 9 ClosureClassElement, Identifiers; |
10 import '../common/names.dart' show | 10 import '../common/names.dart' show |
(...skipping 2493 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2504 setValue(node, nonConstant(typeSystem.elementTypeOfIndexable(input.type))); | 2504 setValue(node, nonConstant(typeSystem.elementTypeOfIndexable(input.type))); |
2505 } | 2505 } |
2506 | 2506 |
2507 @override | 2507 @override |
2508 void visitSetIndex(SetIndex node) { | 2508 void visitSetIndex(SetIndex node) { |
2509 setValue(node, nonConstant()); | 2509 setValue(node, nonConstant()); |
2510 } | 2510 } |
2511 | 2511 |
2512 @override | 2512 @override |
2513 void visitAwait(Await node) { | 2513 void visitAwait(Await node) { |
2514 Continuation continuation = node.continuation.definition; | 2514 setResult(node, nonConstant()); |
2515 setReachable(continuation); | |
2516 } | 2515 } |
2517 | 2516 |
2518 @override | 2517 @override |
2519 void visitRefinement(Refinement node) { | 2518 void visitRefinement(Refinement node) { |
2520 AbstractValue value = getValue(node.value.definition); | 2519 AbstractValue value = getValue(node.value.definition); |
2521 if (value.isNothing || | 2520 if (value.isNothing || |
2522 typeSystem.areDisjoint(value.type, node.refineType)) { | 2521 typeSystem.areDisjoint(value.type, node.refineType)) { |
2523 setValue(node, nothing); | 2522 setValue(node, nothing); |
2524 } else if (value.isConstant) { | 2523 } else if (value.isConstant) { |
2525 setValue(node, value); | 2524 setValue(node, value); |
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2641 processLetPrim(LetPrim node) { | 2640 processLetPrim(LetPrim node) { |
2642 node.primitive.type = null; | 2641 node.primitive.type = null; |
2643 values[node.primitive] = null; | 2642 values[node.primitive] = null; |
2644 } | 2643 } |
2645 | 2644 |
2646 processLetMutable(LetMutable node) { | 2645 processLetMutable(LetMutable node) { |
2647 node.variable.type = null; | 2646 node.variable.type = null; |
2648 values[node.variable] = null; | 2647 values[node.variable] = null; |
2649 } | 2648 } |
2650 } | 2649 } |
OLD | NEW |