| 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' | |
| 8 show | |
| 9 ClassStubGenerator, | |
| 10 CodeEmitterTask, | |
| 11 computeMixinClass, | |
| 12 Emitter, | |
| 13 InterceptorStubGenerator, | |
| 14 MainCallStubGenerator, | |
| 15 ParameterStubGenerator, | |
| 16 RuntimeTypeGenerator, | |
| 17 TypeTestProperties; | |
| 18 import '../model.dart'; | |
| 19 | |
| 20 import '../../closure.dart' show ClosureFieldElement; | 7 import '../../closure.dart' show ClosureFieldElement; |
| 21 import '../../common.dart'; | 8 import '../../common.dart'; |
| 22 import '../../common/names.dart' show Names, Selectors; | 9 import '../../common/names.dart' show Names, Selectors; |
| 23 import '../../compiler.dart' show Compiler; | 10 import '../../compiler.dart' show Compiler; |
| 24 import '../../constants/values.dart' | 11 import '../../constants/values.dart' |
| 25 show ConstantValue, InterceptorConstantValue; | 12 show ConstantValue, InterceptorConstantValue; |
| 26 import '../../core_types.dart' show CoreClasses; | 13 import '../../core_types.dart' show CoreClasses; |
| 27 import '../../dart_types.dart' show DartType, FunctionType, TypedefType; | 14 import '../../dart_types.dart' show DartType, FunctionType, TypedefType; |
| 15 import '../../deferred_load.dart' show DeferredLoadTask, OutputUnit; |
| 28 import '../../elements/elements.dart' | 16 import '../../elements/elements.dart' |
| 29 show | 17 show |
| 30 ClassElement, | 18 ClassElement, |
| 31 Element, | 19 Element, |
| 32 Elements, | 20 Elements, |
| 33 FieldElement, | 21 FieldElement, |
| 34 FunctionElement, | 22 FunctionElement, |
| 35 FunctionSignature, | 23 FunctionSignature, |
| 36 GetterElement, | 24 GetterElement, |
| 37 LibraryElement, | 25 LibraryElement, |
| 38 MethodElement, | 26 MethodElement, |
| 39 Name, | |
| 40 ParameterElement, | 27 ParameterElement, |
| 41 TypedefElement, | 28 TypedefElement, |
| 42 VariableElement; | 29 VariableElement; |
| 43 import '../../js/js.dart' as js; | 30 import '../../js/js.dart' as js; |
| 44 import '../../js_backend/backend_helpers.dart' show BackendHelpers; | 31 import '../../js_backend/backend_helpers.dart' show BackendHelpers; |
| 45 import '../../js_backend/js_backend.dart' | 32 import '../../js_backend/js_backend.dart' |
| 46 show Namer, JavaScriptBackend, JavaScriptConstantCompiler, StringBackedName; | 33 show Namer, JavaScriptBackend, JavaScriptConstantCompiler, StringBackedName; |
| 47 import '../../universe/selector.dart' show Selector; | 34 import '../../universe/selector.dart' show Selector; |
| 48 import '../../universe/universe.dart' show Universe, SelectorConstraints; | 35 import '../../universe/universe.dart' show Universe, SelectorConstraints; |
| 49 import '../../deferred_load.dart' show DeferredLoadTask, OutputUnit; | 36 import '../js_emitter.dart' |
| 37 show |
| 38 ClassStubGenerator, |
| 39 CodeEmitterTask, |
| 40 computeMixinClass, |
| 41 Emitter, |
| 42 InterceptorStubGenerator, |
| 43 MainCallStubGenerator, |
| 44 ParameterStubGenerator, |
| 45 RuntimeTypeGenerator, |
| 46 TypeTestProperties; |
| 47 import '../model.dart'; |
| 50 | 48 |
| 51 part 'collector.dart'; | 49 part 'collector.dart'; |
| 50 part 'field_visitor.dart'; |
| 52 part 'registry.dart'; | 51 part 'registry.dart'; |
| 53 part 'field_visitor.dart'; | |
| 54 | 52 |
| 55 /// Builds a self-contained representation of the program that can then be | 53 /// Builds a self-contained representation of the program that can then be |
| 56 /// emitted more easily by the individual emitters. | 54 /// emitted more easily by the individual emitters. |
| 57 class ProgramBuilder { | 55 class ProgramBuilder { |
| 58 final Compiler _compiler; | 56 final Compiler _compiler; |
| 59 final Namer namer; | 57 final Namer namer; |
| 60 final CodeEmitterTask _task; | 58 final CodeEmitterTask _task; |
| 61 | 59 |
| 62 /// Contains the collected information the program builder used to build | 60 /// Contains the collected information the program builder used to build |
| 63 /// the model. | 61 /// the model. |
| (...skipping 913 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 977 Constant constant = new Constant(name, holder, constantValue); | 975 Constant constant = new Constant(name, holder, constantValue); |
| 978 _constants[constantValue] = constant; | 976 _constants[constantValue] = constant; |
| 979 } | 977 } |
| 980 } | 978 } |
| 981 | 979 |
| 982 Holder _registerStaticStateHolder() { | 980 Holder _registerStaticStateHolder() { |
| 983 return _registry.registerHolder(namer.staticStateHolder, | 981 return _registry.registerHolder(namer.staticStateHolder, |
| 984 isStaticStateHolder: true); | 982 isStaticStateHolder: true); |
| 985 } | 983 } |
| 986 } | 984 } |
| OLD | NEW |