| OLD | NEW |
| 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2013, 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.test.memory_compiler; | 5 library dart2js.test.memory_compiler; |
| 6 | 6 |
| 7 import 'dart:async'; | 7 import 'dart:async'; |
| 8 | 8 |
| 9 import 'package:compiler/compiler.dart' show | 9 import 'package:compiler/compiler.dart' show |
| 10 DiagnosticHandler; | 10 DiagnosticHandler; |
| (...skipping 22 matching lines...) Expand all Loading... |
| 33 final Message message; | 33 final Message message; |
| 34 final Uri uri; | 34 final Uri uri; |
| 35 final int begin; | 35 final int begin; |
| 36 final int end; | 36 final int end; |
| 37 final String text; | 37 final String text; |
| 38 final Diagnostic kind; | 38 final Diagnostic kind; |
| 39 | 39 |
| 40 DiagnosticMessage( | 40 DiagnosticMessage( |
| 41 this.message, this.uri, this.begin, this.end, this.text, this.kind); | 41 this.message, this.uri, this.begin, this.end, this.text, this.kind); |
| 42 | 42 |
| 43 String toString() => '$uri:$begin:$end:$text:$kind'; | 43 String toString() => '${message.kind}:$uri:$begin:$end:$text:$kind'; |
| 44 } | 44 } |
| 45 | 45 |
| 46 class DiagnosticCollector implements CompilerDiagnostics { | 46 class DiagnosticCollector implements CompilerDiagnostics { |
| 47 List<DiagnosticMessage> messages = <DiagnosticMessage>[]; | 47 List<DiagnosticMessage> messages = <DiagnosticMessage>[]; |
| 48 | 48 |
| 49 void call(Uri uri, int begin, int end, String message, Diagnostic kind) { | 49 void call(Uri uri, int begin, int end, String message, Diagnostic kind) { |
| 50 report(null, uri, begin, end, message, kind); | 50 report(null, uri, begin, end, message, kind); |
| 51 } | 51 } |
| 52 | 52 |
| 53 @override | 53 @override |
| (...skipping 276 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 330 createDiagnosticHandler(diagnosticHandler, provider, showDiagnostics); | 330 createDiagnosticHandler(diagnosticHandler, provider, showDiagnostics); |
| 331 | 331 |
| 332 List<Uri> libraries = <Uri>[]; | 332 List<Uri> libraries = <Uri>[]; |
| 333 memorySourceFiles.forEach((String path, _) { | 333 memorySourceFiles.forEach((String path, _) { |
| 334 libraries.add(new Uri(scheme: 'memory', path: path)); | 334 libraries.add(new Uri(scheme: 'memory', path: path)); |
| 335 }); | 335 }); |
| 336 | 336 |
| 337 return analyze(libraries, libraryRoot, packageRoot, | 337 return analyze(libraries, libraryRoot, packageRoot, |
| 338 provider, handler, options); | 338 provider, handler, options); |
| 339 } | 339 } |
| OLD | NEW |