| 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 /** | 7 /** |
| 8 * Emits a JavaScript code fragment parameterized by arguments. | 8 * Emits a JavaScript code fragment parameterized by arguments. |
| 9 * | 9 * |
| 10 * Hash characters `#` in the [codeTemplate] are replaced in left-to-right order | 10 * Hash characters `#` in the [codeTemplate] are replaced in left-to-right order |
| (...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 147 * https://code.google.com/p/v8/wiki/JavaScriptStackTraceApi. | 147 * https://code.google.com/p/v8/wiki/JavaScriptStackTraceApi. |
| 148 */ | 148 */ |
| 149 RAW_DART_FUNCTION_REF(Function function) {} | 149 RAW_DART_FUNCTION_REF(Function function) {} |
| 150 | 150 |
| 151 /** | 151 /** |
| 152 * Sets the current isolate to [isolate]. | 152 * Sets the current isolate to [isolate]. |
| 153 */ | 153 */ |
| 154 void JS_SET_CURRENT_ISOLATE(isolate) {} | 154 void JS_SET_CURRENT_ISOLATE(isolate) {} |
| 155 | 155 |
| 156 /** | 156 /** |
| 157 * Creates an isolate and returns it. | |
| 158 */ | |
| 159 JS_CREATE_ISOLATE() {} | |
| 160 | |
| 161 /** | |
| 162 * Returns the JavaScript constructor function for Dart's Object class. | 157 * Returns the JavaScript constructor function for Dart's Object class. |
| 163 * This can be used for type tests, as in | 158 * This can be used for type tests, as in |
| 164 * | 159 * |
| 165 * if (JS('bool', '# instanceof #', obj, JS_DART_OBJECT_CONSTRUCTOR())) | 160 * if (JS('bool', '# instanceof #', obj, JS_DART_OBJECT_CONSTRUCTOR())) |
| 166 * ... | 161 * ... |
| 167 */ | 162 */ |
| 168 JS_DART_OBJECT_CONSTRUCTOR() {} | 163 JS_DART_OBJECT_CONSTRUCTOR() {} |
| 169 | 164 |
| 170 /** | 165 /** |
| 171 * Returns the interceptor for class [type]. The interceptor is the type's | 166 * Returns the interceptor for class [type]. The interceptor is the type's |
| (...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 287 } | 282 } |
| 288 | 283 |
| 289 /** | 284 /** |
| 290 * JavaScript string concatenation. Inputs must be Strings. Corresponds to the | 285 * JavaScript string concatenation. Inputs must be Strings. Corresponds to the |
| 291 * HStringConcat SSA instruction and may be constant-folded. | 286 * HStringConcat SSA instruction and may be constant-folded. |
| 292 */ | 287 */ |
| 293 String JS_STRING_CONCAT(String a, String b) { | 288 String JS_STRING_CONCAT(String a, String b) { |
| 294 // This body is unused, only here for type analysis. | 289 // This body is unused, only here for type analysis. |
| 295 return JS('String', '# + #', a, b); | 290 return JS('String', '# + #', a, b); |
| 296 } | 291 } |
| OLD | NEW |