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 .
22 lines
647 B
JavaScript
22 lines
647 B
JavaScript
dart_library.library('map_keys', null, /* Imports */[
|
|
'dart/_runtime',
|
|
'dart/core',
|
|
'dart/math'
|
|
], /* Lazy imports */[
|
|
], function(exports, dart, core, math) {
|
|
'use strict';
|
|
let dartx = dart.dartx;
|
|
function main() {
|
|
core.print(dart.map({'1': 2, '3': 4, '5': 6}));
|
|
core.print(dart.map([1, 2, 3, 4, 5, 6]));
|
|
core.print(dart.map({'1': 2, [`${dart.notNull(math.Random.new().nextInt(2)) + 2}`]: 4, '5': 6}));
|
|
let x = '3';
|
|
core.print(dart.map(['1', 2, x, 4, '5', 6]));
|
|
core.print(dart.map(['1', 2, null, 4, '5', 6]));
|
|
}
|
|
dart.fn(main);
|
|
// Exports:
|
|
exports.main = main;
|
|
});
|
|
//# sourceMappingURL=map_keys.js.map
|