| 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 | 10 import 'package:compiler/compiler_new.dart' show |
| 11 Diagnostic; | 11 Diagnostic; |
| 12 import 'package:compiler/src/apiimpl.dart' show | 12 import 'package:compiler/src/apiimpl.dart' show |
| 13 Compiler; | 13 CompilerImpl; |
| 14 import 'package:compiler/src/commandline_options.dart'; | 14 import 'package:compiler/src/commandline_options.dart'; |
| 15 import 'package:compiler/src/constants/expressions.dart' show | 15 import 'package:compiler/src/constants/expressions.dart' show |
| 16 ConstructedConstantExpression; | 16 ConstructedConstantExpression; |
| 17 import 'package:compiler/src/dart_types.dart' show | 17 import 'package:compiler/src/dart_types.dart' show |
| 18 InterfaceType; | 18 InterfaceType; |
| 19 import 'package:compiler/src/diagnostics/source_span.dart' show | 19 import 'package:compiler/src/diagnostics/source_span.dart' show |
| 20 SourceSpan; | 20 SourceSpan; |
| 21 import 'package:compiler/src/elements/elements.dart'; | 21 import 'package:compiler/src/elements/elements.dart'; |
| 22 import 'package:compiler/src/filenames.dart' show | 22 import 'package:compiler/src/filenames.dart' show |
| 23 nativeToUriPath; | 23 nativeToUriPath; |
| (...skipping 13 matching lines...) Expand all Loading... |
| 37 bool verbose = arguments.contains('-v'); | 37 bool verbose = arguments.contains('-v'); |
| 38 | 38 |
| 39 List<String> options = <String>[ | 39 List<String> options = <String>[ |
| 40 Flags.analyzeOnly, | 40 Flags.analyzeOnly, |
| 41 Flags.analyzeMain, | 41 Flags.analyzeMain, |
| 42 '--categories=Client,Server']; | 42 '--categories=Client,Server']; |
| 43 if (verbose) { | 43 if (verbose) { |
| 44 options.add(Flags.verbose); | 44 options.add(Flags.verbose); |
| 45 } | 45 } |
| 46 asyncTest(() async { | 46 asyncTest(() async { |
| 47 Compiler compiler = compilerFor( | 47 CompilerImpl compiler = compilerFor( |
| 48 options: options, showDiagnostics: verbose); | 48 options: options, showDiagnostics: verbose); |
| 49 FormattingDiagnosticHandler diagnostics = | 49 FormattingDiagnosticHandler diagnostics = |
| 50 new FormattingDiagnosticHandler(compiler.provider); | 50 new FormattingDiagnosticHandler(compiler.provider); |
| 51 HelperAnalyzer analyzer = new HelperAnalyzer(diagnostics); | 51 HelperAnalyzer analyzer = new HelperAnalyzer(diagnostics); |
| 52 Directory dir = | 52 Directory dir = |
| 53 new Directory.fromUri(Uri.base.resolve('pkg/compiler/lib/')); | 53 new Directory.fromUri(Uri.base.resolve('pkg/compiler/lib/')); |
| 54 for (FileSystemEntity entity in dir.listSync(recursive: true)) { | 54 for (FileSystemEntity entity in dir.listSync(recursive: true)) { |
| 55 if (entity is File && entity.path.endsWith('.dart')) { | 55 if (entity is File && entity.path.endsWith('.dart')) { |
| 56 Uri file = Uri.base.resolve(nativeToUriPath(entity.path)); | 56 Uri file = Uri.base.resolve(nativeToUriPath(entity.path)); |
| 57 if (verbose) { | 57 if (verbose) { |
| (...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 227 } | 227 } |
| 228 | 228 |
| 229 @override | 229 @override |
| 230 void visitConstConstructorInvoke( | 230 void visitConstConstructorInvoke( |
| 231 NewExpression node, | 231 NewExpression node, |
| 232 ConstructedConstantExpression constant, | 232 ConstructedConstantExpression constant, |
| 233 _) { | 233 _) { |
| 234 checkAccess(node, constant.target); | 234 checkAccess(node, constant.target); |
| 235 } | 235 } |
| 236 } | 236 } |
| OLD | NEW |