Chromium Code Reviews| 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 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 109 .map((OutputUnit unit) => _outputs[unit]) | 109 .map((OutputUnit unit) => _outputs[unit]) |
| 110 .toList(growable: false); | 110 .toList(growable: false); |
| 111 }); | 111 }); |
| 112 return loadMap; | 112 return loadMap; |
| 113 } | 113 } |
| 114 | 114 |
| 115 MainOutput _buildMainOutput(Fragment fragment) { | 115 MainOutput _buildMainOutput(Fragment fragment) { |
| 116 // Construct the main output from the libraries and the registered holders. | 116 // Construct the main output from the libraries and the registered holders. |
| 117 MainOutput result = new MainOutput( | 117 MainOutput result = new MainOutput( |
| 118 "", // The empty string is the name for the main output file. | 118 "", // The empty string is the name for the main output file. |
| 119 namer.elementAccess(_compiler.mainFunction), | 119 backend.emitter.globalPropertyAccess(_compiler.mainFunction), |
|
floitsch
2014/12/03 17:02:26
staticFunctionAccess
zarah
2014/12/05 08:22:51
Done.
| |
| 120 _buildLibraries(fragment), | 120 _buildLibraries(fragment), |
| 121 _buildStaticNonFinalFields(fragment), | 121 _buildStaticNonFinalFields(fragment), |
| 122 _buildStaticLazilyInitializedFields(fragment), | 122 _buildStaticLazilyInitializedFields(fragment), |
| 123 _buildConstants(fragment), | 123 _buildConstants(fragment), |
| 124 _registry.holders.toList(growable: false)); | 124 _registry.holders.toList(growable: false)); |
| 125 _outputs[fragment.outputUnit] = result; | 125 _outputs[fragment.outputUnit] = result; |
| 126 return result; | 126 return result; |
| 127 } | 127 } |
| 128 | 128 |
| 129 /// Returns a name composed of the main output file name and [name]. | 129 /// Returns a name composed of the main output file name and [name]. |
| (...skipping 287 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 417 for (ConstantValue constantValue in constantValues) { | 417 for (ConstantValue constantValue in constantValues) { |
| 418 assert(!_constants.containsKey(constantValue)); | 418 assert(!_constants.containsKey(constantValue)); |
| 419 String name = namer.constantName(constantValue); | 419 String name = namer.constantName(constantValue); |
| 420 String constantObject = namer.globalObjectForConstant(constantValue); | 420 String constantObject = namer.globalObjectForConstant(constantValue); |
| 421 Holder holder = _registry.registerHolder(constantObject); | 421 Holder holder = _registry.registerHolder(constantObject); |
| 422 Constant constant = new Constant(name, holder, constantValue); | 422 Constant constant = new Constant(name, holder, constantValue); |
| 423 _constants[constantValue] = constant; | 423 _constants[constantValue] = constant; |
| 424 }; | 424 }; |
| 425 } | 425 } |
| 426 } | 426 } |
| OLD | NEW |