Files
sdk/pkg/dev_compiler/test/codegen/expect/es6_modules.js
T
John Messerly 0b646eb520 fixes #427, static fields emitted outside the scope of their class
mainly, this backs off of some readability optimizations around static and top-level fields that were too aggressive. On their own, they were okay, but they collide with the library-cycle issues. Once we can remove that issue, we could consider restoring some of this. In the meantime, simplicity is good.

The new operation in the declaration loader is to allow us to see if an initializer has all its dependencies satisfied, but without changing any ordering if they are not.

R=vsm@google.com

Review URL: https://codereview.chromium.org/1636233002 .
2016-01-27 09:35:40 -08:00

52 lines
1.1 KiB
JavaScript

const exports = {};
import dart from "./dart/_runtime";
import core from "./dart/core";
let dartx = dart.dartx;
const Callback = dart.typedef('Callback', () => dart.functionType(dart.void, [], {i: core.int}));
class A extends core.Object {}
class _A extends core.Object {}
const B$ = dart.generic(function(T) {
class B extends core.Object {}
return B;
});
let B = B$();
const _B$ = dart.generic(function(T) {
class _B extends core.Object {}
return _B;
});
let _B = _B$();
function f() {
}
dart.fn(f);
function _f() {
}
dart.fn(_f);
const constant = "abc";
exports.finalConstant = "abc";
dart.defineLazyProperties(exports, {
get lazy() {
return dart.as(dart.fn(() => {
core.print('lazy');
return "abc";
})(), core.String);
}
});
exports.mutable = "abc";
dart.defineLazyProperties(exports, {
get lazyMutable() {
return dart.as(dart.fn(() => {
core.print('lazyMutable');
return "abc";
})(), core.String);
},
set lazyMutable(_) {}
});
// Exports:
exports.Callback = Callback;
exports.A = A;
exports.B$ = B$;
exports.B = B;
exports.f = f;
exports.constant = constant;
export default exports;