| 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, Emitter; | 7 import '../js_emitter.dart' show computeMixinClass, Emitter; |
| 8 import '../model.dart'; | 8 import '../model.dart'; |
| 9 | 9 |
| 10 import '../../common.dart'; | 10 import '../../common.dart'; |
| 11 import '../../js/js.dart' as js; | 11 import '../../js/js.dart' as js; |
| 12 | 12 |
| 13 import '../../js_backend/js_backend.dart' show | 13 import '../../js_backend/js_backend.dart' show |
| 14 Namer, | 14 Namer, |
| 15 JavaScriptBackend, | 15 JavaScriptBackend, |
| 16 JavaScriptConstantCompiler; | 16 JavaScriptConstantCompiler; |
| 17 | 17 |
| 18 import '../js_emitter.dart' show | 18 import '../js_emitter.dart' show |
| 19 ClassStubGenerator, | 19 ClassStubGenerator, |
| 20 CodeEmitterTask, | 20 CodeEmitterTask, |
| 21 InterceptorStubGenerator, | 21 InterceptorStubGenerator, |
| 22 MainCallStubGenerator, | 22 MainCallStubGenerator, |
| 23 ParameterStubGenerator, | 23 ParameterStubGenerator, |
| 24 RuntimeTypeGenerator, | 24 RuntimeTypeGenerator, |
| 25 TypeTestProperties; | 25 TypeTestProperties; |
| 26 | 26 |
| 27 import '../../elements/elements.dart' show ParameterElement, MethodElement; | 27 import '../../elements/elements.dart' show FieldElement, MethodElement, |
| 28 ParameterElement; |
| 28 | 29 |
| 29 import '../../universe/universe.dart' show Universe, TypeMaskSet; | 30 import '../../universe/universe.dart' show Universe, TypeMaskSet; |
| 30 import '../../deferred_load.dart' show DeferredLoadTask, OutputUnit; | 31 import '../../deferred_load.dart' show DeferredLoadTask, OutputUnit; |
| 31 | 32 |
| 32 part 'collector.dart'; | 33 part 'collector.dart'; |
| 33 part 'registry.dart'; | 34 part 'registry.dart'; |
| 34 | 35 |
| 35 /// Builds a self-contained representation of the program that can then be | 36 /// Builds a self-contained representation of the program that can then be |
| 36 /// emitted more easily by the individual emitters. | 37 /// emitted more easily by the individual emitters. |
| 37 class ProgramBuilder { | 38 class ProgramBuilder { |
| (...skipping 747 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 785 _registry.registerConstant(outputUnit, constantValue); | 786 _registry.registerConstant(outputUnit, constantValue); |
| 786 assert(!_constants.containsKey(constantValue)); | 787 assert(!_constants.containsKey(constantValue)); |
| 787 js.Name name = namer.constantName(constantValue); | 788 js.Name name = namer.constantName(constantValue); |
| 788 String constantObject = namer.globalObjectForConstant(constantValue); | 789 String constantObject = namer.globalObjectForConstant(constantValue); |
| 789 Holder holder = _registry.registerHolder(constantObject); | 790 Holder holder = _registry.registerHolder(constantObject); |
| 790 Constant constant = new Constant(name, holder, constantValue); | 791 Constant constant = new Constant(name, holder, constantValue); |
| 791 _constants[constantValue] = constant; | 792 _constants[constantValue] = constant; |
| 792 } | 793 } |
| 793 } | 794 } |
| 794 } | 795 } |
| OLD | NEW |