Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2015, 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 dev_compiler.src.codegen.reify_coercions; | 5 library dev_compiler.src.codegen.reify_coercions; |
| 6 | 6 |
| 7 import 'package:analyzer/analyzer.dart' as analyzer; | 7 import 'package:analyzer/analyzer.dart' as analyzer; |
| 8 import 'package:analyzer/src/generated/ast.dart'; | 8 import 'package:analyzer/src/generated/ast.dart'; |
| 9 import 'package:analyzer/src/generated/element.dart'; | 9 import 'package:analyzer/src/generated/element.dart'; |
| 10 import 'package:logging/logging.dart' as logger; | 10 import 'package:logging/logging.dart' as logger; |
| (...skipping 583 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 594 _ftMap(type.namedParameterTypes); | 594 _ftMap(type.namedParameterTypes); |
| 595 _ftList(type.normalParameterTypes); | 595 _ftList(type.normalParameterTypes); |
| 596 _ftList(type.optionalParameterTypes); | 596 _ftList(type.optionalParameterTypes); |
| 597 _ft(type.returnType); | 597 _ft(type.returnType); |
| 598 return; | 598 return; |
| 599 } | 599 } |
| 600 assert(type is! InterfaceType); | 600 assert(type is! InterfaceType); |
| 601 assert(false); | 601 assert(false); |
| 602 } | 602 } |
| 603 if (type is VoidType) return; | 603 if (type is VoidType) return; |
| 604 assert(type is! UnionType); | |
|
Siggi Cherem (dart-lang)
2015/04/08 20:58:55
UnionType was deleted in 0.24.3
| |
| 605 print(type.toString()); | 604 print(type.toString()); |
| 606 assert(false); | 605 assert(false); |
| 607 } | 606 } |
| 608 _ft(type); | 607 _ft(type); |
| 609 return s.toList(); | 608 return s.toList(); |
| 610 } | 609 } |
| 611 | 610 |
| 612 List<FormalParameter> _formalParameterListForFunctionType(FunctionType type) { | 611 List<FormalParameter> _formalParameterListForFunctionType(FunctionType type) { |
| 613 var namedParameters = type.namedParameterTypes; | 612 var namedParameters = type.namedParameterTypes; |
| 614 var normalParameters = type.normalParameterTypes; | 613 var normalParameters = type.normalParameterTypes; |
| (...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 721 Expression _typeExpression(TypeName t) { | 720 Expression _typeExpression(TypeName t) { |
| 722 if (t.typeArguments != null && t.typeArguments.length > 0) { | 721 if (t.typeArguments != null && t.typeArguments.length > 0) { |
| 723 var w = AstBuilder.identifierFromString("_"); | 722 var w = AstBuilder.identifierFromString("_"); |
| 724 var fp = AstBuilder.simpleFormal(w, t); | 723 var fp = AstBuilder.simpleFormal(w, t); |
| 725 var f = AstBuilder.blockFunction(<FormalParameter>[fp], <Statement>[]); | 724 var f = AstBuilder.blockFunction(<FormalParameter>[fp], <Statement>[]); |
| 726 return new RuntimeOperation("type", <Expression>[f]); | 725 return new RuntimeOperation("type", <Expression>[f]); |
| 727 } | 726 } |
| 728 return t.name; | 727 return t.name; |
| 729 } | 728 } |
| 730 } | 729 } |
| OLD | NEW |