| 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 | 4 |
| 5 library engine.resolver; | 5 library engine.resolver; |
| 6 | 6 |
| 7 import "dart:math" as math; | 7 import "dart:math" as math; |
| 8 import 'dart:collection'; | 8 import 'dart:collection'; |
| 9 | 9 |
| 10 import 'package:analyzer/src/generated/utilities_collection.dart'; | 10 import 'package:analyzer/src/generated/utilities_collection.dart'; |
| (...skipping 3889 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3900 bool visitAsExpression(AsExpression node) => _nodeExits(node.expression); | 3900 bool visitAsExpression(AsExpression node) => _nodeExits(node.expression); |
| 3901 | 3901 |
| 3902 @override | 3902 @override |
| 3903 bool visitAssertStatement(AssertStatement node) => _nodeExits(node.condition); | 3903 bool visitAssertStatement(AssertStatement node) => _nodeExits(node.condition); |
| 3904 | 3904 |
| 3905 @override | 3905 @override |
| 3906 bool visitAssignmentExpression(AssignmentExpression node) => | 3906 bool visitAssignmentExpression(AssignmentExpression node) => |
| 3907 _nodeExits(node.leftHandSide) || _nodeExits(node.rightHandSide); | 3907 _nodeExits(node.leftHandSide) || _nodeExits(node.rightHandSide); |
| 3908 | 3908 |
| 3909 @override | 3909 @override |
| 3910 bool visitAwaitExpression(AwaitExpression node) => |
| 3911 _nodeExits(node.expression); |
| 3912 |
| 3913 @override |
| 3910 bool visitBinaryExpression(BinaryExpression node) { | 3914 bool visitBinaryExpression(BinaryExpression node) { |
| 3911 Expression lhsExpression = node.leftOperand; | 3915 Expression lhsExpression = node.leftOperand; |
| 3912 sc.TokenType operatorType = node.operator.type; | 3916 sc.TokenType operatorType = node.operator.type; |
| 3913 // If the operator is || and the left hand side is false literal, don't | 3917 // If the operator is || and the left hand side is false literal, don't |
| 3914 // consider the RHS of the binary expression. | 3918 // consider the RHS of the binary expression. |
| 3915 // TODO(jwren) Do we want to take constant expressions into account, | 3919 // TODO(jwren) Do we want to take constant expressions into account, |
| 3916 // evaluate if(false) {} differently than if(<condition>), when <condition> | 3920 // evaluate if(false) {} differently than if(<condition>), when <condition> |
| 3917 // evaluates to a constant false value? | 3921 // evaluates to a constant false value? |
| 3918 if (operatorType == sc.TokenType.BAR_BAR) { | 3922 if (operatorType == sc.TokenType.BAR_BAR) { |
| 3919 if (lhsExpression is BooleanLiteral) { | 3923 if (lhsExpression is BooleanLiteral) { |
| (...skipping 11751 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 15671 * library. | 15675 * library. |
| 15672 */ | 15676 */ |
| 15673 final HashSet<String> members = new HashSet<String>(); | 15677 final HashSet<String> members = new HashSet<String>(); |
| 15674 | 15678 |
| 15675 /** | 15679 /** |
| 15676 * Names of resolved or unresolved class members that are read in the | 15680 * Names of resolved or unresolved class members that are read in the |
| 15677 * library. | 15681 * library. |
| 15678 */ | 15682 */ |
| 15679 final HashSet<String> readMembers = new HashSet<String>(); | 15683 final HashSet<String> readMembers = new HashSet<String>(); |
| 15680 } | 15684 } |
| OLD | NEW |