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

Unified Diff: pkg/compiler/lib/src/apiimpl.dart

Issue 2938823002: Starting making dart2js strong mode clean. (Closed)
Patch Set: Address some comments. Created 3 years, 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « pkg/compiler/analysis_options_strong.yaml ('k') | pkg/compiler/lib/src/closure.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/compiler/lib/src/apiimpl.dart
diff --git a/pkg/compiler/lib/src/apiimpl.dart b/pkg/compiler/lib/src/apiimpl.dart
index ec504bb556f0102c6811351aa14d26c6fca0c3aa..1620fda6cfb0d8f377bd46f2a1167c860098bf98 100644
--- a/pkg/compiler/lib/src/apiimpl.dart
+++ b/pkg/compiler/lib/src/apiimpl.dart
@@ -119,7 +119,7 @@ class CompilerImpl extends Compiler {
// setting up the current element of the compiler.
return new Future.sync(
() => callUserProvider(resourceUri, api.InputKind.utf8))
- .then((SourceFile sourceFile) {
+ .then((api.Input sourceFile) {
// We use [readableUri] as the URI for the script since need to preserve
// the scheme in the script because [Script.uri] is used for resolving
// relative URIs mentioned in the script. See the comment on
@@ -199,8 +199,9 @@ class CompilerImpl extends Compiler {
// and we can't depend on 'dart:io' classes.
packages = new NonFilePackagesDirectoryPackages(options.packageRoot);
} else if (options.packageConfig != null) {
- return callUserProvider(options.packageConfig, api.InputKind.binary)
- .then((Binary binary) {
+ Future<Binary> future =
+ callUserProvider(options.packageConfig, api.InputKind.binary);
+ return future.then((Binary binary) {
packages =
new MapPackages(pkgs.parse(binary.data, options.packageConfig));
}).catchError((error) {
@@ -227,8 +228,9 @@ class CompilerImpl extends Compiler {
if (options.resolutionInputs != null) {
future = Future.forEach(options.resolutionInputs, (Uri resolutionInput) {
reporter.log('Reading serialized data from ${resolutionInput}');
- return callUserProvider(resolutionInput, api.InputKind.utf8)
- .then((SourceFile sourceFile) {
+ Future<SourceFile> future =
+ callUserProvider(resolutionInput, api.InputKind.utf8);
+ return future.then((SourceFile sourceFile) {
serialization.deserializeFromText(
resolutionInput, sourceFile.slowText());
});
« no previous file with comments | « pkg/compiler/analysis_options_strong.yaml ('k') | pkg/compiler/lib/src/closure.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698