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

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

Issue 1271953003: dart2js: Add a header to the output of the startup emitter. (Closed) Base URL: git@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
(Empty)
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
3 // BSD-style license that can be found in the LICENSE file.
4
5 library dart2js.js_emitter.headers;
6 import '../apiimpl.dart' show Compiler;
7
8 String generatedBy(Compiler compiler) {
9 String suffix = '';
10 if (compiler.hasBuildId) suffix = ' version: ${compiler.buildId}';
11 return '// Generated by dart2js, the Dart to JavaScript compiler$suffix.';
12 }
13
14 const String HOOKS_API_USAGE = """
15 // The code supports the following hooks:
16 // dartPrint(message):
17 // if this function is defined it is called instead of the Dart [print]
18 // method.
19 //
20 // dartMainRunner(main, args):
21 // if this function is defined, the Dart [main] method will not be invoked
22 // directly. Instead, a closure that will invoke [main], and its arguments
23 // [args] is passed to [dartMainRunner].
24 //
25 // dartDeferredLibraryLoader(uri, successCallback, errorCallback):
26 // if this function is defined, it will be called when a deferered library
27 // is loaded. It should load and eval the javascript of `uri`, and call
28 // successCallback. If it fails to do so, it should call errorCallback with
29 // an error.
30 """;
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698