| 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'; |
| (...skipping 620 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 631 isClosureCallMethod: isClosureCallMethod, aliasName: aliasName, | 631 isClosureCallMethod: isClosureCallMethod, aliasName: aliasName, |
| 632 canBeApplied: canBeApplied, canBeReflected: canBeReflected, | 632 canBeApplied: canBeApplied, canBeReflected: canBeReflected, |
| 633 requiredParameterCount: requiredParameterCount, | 633 requiredParameterCount: requiredParameterCount, |
| 634 optionalParameterDefaultValues: optionalParameterDefaultValues, | 634 optionalParameterDefaultValues: optionalParameterDefaultValues, |
| 635 functionType: functionType); | 635 functionType: functionType); |
| 636 } | 636 } |
| 637 | 637 |
| 638 js.Expression _generateFunctionType(DartType type, OutputUnit outputUnit) { | 638 js.Expression _generateFunctionType(DartType type, OutputUnit outputUnit) { |
| 639 if (type.containsTypeVariables) { | 639 if (type.containsTypeVariables) { |
| 640 js.Expression thisAccess = js.js(r'this.$receiver'); | 640 js.Expression thisAccess = js.js(r'this.$receiver'); |
| 641 return backend.rti.getSignatureEncoding(type, thisAccess); | 641 return backend.rtiEncoder.getSignatureEncoding(type, thisAccess); |
| 642 } else { | 642 } else { |
| 643 return backend.emitter.metadataCollector | 643 return backend.emitter.metadataCollector |
| 644 .reifyTypeForOutputUnit(type, outputUnit); | 644 .reifyTypeForOutputUnit(type, outputUnit); |
| 645 } | 645 } |
| 646 } | 646 } |
| 647 | 647 |
| 648 List<ParameterStubMethod> _generateParameterStubs(MethodElement element, | 648 List<ParameterStubMethod> _generateParameterStubs(MethodElement element, |
| 649 bool canTearOff) { | 649 bool canTearOff) { |
| 650 | 650 |
| 651 if (!_methodNeedsStubs(element)) return const <ParameterStubMethod>[]; | 651 if (!_methodNeedsStubs(element)) return const <ParameterStubMethod>[]; |
| (...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 829 Constant constant = new Constant(name, holder, constantValue); | 829 Constant constant = new Constant(name, holder, constantValue); |
| 830 _constants[constantValue] = constant; | 830 _constants[constantValue] = constant; |
| 831 } | 831 } |
| 832 } | 832 } |
| 833 | 833 |
| 834 Holder _registerStaticStateHolder() { | 834 Holder _registerStaticStateHolder() { |
| 835 return _registry.registerHolder( | 835 return _registry.registerHolder( |
| 836 namer.staticStateHolder, isStaticStateHolder: true); | 836 namer.staticStateHolder, isStaticStateHolder: true); |
| 837 } | 837 } |
| 838 } | 838 } |
| OLD | NEW |