OLD | NEW |
1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file |
2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
4 | 4 |
5 part of dart2js.js_emitter.startup_emitter.model_emitter; | 5 part of dart2js.js_emitter.startup_emitter.model_emitter; |
6 | 6 |
7 /// The name of the property that stores the tear-off getter on a static | 7 /// The name of the property that stores the tear-off getter on a static |
8 /// function. | 8 /// function. |
9 /// | 9 /// |
10 /// This property is only used when isolates are used. | 10 /// This property is only used when isolates are used. |
(...skipping 1242 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1253 /// to the list of generated fragments that must be installed when the | 1253 /// to the list of generated fragments that must be installed when the |
1254 /// deferred library is loaded. | 1254 /// deferred library is loaded. |
1255 Iterable<js.Property> emitEmbeddedGlobalsForDeferredLoading( | 1255 Iterable<js.Property> emitEmbeddedGlobalsForDeferredLoading( |
1256 Map<String, List<Fragment>> loadMap, | 1256 Map<String, List<Fragment>> loadMap, |
1257 Map<DeferredFragment, _DeferredFragmentHash> deferredLoadHashes) { | 1257 Map<DeferredFragment, _DeferredFragmentHash> deferredLoadHashes) { |
1258 if (loadMap.isEmpty) return []; | 1258 if (loadMap.isEmpty) return []; |
1259 | 1259 |
1260 List<js.Property> globals = <js.Property>[]; | 1260 List<js.Property> globals = <js.Property>[]; |
1261 | 1261 |
1262 js.ArrayInitializer fragmentUris(List<Fragment> fragments) { | 1262 js.ArrayInitializer fragmentUris(List<Fragment> fragments) { |
1263 return js.stringArray(fragments.map((DeferredFragment fragment) => | 1263 return js.stringArray(fragments.map((Fragment fragment) => |
1264 "${fragment.outputFileName}.${ModelEmitter.deferredExtension}")); | 1264 "${fragment.outputFileName}.${ModelEmitter.deferredExtension}")); |
1265 } | 1265 } |
1266 | 1266 |
1267 js.ArrayInitializer fragmentHashes(List<Fragment> fragments) { | 1267 js.ArrayInitializer fragmentHashes(List<Fragment> fragments) { |
1268 return new js.ArrayInitializer(fragments | 1268 return new js.ArrayInitializer(fragments |
1269 .map((fragment) => deferredLoadHashes[fragment]) | 1269 .map((fragment) => deferredLoadHashes[fragment]) |
1270 .toList(growable: false)); | 1270 .toList(growable: false)); |
1271 } | 1271 } |
1272 | 1272 |
1273 List<js.Property> uris = new List<js.Property>(loadMap.length); | 1273 List<js.Property> uris = new List<js.Property>(loadMap.length); |
(...skipping 279 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1553 } | 1553 } |
1554 statements.add(js.js.statement("setOrUpdateInterceptorsByTag(#);", | 1554 statements.add(js.js.statement("setOrUpdateInterceptorsByTag(#);", |
1555 js.objectLiteral(interceptorsByTag))); | 1555 js.objectLiteral(interceptorsByTag))); |
1556 statements.add( | 1556 statements.add( |
1557 js.js.statement("setOrUpdateLeafTags(#);", js.objectLiteral(leafTags))); | 1557 js.js.statement("setOrUpdateLeafTags(#);", js.objectLiteral(leafTags))); |
1558 statements.addAll(subclassAssignments); | 1558 statements.addAll(subclassAssignments); |
1559 | 1559 |
1560 return wrapPhase('nativeSupport', statements); | 1560 return wrapPhase('nativeSupport', statements); |
1561 } | 1561 } |
1562 } | 1562 } |
OLD | NEW |