| 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 parametrized by arguments. |
| 11 * | 11 * |
| 12 * Hash characters `#` in the [codeTemplate] are replaced in left-to-right order | 12 * Hash characters `#` in the [codeTemplate] are replaced in left-to-right order |
| 13 * with expressions that contain the values of, or evaluate to, the arguments. | 13 * with expressions that contain the values of, or evaluate to, the arguments. |
| 14 * The number of hash marks must match the number or arguments. Although | 14 * The number of hash marks must match the number or arguments. Although |
| 15 * declared with arguments [arg0] through [arg2], the form actually has no limit | 15 * declared with arguments [arg0] through [arg2], the form actually has no limit |
| 16 * on the number of arguments. | 16 * on the number of arguments. |
| 17 * | 17 * |
| 18 * The [typeDescription] argument is interpreted as a description of the | 18 * The [typeDescription] argument is interpreted as a description of the |
| 19 * behavior of the JavaScript code. Currently it describes the side effects | 19 * behavior of the JavaScript code. Currently it describes the side effects |
| 20 * types that may be returned by the expression, with the additional behavior | 20 * types that may be returned by the expression, with the additional behavior |
| (...skipping 233 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 254 } | 254 } |
| 255 | 255 |
| 256 /** | 256 /** |
| 257 * JavaScript string concatenation. Inputs must be Strings. Corresponds to the | 257 * JavaScript string concatenation. Inputs must be Strings. Corresponds to the |
| 258 * HStringConcat SSA instruction and may be constant-folded. | 258 * HStringConcat SSA instruction and may be constant-folded. |
| 259 */ | 259 */ |
| 260 String JS_STRING_CONCAT(String a, String b) { | 260 String JS_STRING_CONCAT(String a, String b) { |
| 261 // This body is unused, only here for type analysis. | 261 // This body is unused, only here for type analysis. |
| 262 return JS('String', '# + #', a, b); | 262 return JS('String', '# + #', a, b); |
| 263 } | 263 } |
| OLD | NEW |