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

Side by Side Diff: tests/compiler/dart2js/analyze_helper.dart

Issue 839323003: Implementation of async-await transformation on js ast. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Address comments Created 5 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 | Annotate | Revision Log
OLDNEW
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 analyze_helper; 5 library analyze_helper;
6 6
7 import 'dart:async'; 7 import 'dart:async';
8 import 'dart:io'; 8 import 'dart:io';
9 import 'package:compiler/compiler.dart' as api; 9 import 'package:compiler/compiler.dart' as api;
10 import 'package:compiler/src/apiimpl.dart'; 10 import 'package:compiler/src/apiimpl.dart';
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after
147 === 147 ===
148 148
149 149
150 """); 150 """);
151 151
152 var libraryRoot = currentDirectory.resolve('sdk/'); 152 var libraryRoot = currentDirectory.resolve('sdk/');
153 var packageRoot = 153 var packageRoot =
154 currentDirectory.resolveUri(new Uri.file('${Platform.packageRoot}/')); 154 currentDirectory.resolveUri(new Uri.file('${Platform.packageRoot}/'));
155 var provider = new CompilerSourceFileProvider(); 155 var provider = new CompilerSourceFileProvider();
156 var handler = new CollectingDiagnosticHandler(whiteList, provider); 156 var handler = new CollectingDiagnosticHandler(whiteList, provider);
157 var options = <String>['--analyze-only', '--categories=Client,Server']; 157 var options = <String>['--analyze-only', '--categories=Client,Server',
158 '--show-package-warnings'];
158 if (analyzeAll) options.add('--analyze-all'); 159 if (analyzeAll) options.add('--analyze-all');
159 var compiler = new Compiler( 160 var compiler = new Compiler(
160 provider.readStringFromUri, 161 provider.readStringFromUri,
161 null, 162 null,
162 handler.diagnosticHandler, 163 handler.diagnosticHandler,
163 libraryRoot, packageRoot, 164 libraryRoot, packageRoot,
164 options, 165 options,
165 {}); 166 {});
166 String MESSAGE = """ 167 String MESSAGE = """
167 168
(...skipping 17 matching lines...) Expand all
185 exit(1); 186 exit(1);
186 } 187 }
187 } 188 }
188 if (analyzeAll) { 189 if (analyzeAll) {
189 compiler.librariesToAnalyzeWhenRun = uriList; 190 compiler.librariesToAnalyzeWhenRun = uriList;
190 return compiler.run(null).then(onCompletion); 191 return compiler.run(null).then(onCompletion);
191 } else { 192 } else {
192 return compiler.run(uriList.single).then(onCompletion); 193 return compiler.run(uriList.single).then(onCompletion);
193 } 194 }
194 } 195 }
OLDNEW
« no previous file with comments | « sdk/lib/_internal/compiler/js_lib/js_helper.dart ('k') | tests/compiler/dart2js/async_await_js_transform_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698