| OLD | NEW |
| 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2014, 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 library dart2js.js_emitter.program_builder; | 5 library dart2js.js_emitter.program_builder; |
| 6 | 6 |
| 7 import 'js_emitter.dart' show computeMixinClass; | 7 import 'js_emitter.dart' show computeMixinClass; |
| 8 import 'model.dart'; | 8 import 'model.dart'; |
| 9 | 9 |
| 10 import '../common.dart'; | 10 import '../common.dart'; |
| (...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 116 | 116 |
| 117 bool containsNativeClasses = | 117 bool containsNativeClasses = |
| 118 nativeClasses.length != _unneededNativeClasses.length; | 118 nativeClasses.length != _unneededNativeClasses.length; |
| 119 | 119 |
| 120 return new Program( | 120 return new Program( |
| 121 outputs, | 121 outputs, |
| 122 _buildLoadMap(), | 122 _buildLoadMap(), |
| 123 _buildTypeToInterceptorMap(), | 123 _buildTypeToInterceptorMap(), |
| 124 _task.metadataCollector, | 124 _task.metadataCollector, |
| 125 outputContainsNativeClasses: containsNativeClasses, | 125 outputContainsNativeClasses: containsNativeClasses, |
| 126 outputContainsConstantList: _task.outputContainsConstantList); | 126 outputContainsConstantList: _task.outputContainsConstantList, |
| 127 hasIsolateSupport: _compiler.hasIsolateSupport); |
| 127 } | 128 } |
| 128 | 129 |
| 129 void _markEagerClasses() { | 130 void _markEagerClasses() { |
| 130 _markEagerInterceptorClasses(); | 131 _markEagerInterceptorClasses(); |
| 131 } | 132 } |
| 132 | 133 |
| 133 /// Builds a map from loadId to outputs-to-load. | 134 /// Builds a map from loadId to outputs-to-load. |
| 134 Map<String, List<Fragment>> _buildLoadMap() { | 135 Map<String, List<Fragment>> _buildLoadMap() { |
| 135 Map<String, List<Fragment>> loadMap = <String, List<Fragment>>{}; | 136 Map<String, List<Fragment>> loadMap = <String, List<Fragment>>{}; |
| 136 _compiler.deferredLoadTask.hunksToLoad | 137 _compiler.deferredLoadTask.hunksToLoad |
| (...skipping 515 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 652 _registry.registerConstant(outputUnit, constantValue); | 653 _registry.registerConstant(outputUnit, constantValue); |
| 653 assert(!_constants.containsKey(constantValue)); | 654 assert(!_constants.containsKey(constantValue)); |
| 654 String name = namer.constantName(constantValue); | 655 String name = namer.constantName(constantValue); |
| 655 String constantObject = namer.globalObjectForConstant(constantValue); | 656 String constantObject = namer.globalObjectForConstant(constantValue); |
| 656 Holder holder = _registry.registerHolder(constantObject); | 657 Holder holder = _registry.registerHolder(constantObject); |
| 657 Constant constant = new Constant(name, holder, constantValue); | 658 Constant constant = new Constant(name, holder, constantValue); |
| 658 _constants[constantValue] = constant; | 659 _constants[constantValue] = constant; |
| 659 } | 660 } |
| 660 } | 661 } |
| 661 } | 662 } |
| OLD | NEW |