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

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

Issue 2828693003: Add local type inference logic for integer literals. (Closed)
Patch Set: Sort declarations Created 3 years, 8 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.source_loader; 5 library fasta.source_loader;
6 6
7 import 'dart:async' show Future; 7 import 'dart:async' show Future;
8 8
9 import 'dart:typed_data' show Uint8List; 9 import 'dart:typed_data' show Uint8List;
10 10
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
119 Token tokens = await tokenize(part); 119 Token tokens = await tokenize(part);
120 if (tokens != null) { 120 if (tokens != null) {
121 listener.uri = part.fileUri; 121 listener.uri = part.fileUri;
122 parser.parseUnit(tokens); 122 parser.parseUnit(tokens);
123 } 123 }
124 } 124 }
125 } 125 }
126 } 126 }
127 127
128 DietListener createDietListener(LibraryBuilder library) { 128 DietListener createDietListener(LibraryBuilder library) {
129 return new DietListener(library, hierarchy, coreTypes, 129 var typeInferrer = target.strongMode
130 new KernelTypeInferrer(coreTypes, hierarchy, instrumentation)); 130 ? new KernelTypeInferrer(coreTypes, hierarchy, instrumentation)
131 : null;
132 return new DietListener(library, hierarchy, coreTypes, typeInferrer);
131 } 133 }
132 134
133 void resolveParts() { 135 void resolveParts() {
134 List<Uri> parts = <Uri>[]; 136 List<Uri> parts = <Uri>[];
135 builders.forEach((Uri uri, LibraryBuilder library) { 137 builders.forEach((Uri uri, LibraryBuilder library) {
136 if (library is SourceLibraryBuilder) { 138 if (library is SourceLibraryBuilder) {
137 if (library.isPart) { 139 if (library.isPart) {
138 library.validatePart(); 140 library.validatePart();
139 parts.add(uri); 141 parts.add(uri);
140 } else { 142 } else {
(...skipping 218 matching lines...) Expand 10 before | Expand all | Expand 10 after
359 void checkOverrides(List<SourceClassBuilder> sourceClasses) { 361 void checkOverrides(List<SourceClassBuilder> sourceClasses) {
360 assert(hierarchy != null); 362 assert(hierarchy != null);
361 for (SourceClassBuilder builder in sourceClasses) { 363 for (SourceClassBuilder builder in sourceClasses) {
362 builder.checkOverrides(hierarchy); 364 builder.checkOverrides(hierarchy);
363 } 365 }
364 ticker.logMs("Checked overrides"); 366 ticker.logMs("Checked overrides");
365 } 367 }
366 368
367 List<Uri> getDependencies() => sourceBytes.keys.toList(); 369 List<Uri> getDependencies() => sourceBytes.keys.toList();
368 } 370 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698