OLD | NEW |
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 library _foreign_helper; | 5 library _foreign_helper; |
6 | 6 |
7 import 'dart:_js_embedded_names' show JsGetName, JsBuiltin; | 7 import 'dart:_js_embedded_names' show JsGetName, JsBuiltin; |
8 | 8 |
9 /** | 9 /** |
10 * Emits a JavaScript code fragment parameterized by arguments. | 10 * Emits a JavaScript code fragment parameterized by arguments. |
(...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
195 * an interface, e.g. `JS_INTERCEPTOR_CONSTANT(JSInt)`, not | 195 * an interface, e.g. `JS_INTERCEPTOR_CONSTANT(JSInt)`, not |
196 * `JS_INTERCEPTOR_CONSTANT(int)`. | 196 * `JS_INTERCEPTOR_CONSTANT(int)`. |
197 */ | 197 */ |
198 JS_INTERCEPTOR_CONSTANT(Type type) {} | 198 JS_INTERCEPTOR_CONSTANT(Type type) {} |
199 | 199 |
200 /** | 200 /** |
201 * Returns the prefix used for generated type argument substitutions on classes. | 201 * Returns the prefix used for generated type argument substitutions on classes. |
202 */ | 202 */ |
203 String JS_OPERATOR_AS_PREFIX() {} | 203 String JS_OPERATOR_AS_PREFIX() {} |
204 | 204 |
205 /// Returns the name of the class `Object` in the generated code. | |
206 String JS_OBJECT_CLASS_NAME() {} | |
207 | |
208 /// Returns the name of the class `Null` in the generated code. | |
209 String JS_NULL_CLASS_NAME() {} | |
210 | |
211 /** | 205 /** |
212 * Returns the field name used for determining if an object or its | 206 * Returns the field name used for determining if an object or its |
213 * interceptor has JavaScript indexing behavior. | 207 * interceptor has JavaScript indexing behavior. |
214 */ | 208 */ |
215 String JS_IS_INDEXABLE_FIELD_NAME() {} | 209 String JS_IS_INDEXABLE_FIELD_NAME() {} |
216 | 210 |
217 /** | 211 /** |
218 * Returns the object corresponding to Namer.CURRENT_ISOLATE. | 212 * Returns the object corresponding to Namer.CURRENT_ISOLATE. |
219 */ | 213 */ |
220 JS_CURRENT_ISOLATE() {} | 214 JS_CURRENT_ISOLATE() {} |
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
308 } | 302 } |
309 | 303 |
310 /** | 304 /** |
311 * JavaScript string concatenation. Inputs must be Strings. Corresponds to the | 305 * JavaScript string concatenation. Inputs must be Strings. Corresponds to the |
312 * HStringConcat SSA instruction and may be constant-folded. | 306 * HStringConcat SSA instruction and may be constant-folded. |
313 */ | 307 */ |
314 String JS_STRING_CONCAT(String a, String b) { | 308 String JS_STRING_CONCAT(String a, String b) { |
315 // This body is unused, only here for type analysis. | 309 // This body is unused, only here for type analysis. |
316 return JS('String', '# + #', a, b); | 310 return JS('String', '# + #', a, b); |
317 } | 311 } |
OLD | NEW |