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

Unified Diff: lib/runtime/dart/_foreign_helper.js

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 | « lib/runtime/dart/_errors.js ('k') | lib/runtime/dart/_generators.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/runtime/dart/_foreign_helper.js
diff --git a/lib/runtime/dart/_foreign_helper.js b/lib/runtime/dart/_foreign_helper.js
index 34128a221d41db6404b46438a7c79e4e085204b5..13bbdc2caa7b24693bfd8076d7275f83da687a4f 100644
--- a/lib/runtime/dart/_foreign_helper.js
+++ b/lib/runtime/dart/_foreign_helper.js
@@ -1,5 +1,5 @@
dart_library.library('dart/_foreign_helper', null, /* Imports */[
- "dart/_runtime",
+ 'dart/_runtime',
'dart/core'
], /* Lazy imports */[
], function(exports, dart, core) {
@@ -117,6 +117,18 @@ dart_library.library('dart/_foreign_helper', null, /* Imports */[
return a + b;
}
dart.fn(JS_STRING_CONCAT, core.String, [core.String, core.String]);
+ class _Rest extends core.Object {
+ _Rest() {
+ }
+ }
+ dart.setSignature(_Rest, {
+ constructors: () => ({_Rest: [_Rest, []]})
+ });
+ const rest = dart.const(new _Rest());
+ function spread(args) {
+ dart.throw(new core.StateError('The spread function cannot be called, ' + 'it should be compiled away.'));
+ }
+ dart.fn(spread);
// Exports:
exports.JS = JS;
exports.JSExportName = JSExportName;
@@ -148,4 +160,6 @@ dart_library.library('dart/_foreign_helper', null, /* Imports */[
exports.JS_EFFECT = JS_EFFECT;
exports.JS_CONST = JS_CONST;
exports.JS_STRING_CONCAT = JS_STRING_CONCAT;
+ exports.rest = rest;
+ exports.spread = spread;
});
« no previous file with comments | « lib/runtime/dart/_errors.js ('k') | lib/runtime/dart/_generators.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698