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

Side by Side Diff: test/generated_sdk/lib/_internal/compiler/js_lib/js_helper.dart

Issue 1112403004: SDK fixes (Closed) Base URL: git@github.com:dart-lang/dev_compiler.git@master
Patch Set: Formatting fix Created 5 years, 7 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) 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 _js_helper; 5 library _js_helper;
6 6
7 import 'dart:_js_embedded_names' show 7 import 'dart:_js_embedded_names' show
8 ALL_CLASSES, 8 ALL_CLASSES,
9 GET_ISOLATE_TAG, 9 GET_ISOLATE_TAG,
10 INTERCEPTED_NAMES, 10 INTERCEPTED_NAMES,
(...skipping 667 matching lines...) Expand 10 before | Expand all | Expand 10 after
678 } 678 }
679 return handleError(source); 679 return handleError(source);
680 } 680 }
681 return result; 681 return result;
682 } 682 }
683 683
684 /** [: r"$".codeUnitAt(0) :] */ 684 /** [: r"$".codeUnitAt(0) :] */
685 static const int DOLLAR_CHAR_VALUE = 36; 685 static const int DOLLAR_CHAR_VALUE = 36;
686 686
687 // TODO(jmesserly): remove this method. 687 // TODO(jmesserly): remove this method.
688 static constructorNameFallback = JS('Function', r''' 688 static var constructorNameFallback = JS('Function', r'''
689 function getTagFallback(o) { 689 function getTagFallback(o) {
690 var constructor = o.constructor; 690 var constructor = o.constructor;
691 if (typeof constructor == "function") { 691 if (typeof constructor == "function") {
692 var name = constructor.name; 692 var name = constructor.name;
693 // If the name is a non-empty string, we use that as the type name of this 693 // If the name is a non-empty string, we use that as the type name of this
694 // object. There are various cases where that does not work, so we have t o 694 // object. There are various cases where that does not work, so we have t o
695 // detect them and fall through to the toString() based implementation. 695 // detect them and fall through to the toString() based implementation.
696 696
697 if (typeof name == "string" && 697 if (typeof name == "string" &&
698 698
(...skipping 2771 matching lines...) Expand 10 before | Expand all | Expand 10 after
3470 throw new MainError("No top-level function named 'main'."); 3470 throw new MainError("No top-level function named 'main'.");
3471 } 3471 }
3472 3472
3473 void badMain() { 3473 void badMain() {
3474 throw new MainError("'main' is not a function."); 3474 throw new MainError("'main' is not a function.");
3475 } 3475 }
3476 3476
3477 void mainHasTooManyParameters() { 3477 void mainHasTooManyParameters() {
3478 throw new MainError("'main' expects too many parameters."); 3478 throw new MainError("'main' expects too many parameters.");
3479 } 3479 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698