| 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.md file. | 3 // BSD-style license that can be found in the LICENSE.md file. |
| 4 | 4 |
| 5 import 'dart:async'; | 5 import 'dart:async'; |
| 6 import 'dart:collection' show Queue; | 6 import 'dart:collection' show Queue; |
| 7 | 7 |
| 8 import 'package:kernel/ast.dart' as ir; | 8 import 'package:kernel/ast.dart' as ir; |
| 9 import 'package:kernel/verifier.dart' show CheckParentPointers; | 9 import 'package:kernel/verifier.dart' show CheckParentPointers; |
| 10 | 10 |
| (...skipping 330 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 341 } | 341 } |
| 342 | 342 |
| 343 ir.DartType typeToIr(DartType type) { | 343 ir.DartType typeToIr(DartType type) { |
| 344 switch (type.kind) { | 344 switch (type.kind) { |
| 345 case TypeKind.FUNCTION: | 345 case TypeKind.FUNCTION: |
| 346 return functionTypeToIr(type); | 346 return functionTypeToIr(type); |
| 347 | 347 |
| 348 case TypeKind.INTERFACE: | 348 case TypeKind.INTERFACE: |
| 349 return interfaceTypeToIr(type); | 349 return interfaceTypeToIr(type); |
| 350 | 350 |
| 351 case TypeKind.STATEMENT: | |
| 352 throw "Internal error: statement type: $type."; | |
| 353 | |
| 354 case TypeKind.TYPEDEF: | 351 case TypeKind.TYPEDEF: |
| 355 type.computeUnaliased(compiler.resolution); | 352 type.computeUnaliased(compiler.resolution); |
| 356 return typeToIr(type.unaliased); | 353 return typeToIr(type.unaliased); |
| 357 | 354 |
| 358 case TypeKind.TYPE_VARIABLE: | 355 case TypeKind.TYPE_VARIABLE: |
| 359 return typeVariableTypeToIr(type); | 356 return typeVariableTypeToIr(type); |
| 360 | 357 |
| 361 case TypeKind.MALFORMED_TYPE: | 358 case TypeKind.MALFORMED_TYPE: |
| 362 return const ir.InvalidType(); | 359 return const ir.InvalidType(); |
| 363 | 360 |
| (...skipping 399 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 763 } | 760 } |
| 764 | 761 |
| 765 class ConstructorTarget { | 762 class ConstructorTarget { |
| 766 final ConstructorElement element; | 763 final ConstructorElement element; |
| 767 final DartType type; | 764 final DartType type; |
| 768 | 765 |
| 769 ConstructorTarget(this.element, this.type); | 766 ConstructorTarget(this.element, this.type); |
| 770 | 767 |
| 771 String toString() => "ConstructorTarget($element, $type)"; | 768 String toString() => "ConstructorTarget($element, $type)"; |
| 772 } | 769 } |
| OLD | NEW |