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

Side by Side Diff: pkg/compiler/lib/src/js_emitter/headers.dart

Issue 1284593003: Remove dart2jslib.dart (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Created 5 years, 4 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) 2015, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2015, 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 dart2js.js_emitter.headers; 5 library dart2js.js_emitter.headers;
6 import '../dart2jslib.dart' show Compiler; 6 import '../compiler.dart' show Compiler;
7 7
8 String generatedBy(Compiler compiler, {String flavor: ""}) { 8 String generatedBy(Compiler compiler, {String flavor: ""}) {
9 String suffix = ''; 9 String suffix = '';
10 if (compiler.hasBuildId) suffix = ' version: ${compiler.buildId}'; 10 if (compiler.hasBuildId) suffix = ' version: ${compiler.buildId}';
11 if (flavor != "") flavor = " ($flavor)"; 11 if (flavor != "") flavor = " ($flavor)";
12 return '// Generated by dart2js$flavor, ' 12 return '// Generated by dart2js$flavor, '
13 'the Dart to JavaScript compiler$suffix.'; 13 'the Dart to JavaScript compiler$suffix.';
14 } 14 }
15 15
16 const String HOOKS_API_USAGE = """ 16 const String HOOKS_API_USAGE = """
17 // The code supports the following hooks: 17 // The code supports the following hooks:
18 // dartPrint(message): 18 // dartPrint(message):
19 // if this function is defined it is called instead of the Dart [print] 19 // if this function is defined it is called instead of the Dart [print]
20 // method. 20 // method.
21 // 21 //
22 // dartMainRunner(main, args): 22 // dartMainRunner(main, args):
23 // if this function is defined, the Dart [main] method will not be invoked 23 // if this function is defined, the Dart [main] method will not be invoked
24 // directly. Instead, a closure that will invoke [main], and its arguments 24 // directly. Instead, a closure that will invoke [main], and its arguments
25 // [args] is passed to [dartMainRunner]. 25 // [args] is passed to [dartMainRunner].
26 // 26 //
27 // dartDeferredLibraryLoader(uri, successCallback, errorCallback): 27 // dartDeferredLibraryLoader(uri, successCallback, errorCallback):
28 // if this function is defined, it will be called when a deferered library 28 // if this function is defined, it will be called when a deferered library
29 // is loaded. It should load and eval the javascript of `uri`, and call 29 // is loaded. It should load and eval the javascript of `uri`, and call
30 // successCallback. If it fails to do so, it should call errorCallback with 30 // successCallback. If it fails to do so, it should call errorCallback with
31 // an error. 31 // an error.
32 """; 32 """;
OLDNEW
« no previous file with comments | « pkg/compiler/lib/src/js_emitter/full_emitter/emitter.dart ('k') | pkg/compiler/lib/src/js_emitter/js_emitter.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698