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

Unified 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 side-by-side diff with in-line comments
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 »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tool/input_sdk/private/foreign_helper.dart
diff --git a/tool/input_sdk/private/foreign_helper.dart b/tool/input_sdk/private/foreign_helper.dart
index a8314089c3adbe027cf91615759c59e08d966917..b738e812ff6cf145eacec5a1b54eddda755bc28b 100644
--- a/tool/input_sdk/private/foreign_helper.dart
+++ b/tool/input_sdk/private/foreign_helper.dart
@@ -281,3 +281,20 @@ String JS_STRING_CONCAT(String a, String b) {
// This body is unused, only here for type analysis.
return JS('String', '# + #', a, b);
}
+
+/// Same `@rest` annotation and `spread` function as in
+/// `package:js/src/varargs.dart`.
+///
+/// Runtime files cannot import packages, which is why we have an ad-hoc copy.
+
+class _Rest {
+ const _Rest();
+}
+
+const _Rest rest = const _Rest();
+
+dynamic spread(args) {
+ throw new StateError(
+ 'The spread function cannot be called, '
+ 'it should be compiled away.');
+}
« 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