OLD | NEW |
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 'shared/embedded_names.dart' show | 7 import 'shared/embedded_names.dart' show |
8 ALL_CLASSES, | 8 ALL_CLASSES, |
9 GET_ISOLATE_TAG, | 9 GET_ISOLATE_TAG, |
10 INTERCEPTED_NAMES, | 10 INTERCEPTED_NAMES, |
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
70 part 'regexp_helper.dart'; | 70 part 'regexp_helper.dart'; |
71 part 'string_helper.dart'; | 71 part 'string_helper.dart'; |
72 part 'js_rti.dart'; | 72 part 'js_rti.dart'; |
73 | 73 |
74 class _Patch { | 74 class _Patch { |
75 const _Patch(); | 75 const _Patch(); |
76 } | 76 } |
77 | 77 |
78 const _Patch patch = const _Patch(); | 78 const _Patch patch = const _Patch(); |
79 | 79 |
| 80 |
| 81 /// Marks the internal map in dart2js, so that internal libraries can is-check |
| 82 // them. |
| 83 abstract class InternalMap { |
| 84 } |
| 85 |
80 /// No-op method that is called to inform the compiler that preambles might | 86 /// No-op method that is called to inform the compiler that preambles might |
81 /// be needed when executing the resulting JS file in a command-line | 87 /// be needed when executing the resulting JS file in a command-line |
82 /// JS engine. | 88 /// JS engine. |
83 requiresPreamble() {} | 89 requiresPreamble() {} |
84 | 90 |
85 bool isJsIndexable(var object, var record) { | 91 bool isJsIndexable(var object, var record) { |
86 if (record != null) { | 92 if (record != null) { |
87 var result = dispatchRecordIndexability(record); | 93 var result = dispatchRecordIndexability(record); |
88 if (result != null) return result; | 94 if (result != null) return result; |
89 } | 95 } |
(...skipping 3318 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3408 throw new MainError("No top-level function named 'main'."); | 3414 throw new MainError("No top-level function named 'main'."); |
3409 } | 3415 } |
3410 | 3416 |
3411 void badMain() { | 3417 void badMain() { |
3412 throw new MainError("'main' is not a function."); | 3418 throw new MainError("'main' is not a function."); |
3413 } | 3419 } |
3414 | 3420 |
3415 void mainHasTooManyParameters() { | 3421 void mainHasTooManyParameters() { |
3416 throw new MainError("'main' expects too many parameters."); | 3422 throw new MainError("'main' expects too many parameters."); |
3417 } | 3423 } |
OLD | NEW |