| OLD | NEW |
| 1 library dart2js.cps_ir.backward_null_check_remover; | 1 library dart2js.cps_ir.backward_null_check_remover; |
| 2 | 2 |
| 3 import 'cps_fragment.dart'; |
| 3 import 'cps_ir_nodes.dart'; | 4 import 'cps_ir_nodes.dart'; |
| 4 import 'optimizers.dart'; | 5 import 'optimizers.dart'; |
| 5 import 'type_mask_system.dart'; | 6 import 'type_mask_system.dart'; |
| 6 import 'cps_fragment.dart'; | |
| 7 | 7 |
| 8 /// Removes null checks that are follwed by another instruction that will | 8 /// Removes null checks that are follwed by another instruction that will |
| 9 /// perform the same check. | 9 /// perform the same check. |
| 10 /// | 10 /// |
| 11 /// For example: | 11 /// For example: |
| 12 /// | 12 /// |
| 13 /// x.toString; // NullCheck instruction | 13 /// x.toString; // NullCheck instruction |
| 14 /// print(x.length); | 14 /// print(x.length); |
| 15 /// | 15 /// |
| 16 /// ==> | 16 /// ==> |
| (...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 119 void visitLetHandler(LetHandler node) { | 119 void visitLetHandler(LetHandler node) { |
| 120 nullCheckedValue = null; | 120 nullCheckedValue = null; |
| 121 } | 121 } |
| 122 | 122 |
| 123 visitInvokeContinuation(InvokeContinuation node) { | 123 visitInvokeContinuation(InvokeContinuation node) { |
| 124 if (!node.isRecursive) { | 124 if (!node.isRecursive) { |
| 125 nullCheckedValue = nullCheckedValueAt[node.continuation]; | 125 nullCheckedValue = nullCheckedValueAt[node.continuation]; |
| 126 } | 126 } |
| 127 } | 127 } |
| 128 } | 128 } |
| OLD | NEW |