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

Side by Side Diff: pkg/front_end/lib/src/fasta/loader.dart

Issue 2672403004: Begin hooking up Fasta to analyzer parser tests. (Closed)
Patch Set: Created 3 years, 10 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
OLDNEW
1 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2016, 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 fasta.loader; 5 library fasta.loader;
6 6
7 import 'dart:async' show 7 import 'dart:async' show
8 Future; 8 Future;
9 9
10 import 'dart:collection' show 10 import 'dart:collection' show
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after
125 // files. Currently, [libraryCount] is wrong for dill files. 125 // files. Currently, [libraryCount] is wrong for dill files.
126 print(""" 126 print("""
127 $sinceStart: $message ($byteCount bytes) in ${format(ms, 3, 0)}ms, that is, 127 $sinceStart: $message ($byteCount bytes) in ${format(ms, 3, 0)}ms, that is,
128 ${format(byteCount / ms, 3, 12)} bytes/ms, and 128 ${format(byteCount / ms, 3, 12)} bytes/ms, and
129 ${format(ms / libraryCount, 3, 12)} ms/compilation unit."""); 129 ${format(ms / libraryCount, 3, 12)} ms/compilation unit.""");
130 }); 130 });
131 } 131 }
132 132
133 Future<Null> buildOutline(LibraryBuilder library); 133 Future<Null> buildOutline(LibraryBuilder library);
134 134
135 /// Builds all the method bodies found in a given [library].
ahe 2017/02/07 09:47:16 "a given" -> "the given"?
Paul Berry 2017/02/07 13:45:13 Done.
136 ///
137 /// [astKind] determines whether or not analyzer ASTs are used as an
138 /// intermediate data structure.
135 Future<Null> buildBody(LibraryBuilder library, AstKind astKind); 139 Future<Null> buildBody(LibraryBuilder library, AstKind astKind);
136 140
137 List<InputError> collectCompileTimeErrors() { 141 List<InputError> collectCompileTimeErrors() {
138 List<InputError> errors = <InputError>[]; 142 List<InputError> errors = <InputError>[];
139 for (LibraryBuilder library in builders.values) { 143 for (LibraryBuilder library in builders.values) {
140 if (library.loader == this) { 144 if (library.loader == this) {
141 errors.addAll(library.compileTimeErrors); 145 errors.addAll(library.compileTimeErrors);
142 } 146 }
143 } 147 }
144 return errors; 148 return errors;
145 } 149 }
146 } 150 }
147 151
148 String format(double d, int fractionDigits, int width) { 152 String format(double d, int fractionDigits, int width) {
149 return d.toStringAsFixed(fractionDigits).padLeft(width); 153 return d.toStringAsFixed(fractionDigits).padLeft(width);
150 } 154 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698