| 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 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 67 <TypeVariableElement, ir.TypeParameter>{}; | 67 <TypeVariableElement, ir.TypeParameter>{}; |
| 68 | 68 |
| 69 final Set<ir.TreeNode> checkedNodes = new Set<ir.TreeNode>(); | 69 final Set<ir.TreeNode> checkedNodes = new Set<ir.TreeNode>(); |
| 70 | 70 |
| 71 final Map<LibraryElement, Map<String, int>> mixinApplicationNamesByLibrary = | 71 final Map<LibraryElement, Map<String, int>> mixinApplicationNamesByLibrary = |
| 72 <LibraryElement, Map<String, int>>{}; | 72 <LibraryElement, Map<String, int>>{}; |
| 73 | 73 |
| 74 final Map<ir.Node, Element> nodeToElement = <ir.Node, Element>{}; | 74 final Map<ir.Node, Element> nodeToElement = <ir.Node, Element>{}; |
| 75 final Map<ir.Node, Node> nodeToAst = <ir.Node, Node>{}; | 75 final Map<ir.Node, Node> nodeToAst = <ir.Node, Node>{}; |
| 76 final Map<ir.Node, Node> nodeToAstOperator = <ir.Node, Node>{}; | 76 final Map<ir.Node, Node> nodeToAstOperator = <ir.Node, Node>{}; |
| 77 // Synthetic nodes are nodes we generated that do not correspond to |
| 78 // [ast.Node]s. A node should be in one of nodeToAst or syntheticNodes but not |
| 79 // both. |
| 80 final Set<ir.Node> syntheticNodes = new Set<ir.Node>(); |
| 77 | 81 |
| 78 /// FIFO queue of work that needs to be completed before the returned AST | 82 /// FIFO queue of work that needs to be completed before the returned AST |
| 79 /// nodes are correct. | 83 /// nodes are correct. |
| 80 final Queue<WorkItem> workQueue = new Queue<WorkItem>(); | 84 final Queue<WorkItem> workQueue = new Queue<WorkItem>(); |
| 81 | 85 |
| 82 Kernel(this.compiler); | 86 Kernel(this.compiler); |
| 83 | 87 |
| 84 void addWork(Element element, WorkAction action) { | 88 void addWork(Element element, WorkAction action) { |
| 85 workQueue.addLast(new WorkItem(element, action)); | 89 workQueue.addLast(new WorkItem(element, action)); |
| 86 } | 90 } |
| (...skipping 668 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 755 } | 759 } |
| 756 | 760 |
| 757 class ConstructorTarget { | 761 class ConstructorTarget { |
| 758 final ConstructorElement element; | 762 final ConstructorElement element; |
| 759 final DartType type; | 763 final DartType type; |
| 760 | 764 |
| 761 ConstructorTarget(this.element, this.type); | 765 ConstructorTarget(this.element, this.type); |
| 762 | 766 |
| 763 String toString() => "ConstructorTarget($element, $type)"; | 767 String toString() => "ConstructorTarget($element, $type)"; |
| 764 } | 768 } |
| OLD | NEW |