3886194414
The following part files were ported from the original .js (lib/runtime/dart/_foo.js -> input_sdk/private/foo.dart):
- input_sdk/private/rtti.dart
- input_sdk/private/types.dart
- input_sdk/private/classes.dart
- input_sdk/private/errors.dart
- input_sdk/private/generators.dart
- input_sdk/private/operations.dart
- input_sdk/private/runtime.dart
Notes:
- Introduced genericTypeConstructor intrinsic: `JS('', '#(type)', genericTypeConstructor(List))` generates `core.List$(type)`
- Used new JS quasiquotes everywhere
- Depends on new internal `@JSExportName` annotation to alias symbols like dart.{as, is, const, assert, export, implements, throw, async, dynamic, void} (see https://codereview.chromium.org/1580413002/)
BUG=
R=jmesserly@google.com
Review URL: https://codereview.chromium.org/1530563003 .
31 lines
775 B
JavaScript
31 lines
775 B
JavaScript
dart_library.library('js/js', null, /* Imports */[
|
|
'dart/_runtime',
|
|
'dart/js',
|
|
'dart/core'
|
|
], /* Lazy imports */[
|
|
], function(exports, dart, js, core) {
|
|
'use strict';
|
|
let dartx = dart.dartx;
|
|
dart.export(exports, js, ['allowInterop', 'allowInteropCaptureThis'], []);
|
|
class JS extends core.Object {
|
|
JS(name) {
|
|
if (name === void 0) name = null;
|
|
this.name = name;
|
|
}
|
|
}
|
|
dart.setSignature(JS, {
|
|
constructors: () => ({JS: [JS, [], [core.String]]})
|
|
});
|
|
class _Anonymous extends core.Object {
|
|
_Anonymous() {
|
|
}
|
|
}
|
|
dart.setSignature(_Anonymous, {
|
|
constructors: () => ({_Anonymous: [_Anonymous, []]})
|
|
});
|
|
const anonymous = dart.const(new _Anonymous());
|
|
// Exports:
|
|
exports.JS = JS;
|
|
exports.anonymous = anonymous;
|
|
});
|