| Index: pkg/compiler/lib/src/js_emitter/startup_emitter/fragment_emitter.dart
|
| diff --git a/pkg/compiler/lib/src/js_emitter/startup_emitter/fragment_emitter.dart b/pkg/compiler/lib/src/js_emitter/startup_emitter/fragment_emitter.dart
|
| index 7fbd768820923fa63483f2f4c8995a5a128d231a..14dea34b877f1f462c89b5a9933a7188c4dac3a7 100644
|
| --- a/pkg/compiler/lib/src/js_emitter/startup_emitter/fragment_emitter.dart
|
| +++ b/pkg/compiler/lib/src/js_emitter/startup_emitter/fragment_emitter.dart
|
| @@ -55,11 +55,6 @@ const String cachedClassFieldNames = r'$cachedFieldNames';
|
| // names we want. Furthermore, the pretty-printer minifies local variables, thus
|
| // reducing their size.
|
| const String mainBoilerplate = '''
|
| -{
|
| -// Declare deferred-initializer global, which is used to keep track of the
|
| -// loaded fragments.
|
| -#deferredInitializer;
|
| -
|
| (function() {
|
| // Copies the own properties from [from] to [to].
|
| function copyProperties(from, to) {
|
| @@ -355,8 +350,8 @@ var #staticStateDeclaration = {};
|
|
|
| // Invokes main (making sure that it records the 'current-script' value).
|
| #invokeMain;
|
| -})();
|
| -}''';
|
| +})()
|
| +''';
|
|
|
| /// Deferred fragments (aka 'hunks') are built similarly to the main fragment.
|
| ///
|
| @@ -441,8 +436,7 @@ class FragmentEmitter {
|
| .where((Holder holder) => !holder.isStaticStateHolder);
|
|
|
| return js.js.statement(mainBoilerplate,
|
| - {'deferredInitializer': emitDeferredInitializerGlobal(program.loadMap),
|
| - 'typeNameProperty': js.string(ModelEmitter.typeNameProperty),
|
| + {'typeNameProperty': js.string(ModelEmitter.typeNameProperty),
|
| 'cyclicThrow': backend.emitter.staticFunctionAccess(
|
| backend.helpers.cyclicThrowHelper),
|
| 'operatorIsPrefix': js.string(namer.operatorIsPrefix),
|
| @@ -516,15 +510,6 @@ class FragmentEmitter {
|
| });
|
| }
|
|
|
| - js.Statement emitDeferredInitializerGlobal(Map loadMap) {
|
| - if (loadMap.isEmpty) return new js.Block.empty();
|
| -
|
| - String global = ModelEmitter.deferredInitializersGlobal;
|
| - return js.js.statement(
|
| - "if (typeof($global) === 'undefined') var # = Object.create(null);",
|
| - new js.VariableDeclaration(global, allowRename: false));
|
| - }
|
| -
|
| /// Emits all holders, except for the static-state holder.
|
| ///
|
| /// The emitted holders contain classes (only the constructors) and all
|
|
|