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

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

Issue 694353007: Move dart2js from sdk/lib/_internal/compiler to pkg/compiler (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 1 month 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) 2014, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2014, 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 /// Alternative compile method for dart2js commandline that stores the compiler 5 /// Alternative compile method for dart2js commandline that stores the compiler
6 /// for later inspection. 6 /// for later inspection.
7 /// 7 ///
8 /// Use this in testing to inspect the compiler after compilation by setting 8 /// Use this in testing to inspect the compiler after compilation by setting
9 /// the `compileFunc` variable in `package:compiler/implementation/dart2js.dart` 9 /// the `compileFunc` variable in `package:compiler/src/dart2js.dart`
10 /// to [compiler] before calling the `internalMain` function. 10 /// to [compiler] before calling the `internalMain` function.
11 11
12 library dart2js.alt; 12 library dart2js.alt;
13 13
14 import 'dart:async'; 14 import 'dart:async';
15 import 'package:compiler/compiler.dart'; 15 import 'package:compiler/compiler.dart';
16 import 'package:compiler/implementation/apiimpl.dart'; 16 import 'package:compiler/src/apiimpl.dart';
17 17
18 Compiler compiler; 18 Compiler compiler;
19 19
20 Future<String> compile(Uri script, 20 Future<String> compile(Uri script,
21 Uri libraryRoot, 21 Uri libraryRoot,
22 Uri packageRoot, 22 Uri packageRoot,
23 CompilerInputProvider inputProvider, 23 CompilerInputProvider inputProvider,
24 DiagnosticHandler handler, 24 DiagnosticHandler handler,
25 [List<String> options = const [], 25 [List<String> options = const [],
26 CompilerOutputProvider outputProvider, 26 CompilerOutputProvider outputProvider,
(...skipping 12 matching lines...) Expand all
39 options, 39 options,
40 environment); 40 environment);
41 return compiler.run(script).then((_) { 41 return compiler.run(script).then((_) {
42 String code = compiler.assembledCode; 42 String code = compiler.assembledCode;
43 if (code != null && outputProvider != null) { 43 if (code != null && outputProvider != null) {
44 code = ''; // Non-null signals success. 44 code = ''; // Non-null signals success.
45 } 45 }
46 return code; 46 return code;
47 }); 47 });
48 } 48 }
OLDNEW
« no previous file with comments | « tests/compiler/dart2js/command_line_split_test.dart ('k') | tests/compiler/dart2js/compiler_helper.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698