Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(464)

Side by Side Diff: pkg/compiler/lib/src/scanner/scanner_task.dart

Issue 1383483006: Extract DiagnosticReporter implementation from Compiler. (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Fixes after rebase. Created 5 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « pkg/compiler/lib/src/resolution/variables.dart ('k') | pkg/compiler/lib/src/ssa/builder.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 library dart2js.scanner.task; 5 library dart2js.scanner.task;
6 6
7 import '../common/tasks.dart' show 7 import '../common/tasks.dart' show
8 CompilerTask; 8 CompilerTask;
9 import '../compiler.dart' show 9 import '../compiler.dart' show
10 Compiler; 10 Compiler;
(...skipping 12 matching lines...) Expand all
23 23
24 class ScannerTask extends CompilerTask { 24 class ScannerTask extends CompilerTask {
25 ScannerTask(Compiler compiler) : super(compiler); 25 ScannerTask(Compiler compiler) : super(compiler);
26 String get name => 'Scanner'; 26 String get name => 'Scanner';
27 27
28 void scanLibrary(LibraryElement library) { 28 void scanLibrary(LibraryElement library) {
29 CompilationUnitElement compilationUnit = library.entryCompilationUnit; 29 CompilationUnitElement compilationUnit = library.entryCompilationUnit;
30 String canonicalUri = library.canonicalUri.toString(); 30 String canonicalUri = library.canonicalUri.toString();
31 String resolvedUri = compilationUnit.script.resourceUri.toString(); 31 String resolvedUri = compilationUnit.script.resourceUri.toString();
32 if (canonicalUri == resolvedUri) { 32 if (canonicalUri == resolvedUri) {
33 compiler.log("Scanning library $canonicalUri"); 33 reporter.log("Scanning library $canonicalUri");
34 } else { 34 } else {
35 compiler.log("Scanning library $canonicalUri ($resolvedUri)"); 35 reporter.log("Scanning library $canonicalUri ($resolvedUri)");
36 } 36 }
37 scan(compilationUnit); 37 scan(compilationUnit);
38 } 38 }
39 39
40 void scan(CompilationUnitElement compilationUnit) { 40 void scan(CompilationUnitElement compilationUnit) {
41 measure(() { 41 measure(() {
42 scanElements(compilationUnit); 42 scanElements(compilationUnit);
43 }); 43 });
44 } 44 }
45 45
(...skipping 14 matching lines...) Expand all
60 * value ('\x00'). If [source] does not end with '0', the string is copied 60 * value ('\x00'). If [source] does not end with '0', the string is copied
61 * before scanning. 61 * before scanning.
62 */ 62 */
63 Token tokenize(String source) { 63 Token tokenize(String source) {
64 return measure(() { 64 return measure(() {
65 return new StringScanner.fromString(source, includeComments: false) 65 return new StringScanner.fromString(source, includeComments: false)
66 .tokenize(); 66 .tokenize();
67 }); 67 });
68 } 68 }
69 } 69 }
OLDNEW
« no previous file with comments | « pkg/compiler/lib/src/resolution/variables.dart ('k') | pkg/compiler/lib/src/ssa/builder.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698