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

Side by Side Diff: sdk/lib/_internal/compiler/implementation/js_backend/emitter.dart

Issue 23480066: Removing dart2js main execution warning message (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 3 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, 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 part of js_backend; 5 part of js_backend;
6 6
7 /** 7 /**
8 * A function element that represents a closure call. The signature is copied 8 * A function element that represents a closure call. The signature is copied
9 * from the given element. 9 * from the given element.
10 */ 10 */
(...skipping 2998 matching lines...) Expand 10 before | Expand all | Expand 10 after
3009 scripts[i].removeEventListener("load", onLoad, false); 3009 scripts[i].removeEventListener("load", onLoad, false);
3010 } 3010 }
3011 callback(event.target); 3011 callback(event.target);
3012 } 3012 }
3013 for (var i = 0; i < scripts.length; ++i) { 3013 for (var i = 0; i < scripts.length; ++i) {
3014 scripts[i].addEventListener("load", onLoad, false); 3014 scripts[i].addEventListener("load", onLoad, false);
3015 } 3015 }
3016 })(function(currentScript) { 3016 })(function(currentScript) {
3017 init.currentScript = currentScript; 3017 init.currentScript = currentScript;
3018 3018
3019 if (typeof console !== "undefined" && typeof document !== "undefined" &&
3020 document.readyState == "loading") {
3021 console.warn("Dart script executed synchronously, use <script src='" +
3022 currentScript.src + "' defer></scr" + "ipt> to execute after parsing " +
3023 "has completed. See also http://dartbug.com/12281.");
3024 }
3025 if (typeof dartMainRunner === "function") { 3019 if (typeof dartMainRunner === "function") {
3026 dartMainRunner(function() { ${mainCall}; }); 3020 dartMainRunner(function() { ${mainCall}; });
3027 } else { 3021 } else {
3028 ${mainCall}; 3022 ${mainCall};
3029 } 3023 }
3030 })$N'''); 3024 })$N''');
3031 addComment('END invoke [main].', buffer); 3025 addComment('END invoke [main].', buffer);
3032 } 3026 }
3033 3027
3034 void emitGetInterceptorMethod(CodeBuffer buffer, 3028 void emitGetInterceptorMethod(CodeBuffer buffer,
(...skipping 1166 matching lines...) Expand 10 before | Expand all | Expand 10 after
4201 4195
4202 const String HOOKS_API_USAGE = """ 4196 const String HOOKS_API_USAGE = """
4203 // The code supports the following hooks: 4197 // The code supports the following hooks:
4204 // dartPrint(message) - if this function is defined it is called 4198 // dartPrint(message) - if this function is defined it is called
4205 // instead of the Dart [print] method. 4199 // instead of the Dart [print] method.
4206 // dartMainRunner(main) - if this function is defined, the Dart [main] 4200 // dartMainRunner(main) - if this function is defined, the Dart [main]
4207 // method will not be invoked directly. 4201 // method will not be invoked directly.
4208 // Instead, a closure that will invoke [main] is 4202 // Instead, a closure that will invoke [main] is
4209 // passed to [dartMainRunner]. 4203 // passed to [dartMainRunner].
4210 """; 4204 """;
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698