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

Side by Side Diff: tool/input_sdk/private/foreign_helper.dart

Issue 1530563003: Generate all runtime files from dart. (Closed) Base URL: git@github.com:dart-lang/dev_compiler.git@master
Patch Set: merged master Created 4 years, 11 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
« no previous file with comments | « tool/input_sdk/private/errors.dart ('k') | tool/input_sdk/private/generators.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 dart._foreign_helper; 5 library dart._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 263 matching lines...) Expand 10 before | Expand all | Expand 10 after
274 } 274 }
275 275
276 /** 276 /**
277 * JavaScript string concatenation. Inputs must be Strings. Corresponds to the 277 * JavaScript string concatenation. Inputs must be Strings. Corresponds to the
278 * HStringConcat SSA instruction and may be constant-folded. 278 * HStringConcat SSA instruction and may be constant-folded.
279 */ 279 */
280 String JS_STRING_CONCAT(String a, String b) { 280 String JS_STRING_CONCAT(String a, String b) {
281 // This body is unused, only here for type analysis. 281 // This body is unused, only here for type analysis.
282 return JS('String', '# + #', a, b); 282 return JS('String', '# + #', a, b);
283 } 283 }
284
285 /// Same `@rest` annotation and `spread` function as in
286 /// `package:js/src/varargs.dart`.
287 ///
288 /// Runtime files cannot import packages, which is why we have an ad-hoc copy.
289
290 class _Rest {
291 const _Rest();
292 }
293
294 const _Rest rest = const _Rest();
295
296 dynamic spread(args) {
297 throw new StateError(
298 'The spread function cannot be called, '
299 'it should be compiled away.');
300 }
OLDNEW
« no previous file with comments | « tool/input_sdk/private/errors.dart ('k') | tool/input_sdk/private/generators.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698