| OLD | NEW |
| 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, 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 part of resolution; | 5 part of resolution; |
| 6 | 6 |
| 7 abstract class TreeElements { | 7 abstract class TreeElements { |
| 8 AnalyzableElement get analyzedElement; | 8 AnalyzableElement get analyzedElement; |
| 9 Iterable<Node> get superUses; | 9 Iterable<Node> get superUses; |
| 10 | 10 |
| (...skipping 3342 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3353 } | 3353 } |
| 3354 | 3354 |
| 3355 visitWhile(While node) { | 3355 visitWhile(While node) { |
| 3356 visit(node.condition); | 3356 visit(node.condition); |
| 3357 visitLoopBodyIn(node, node.body, new BlockScope(scope)); | 3357 visitLoopBodyIn(node, node.body, new BlockScope(scope)); |
| 3358 } | 3358 } |
| 3359 | 3359 |
| 3360 visitParenthesizedExpression(ParenthesizedExpression node) { | 3360 visitParenthesizedExpression(ParenthesizedExpression node) { |
| 3361 bool oldSendIsMemberAccess = sendIsMemberAccess; | 3361 bool oldSendIsMemberAccess = sendIsMemberAccess; |
| 3362 sendIsMemberAccess = false; | 3362 sendIsMemberAccess = false; |
| 3363 var oldCategory = allowedCategory; |
| 3364 allowedCategory = ElementCategory.VARIABLE | ElementCategory.FUNCTION |
| 3365 | ElementCategory.IMPLIES_TYPE; |
| 3363 visit(node.expression); | 3366 visit(node.expression); |
| 3367 allowedCategory = oldCategory; |
| 3364 sendIsMemberAccess = oldSendIsMemberAccess; | 3368 sendIsMemberAccess = oldSendIsMemberAccess; |
| 3365 } | 3369 } |
| 3366 | 3370 |
| 3367 ResolutionResult visitNewExpression(NewExpression node) { | 3371 ResolutionResult visitNewExpression(NewExpression node) { |
| 3368 Node selector = node.send.selector; | 3372 Node selector = node.send.selector; |
| 3369 FunctionElement constructor = resolveConstructor(node); | 3373 FunctionElement constructor = resolveConstructor(node); |
| 3370 final bool isSymbolConstructor = constructor == compiler.symbolConstructor; | 3374 final bool isSymbolConstructor = constructor == compiler.symbolConstructor; |
| 3371 final bool isMirrorsUsedConstant = | 3375 final bool isMirrorsUsedConstant = |
| 3372 node.isConst && (constructor == compiler.mirrorsUsedConstructor); | 3376 node.isConst && (constructor == compiler.mirrorsUsedConstructor); |
| 3373 Selector callSelector = resolveSelector(node.send, constructor); | 3377 Selector callSelector = resolveSelector(node.send, constructor); |
| (...skipping 1792 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5166 } | 5170 } |
| 5167 | 5171 |
| 5168 /// The result for the resolution of the `assert` method. | 5172 /// The result for the resolution of the `assert` method. |
| 5169 class AssertResult implements ResolutionResult { | 5173 class AssertResult implements ResolutionResult { |
| 5170 const AssertResult(); | 5174 const AssertResult(); |
| 5171 | 5175 |
| 5172 Element get element => null; | 5176 Element get element => null; |
| 5173 | 5177 |
| 5174 String toString() => 'AssertResult()'; | 5178 String toString() => 'AssertResult()'; |
| 5175 } | 5179 } |
| OLD | NEW |