Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2016, 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 import 'package:js_runtime/shared/embedded_names.dart'; | 5 import 'package:js_runtime/shared/embedded_names.dart'; |
| 6 import 'package:kernel/ast.dart' as ir; | 6 import 'package:kernel/ast.dart' as ir; |
| 7 | 7 |
| 8 import '../common.dart'; | 8 import '../common.dart'; |
| 9 import '../common/names.dart'; | 9 import '../common/names.dart'; |
| 10 import '../compiler.dart'; | 10 import '../compiler.dart'; |
| (...skipping 551 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 562 List<ir.VariableDeclaration> sortedNamedParameters = | 562 List<ir.VariableDeclaration> sortedNamedParameters = |
| 563 node.namedParameters.toList()..sort((a, b) => a.name.compareTo(b.name)); | 563 node.namedParameters.toList()..sort((a, b) => a.name.compareTo(b.name)); |
| 564 for (ir.VariableDeclaration variable in sortedNamedParameters) { | 564 for (ir.VariableDeclaration variable in sortedNamedParameters) { |
| 565 namedParameters.add(variable.name); | 565 namedParameters.add(variable.name); |
| 566 namedParameterTypes.add(getDartType(variable.type)); | 566 namedParameterTypes.add(getDartType(variable.type)); |
| 567 } | 567 } |
| 568 return new ResolutionFunctionType.synthesized(returnType, parameterTypes, | 568 return new ResolutionFunctionType.synthesized(returnType, parameterTypes, |
| 569 optionalParameterTypes, namedParameters, namedParameterTypes); | 569 optionalParameterTypes, namedParameters, namedParameterTypes); |
| 570 } | 570 } |
| 571 | 571 |
| 572 ResolutionInterfaceType getInterfaceType(ir.DartType type) => getDartType(type ); | |
|
Siggi Cherem (dart-lang)
2017/01/18 19:29:08
long line
Johnni Winther
2017/01/19 12:32:57
Done.
| |
| 573 | |
| 574 ResolutionInterfaceType createInterfaceType( | |
| 575 ClassElement cls, List<ResolutionDartType> typeArguments) { | |
| 576 return new ResolutionInterfaceType(cls, typeArguments); | |
| 577 } | |
| 578 | |
| 572 /// Converts [annotations] into a list of [ConstantExpression]s. | 579 /// Converts [annotations] into a list of [ConstantExpression]s. |
| 573 List<ConstantExpression> getMetadata(List<ir.Expression> annotations) { | 580 List<ConstantExpression> getMetadata(List<ir.Expression> annotations) { |
| 574 List<ConstantExpression> metadata = <ConstantExpression>[]; | 581 List<ConstantExpression> metadata = <ConstantExpression>[]; |
| 575 annotations.forEach((ir.Expression node) { | 582 annotations.forEach((ir.Expression node) { |
| 576 ConstantExpression constant = node.accept(new Constantifier(this)); | 583 ConstantExpression constant = node.accept(new Constantifier(this)); |
| 577 if (constant == null) { | 584 if (constant == null) { |
| 578 throw new UnsupportedError( | 585 throw new UnsupportedError( |
| 579 'No constant for ${DebugPrinter.prettyPrint(node)}'); | 586 'No constant for ${DebugPrinter.prettyPrint(node)}'); |
| 580 } | 587 } |
| 581 metadata.add(constant); | 588 metadata.add(constant); |
| (...skipping 410 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 992 | 999 |
| 993 @override | 1000 @override |
| 994 String get name => null; | 1001 String get name => null; |
| 995 | 1002 |
| 996 @override | 1003 @override |
| 997 int get nestingLevel => 1; | 1004 int get nestingLevel => 1; |
| 998 | 1005 |
| 999 @override | 1006 @override |
| 1000 ast.Node get statement => null; | 1007 ast.Node get statement => null; |
| 1001 } | 1008 } |
| OLD | NEW |