| 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 ddc.src.codegen.reify_coercions; | 5 library ddc.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; |
| 11 import 'package:source_span/source_span.dart' show SourceFile; | 11 import 'package:source_span/source_span.dart' show SourceFile; |
| 12 | 12 |
| 13 import 'package:ddc/src/checker/rules.dart'; | 13 import 'package:dev_compiler/src/checker/rules.dart'; |
| 14 import 'package:ddc/src/info.dart'; | 14 import 'package:dev_compiler/src/info.dart'; |
| 15 import 'package:ddc/src/utils.dart' as utils; | 15 import 'package:dev_compiler/src/utils.dart' as utils; |
| 16 | 16 |
| 17 import 'ast_builder.dart'; | 17 import 'ast_builder.dart'; |
| 18 | 18 |
| 19 final _log = new logger.Logger('ddc.reify_coercions'); | 19 final _log = new logger.Logger('ddc.reify_coercions'); |
| 20 | 20 |
| 21 // TODO(leafp) Factor this out or use an existing library | 21 // TODO(leafp) Factor this out or use an existing library |
| 22 class Tuple2<T0, T1> { | 22 class Tuple2<T0, T1> { |
| 23 final T0 e0; | 23 final T0 e0; |
| 24 final T1 e1; | 24 final T1 e1; |
| 25 Tuple2(this.e0, this.e1); | 25 Tuple2(this.e0, this.e1); |
| (...skipping 631 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 657 Expression _typeExpression(TypeName t) { | 657 Expression _typeExpression(TypeName t) { |
| 658 if (t.typeArguments != null && t.typeArguments.length > 0) { | 658 if (t.typeArguments != null && t.typeArguments.length > 0) { |
| 659 var w = AstBuilder.identifierFromString("_"); | 659 var w = AstBuilder.identifierFromString("_"); |
| 660 var fp = AstBuilder.simpleFormal(w, t); | 660 var fp = AstBuilder.simpleFormal(w, t); |
| 661 var f = AstBuilder.blockFunction(<FormalParameter>[fp], <Statement>[]); | 661 var f = AstBuilder.blockFunction(<FormalParameter>[fp], <Statement>[]); |
| 662 return new RuntimeOperation("type", <Expression>[f]); | 662 return new RuntimeOperation("type", <Expression>[f]); |
| 663 } | 663 } |
| 664 return t.name; | 664 return t.name; |
| 665 } | 665 } |
| 666 } | 666 } |
| OLD | NEW |