| 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 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 112 | 112 |
| 113 _markEagerClasses(); | 113 _markEagerClasses(); |
| 114 | 114 |
| 115 bool containsNativeClasses = | 115 bool containsNativeClasses = |
| 116 nativeClasses.length != _unneededNativeClasses.length; | 116 nativeClasses.length != _unneededNativeClasses.length; |
| 117 | 117 |
| 118 return new Program( | 118 return new Program( |
| 119 outputs, | 119 outputs, |
| 120 _buildLoadMap(), | 120 _buildLoadMap(), |
| 121 _buildTypeToInterceptorMap(), | 121 _buildTypeToInterceptorMap(), |
| 122 _task.metadataCollector, |
| 122 outputContainsNativeClasses: containsNativeClasses, | 123 outputContainsNativeClasses: containsNativeClasses, |
| 123 outputContainsConstantList: _task.outputContainsConstantList); | 124 outputContainsConstantList: _task.outputContainsConstantList); |
| 124 } | 125 } |
| 125 | 126 |
| 126 void _markEagerClasses() { | 127 void _markEagerClasses() { |
| 127 _markEagerInterceptorClasses(); | 128 _markEagerInterceptorClasses(); |
| 128 } | 129 } |
| 129 | 130 |
| 130 /// Builds a map from loadId to outputs-to-load. | 131 /// Builds a map from loadId to outputs-to-load. |
| 131 Map<String, List<Fragment>> _buildLoadMap() { | 132 Map<String, List<Fragment>> _buildLoadMap() { |
| (...skipping 457 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 589 _registry.registerConstant(outputUnit, constantValue); | 590 _registry.registerConstant(outputUnit, constantValue); |
| 590 assert(!_constants.containsKey(constantValue)); | 591 assert(!_constants.containsKey(constantValue)); |
| 591 String name = namer.constantName(constantValue); | 592 String name = namer.constantName(constantValue); |
| 592 String constantObject = namer.globalObjectForConstant(constantValue); | 593 String constantObject = namer.globalObjectForConstant(constantValue); |
| 593 Holder holder = _registry.registerHolder(constantObject); | 594 Holder holder = _registry.registerHolder(constantObject); |
| 594 Constant constant = new Constant(name, holder, constantValue); | 595 Constant constant = new Constant(name, holder, constantValue); |
| 595 _constants[constantValue] = constant; | 596 _constants[constantValue] = constant; |
| 596 } | 597 } |
| 597 } | 598 } |
| 598 } | 599 } |
| OLD | NEW |