| 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 554 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 565 requiredParameterCount: requiredParameterCount, | 565 requiredParameterCount: requiredParameterCount, |
| 566 optionalParameterDefaultValues: optionalParameterDefaultValues, | 566 optionalParameterDefaultValues: optionalParameterDefaultValues, |
| 567 functionType: functionType); | 567 functionType: functionType); |
| 568 } | 568 } |
| 569 | 569 |
| 570 js.Expression _generateFunctionType(DartType type, OutputUnit outputUnit) { | 570 js.Expression _generateFunctionType(DartType type, OutputUnit outputUnit) { |
| 571 if (type.containsTypeVariables) { | 571 if (type.containsTypeVariables) { |
| 572 js.Expression thisAccess = js.js(r'this.$receiver'); | 572 js.Expression thisAccess = js.js(r'this.$receiver'); |
| 573 return backend.rti.getSignatureEncoding(type, thisAccess); | 573 return backend.rti.getSignatureEncoding(type, thisAccess); |
| 574 } else { | 574 } else { |
| 575 return js.number(backend.emitter.metadataCollector. | 575 return backend.emitter.metadataCollector |
| 576 reifyTypeForOutputUnit(type, outputUnit)); | 576 .reifyTypeForOutputUnit(type, outputUnit); |
| 577 } | 577 } |
| 578 } | 578 } |
| 579 | 579 |
| 580 List<ParameterStubMethod> _generateParameterStubs(MethodElement element, | 580 List<ParameterStubMethod> _generateParameterStubs(MethodElement element, |
| 581 bool canTearOff) { | 581 bool canTearOff) { |
| 582 | 582 |
| 583 if (!_methodNeedsStubs(element)) return const <ParameterStubMethod>[]; | 583 if (!_methodNeedsStubs(element)) return const <ParameterStubMethod>[]; |
| 584 | 584 |
| 585 ParameterStubGenerator generator = | 585 ParameterStubGenerator generator = |
| 586 new ParameterStubGenerator(_compiler, namer, backend); | 586 new ParameterStubGenerator(_compiler, namer, backend); |
| (...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 755 _registry.registerConstant(outputUnit, constantValue); | 755 _registry.registerConstant(outputUnit, constantValue); |
| 756 assert(!_constants.containsKey(constantValue)); | 756 assert(!_constants.containsKey(constantValue)); |
| 757 String name = namer.constantName(constantValue); | 757 String name = namer.constantName(constantValue); |
| 758 String constantObject = namer.globalObjectForConstant(constantValue); | 758 String constantObject = namer.globalObjectForConstant(constantValue); |
| 759 Holder holder = _registry.registerHolder(constantObject); | 759 Holder holder = _registry.registerHolder(constantObject); |
| 760 Constant constant = new Constant(name, holder, constantValue); | 760 Constant constant = new Constant(name, holder, constantValue); |
| 761 _constants[constantValue] = constant; | 761 _constants[constantValue] = constant; |
| 762 } | 762 } |
| 763 } | 763 } |
| 764 } | 764 } |
| OLD | NEW |