| OLD | NEW |
| 1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2015, 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 dart2js.analyze_helpers.test; | 5 library dart2js.analyze_helpers.test; |
| 6 | 6 |
| 7 import 'dart:io'; | 7 import 'dart:io'; |
| 8 | 8 |
| 9 import 'package:async_helper/async_helper.dart'; | 9 import 'package:async_helper/async_helper.dart'; |
| 10 import 'package:compiler/compiler_new.dart' show Diagnostic; | 10 import 'package:compiler/compiler_new.dart' show Diagnostic; |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 54 if (verbose) { | 54 if (verbose) { |
| 55 print('---- analyzing $file ----'); | 55 print('---- analyzing $file ----'); |
| 56 } | 56 } |
| 57 LibraryElement library = await compiler.analyzeUri(file); | 57 LibraryElement library = await compiler.analyzeUri(file); |
| 58 if (library != null) { | 58 if (library != null) { |
| 59 if (library.libraryName == 'dart2js.helpers') { | 59 if (library.libraryName == 'dart2js.helpers') { |
| 60 helperLibrary = library; | 60 helperLibrary = library; |
| 61 } | 61 } |
| 62 library.forEachLocalMember((Element element) { | 62 library.forEachLocalMember((Element element) { |
| 63 if (element is ClassElement) { | 63 if (element is ClassElement) { |
| 64 element.forEachLocalMember((AstElement member) { | 64 element.forEachLocalMember((_member) { |
| 65 AstElement member = _member; |
| 65 analyzer.analyze(member.resolvedAst); | 66 analyzer.analyze(member.resolvedAst); |
| 66 }); | 67 }); |
| 67 } else if (element is MemberElement) { | 68 } else if (element is MemberElement) { |
| 68 analyzer.analyze(element.resolvedAst); | 69 analyzer.analyze(element.resolvedAst); |
| 69 } | 70 } |
| 70 }); | 71 }); |
| 71 } | 72 } |
| 72 } | 73 } |
| 73 } | 74 } |
| 74 Expect.isNotNull(helperLibrary, 'Helper library not found'); | 75 Expect.isNotNull(helperLibrary, 'Helper library not found'); |
| (...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 208 apply(arguments); | 209 apply(arguments); |
| 209 } | 210 } |
| 210 | 211 |
| 211 @override | 212 @override |
| 212 void visitConstConstructorInvoke( | 213 void visitConstConstructorInvoke( |
| 213 NewExpression node, ConstructedConstantExpression constant, _) { | 214 NewExpression node, ConstructedConstantExpression constant, _) { |
| 214 ConstructorElement constructor = constant.target; | 215 ConstructorElement constructor = constant.target; |
| 215 checkAccess(node, constructor); | 216 checkAccess(node, constructor); |
| 216 } | 217 } |
| 217 } | 218 } |
| OLD | NEW |