| 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/checks.dart' show CheckParentPointers; | 9 import 'package:kernel/checks.dart' show CheckParentPointers; |
| 10 | 10 |
| 11 import '../compiler.dart' show Compiler; | 11 import '../compiler.dart' show Compiler; |
| 12 import '../constants/expressions.dart' show TypeConstantExpression; | 12 import '../constants/expressions.dart' show TypeConstantExpression; |
| 13 import '../dart_types.dart' | 13 import '../dart_types.dart' |
| 14 show DartType, FunctionType, InterfaceType, TypeKind, TypeVariableType; | 14 show DartType, FunctionType, InterfaceType, TypeKind, TypeVariableType; |
| 15 import '../diagnostics/messages.dart' show MessageKind; | 15 import '../diagnostics/messages.dart' show MessageKind; |
| 16 import '../diagnostics/spannable.dart' show Spannable; | 16 import '../diagnostics/spannable.dart' show Spannable; |
| 17 import '../elements/elements.dart' | 17 import '../elements/elements.dart' |
| 18 show | 18 show |
| 19 ClassElement, | 19 ClassElement, |
| 20 ConstructorElement, | 20 ConstructorElement, |
| 21 Element, | 21 Element, |
| 22 ExportElement, | 22 ExportElement, |
| 23 FieldElement, | 23 FieldElement, |
| 24 FunctionElement, | 24 FunctionElement, |
| 25 ImportElement, | 25 ImportElement, |
| 26 LibraryElement, | 26 LibraryElement, |
| 27 LocalFunctionElement, |
| 27 MixinApplicationElement, | 28 MixinApplicationElement, |
| 28 TypeVariableElement; | 29 TypeVariableElement; |
| 29 import '../elements/modelx.dart' show ErroneousFieldElementX; | 30 import '../elements/modelx.dart' show ErroneousFieldElementX; |
| 30 import '../tree/tree.dart' show FunctionExpression, Node; | 31 import '../tree/tree.dart' show FunctionExpression, Node; |
| 31 import 'kernel_visitor.dart' show IrFunction, KernelVisitor; | 32 import 'kernel_visitor.dart' show IrFunction, KernelVisitor; |
| 32 | 33 |
| 33 typedef void WorkAction(); | 34 typedef void WorkAction(); |
| 34 | 35 |
| 35 class WorkItem { | 36 class WorkItem { |
| 36 final Element element; | 37 final Element element; |
| 37 final WorkAction action; | 38 final WorkAction action; |
| 38 | 39 |
| 39 WorkItem(this.element, this.action); | 40 WorkItem(this.element, this.action); |
| 40 } | 41 } |
| 41 | 42 |
| 42 class Kernel { | 43 class Kernel { |
| 43 final Compiler compiler; | 44 final Compiler compiler; |
| 44 | 45 |
| 45 final Map<LibraryElement, ir.Library> libraries = | 46 final Map<LibraryElement, ir.Library> libraries = |
| 46 <LibraryElement, ir.Library>{}; | 47 <LibraryElement, ir.Library>{}; |
| 47 | 48 |
| 48 final Map<ClassElement, ir.Class> classes = <ClassElement, ir.Class>{}; | 49 final Map<ClassElement, ir.Class> classes = <ClassElement, ir.Class>{}; |
| 49 | 50 |
| 50 final Map<FunctionElement, ir.Member> functions = | 51 final Map<FunctionElement, ir.Member> functions = |
| 51 <FunctionElement, ir.Member>{}; | 52 <FunctionElement, ir.Member>{}; |
| 52 | 53 |
| 54 final Map<LocalFunctionElement, ir.FunctionDeclaration> localFunctions = |
| 55 <LocalFunctionElement, ir.FunctionDeclaration>{}; |
| 56 |
| 53 final Map<FieldElement, ir.Field> fields = <FieldElement, ir.Field>{}; | 57 final Map<FieldElement, ir.Field> fields = <FieldElement, ir.Field>{}; |
| 54 | 58 |
| 55 final Map<TypeVariableElement, ir.TypeParameter> typeParameters = | 59 final Map<TypeVariableElement, ir.TypeParameter> typeParameters = |
| 56 <TypeVariableElement, ir.TypeParameter>{}; | 60 <TypeVariableElement, ir.TypeParameter>{}; |
| 57 | 61 |
| 58 final Map<TypeVariableElement, ir.TypeParameter> factoryTypeParameters = | 62 final Map<TypeVariableElement, ir.TypeParameter> factoryTypeParameters = |
| 59 <TypeVariableElement, ir.TypeParameter>{}; | 63 <TypeVariableElement, ir.TypeParameter>{}; |
| 60 | 64 |
| 61 final Set<ir.TreeNode> checkedNodes = new Set<ir.TreeNode>(); | 65 final Set<ir.TreeNode> checkedNodes = new Set<ir.TreeNode>(); |
| 62 | 66 |
| (...skipping 585 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 648 } | 652 } |
| 649 | 653 |
| 650 class ConstructorTarget { | 654 class ConstructorTarget { |
| 651 final ConstructorElement element; | 655 final ConstructorElement element; |
| 652 final DartType type; | 656 final DartType type; |
| 653 | 657 |
| 654 ConstructorTarget(this.element, this.type); | 658 ConstructorTarget(this.element, this.type); |
| 655 | 659 |
| 656 String toString() => "ConstructorTarget($element, $type)"; | 660 String toString() => "ConstructorTarget($element, $type)"; |
| 657 } | 661 } |
| OLD | NEW |