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 '../../closure.dart' show ClosureTask, ClosureFieldElement; | 7 import '../../closure.dart' show ClosureTask, ClosureFieldElement; |
8 import '../../common.dart'; | 8 import '../../common.dart'; |
9 import '../../common/names.dart' show Names, Selectors; | 9 import '../../common/names.dart' show Names, Selectors; |
10 import '../../compiler.dart' show Compiler; | 10 import '../../compiler.dart' show Compiler; |
(...skipping 827 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
838 return _rtiEncoder.getSignatureEncoding(_task.emitter, type, thisAccess); | 838 return _rtiEncoder.getSignatureEncoding(_task.emitter, type, thisAccess); |
839 } else { | 839 } else { |
840 return _task.metadataCollector.reifyTypeForOutputUnit(type, outputUnit); | 840 return _task.metadataCollector.reifyTypeForOutputUnit(type, outputUnit); |
841 } | 841 } |
842 } | 842 } |
843 | 843 |
844 List<ParameterStubMethod> _generateParameterStubs( | 844 List<ParameterStubMethod> _generateParameterStubs( |
845 MethodElement element, bool canTearOff) { | 845 MethodElement element, bool canTearOff) { |
846 if (!_methodNeedsStubs(element)) return const <ParameterStubMethod>[]; | 846 if (!_methodNeedsStubs(element)) return const <ParameterStubMethod>[]; |
847 | 847 |
848 ParameterStubGenerator generator = | 848 ParameterStubGenerator generator = new ParameterStubGenerator( |
849 new ParameterStubGenerator(_compiler, _namer, _backend, _closedWorld); | 849 _commonElements, |
| 850 _task, |
| 851 _constantHandler, |
| 852 _namer, |
| 853 _nativeData, |
| 854 _interceptorData, |
| 855 _worldBuilder, |
| 856 _closedWorld); |
850 return generator.generateParameterStubs(element, canTearOff: canTearOff); | 857 return generator.generateParameterStubs(element, canTearOff: canTearOff); |
851 } | 858 } |
852 | 859 |
853 /// Builds a stub method. | 860 /// Builds a stub method. |
854 /// | 861 /// |
855 /// Stub methods may have an element that can be used for code-size | 862 /// Stub methods may have an element that can be used for code-size |
856 /// attribution. | 863 /// attribution. |
857 Method _buildStubMethod(js.Name name, js.Expression code, | 864 Method _buildStubMethod(js.Name name, js.Expression code, |
858 {MemberElement element}) { | 865 {MemberElement element}) { |
859 return new StubMethod(name, code, element: element); | 866 return new StubMethod(name, code, element: element); |
(...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1046 Constant constant = new Constant(name, holder, constantValue); | 1053 Constant constant = new Constant(name, holder, constantValue); |
1047 _constants[constantValue] = constant; | 1054 _constants[constantValue] = constant; |
1048 } | 1055 } |
1049 } | 1056 } |
1050 | 1057 |
1051 Holder _registerStaticStateHolder() { | 1058 Holder _registerStaticStateHolder() { |
1052 return _registry.registerHolder(_namer.staticStateHolder, | 1059 return _registry.registerHolder(_namer.staticStateHolder, |
1053 isStaticStateHolder: true); | 1060 isStaticStateHolder: true); |
1054 } | 1061 } |
1055 } | 1062 } |
OLD | NEW |