| 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:collection' show Queue; | 5 import 'dart:collection' show Queue; |
| 6 | 6 |
| 7 import 'package:kernel/ast.dart' as ir; | 7 import 'package:kernel/ast.dart' as ir; |
| 8 import 'package:kernel/verifier.dart' show CheckParentPointers; | 8 import 'package:kernel/verifier.dart' show CheckParentPointers; |
| 9 | 9 |
| 10 import '../common.dart'; | 10 import '../common.dart'; |
| (...skipping 17 matching lines...) Expand all Loading... |
| 28 Element, | 28 Element, |
| 29 ExportElement, | 29 ExportElement, |
| 30 FieldElement, | 30 FieldElement, |
| 31 FunctionElement, | 31 FunctionElement, |
| 32 ImportElement, | 32 ImportElement, |
| 33 LibraryElement, | 33 LibraryElement, |
| 34 LocalFunctionElement, | 34 LocalFunctionElement, |
| 35 MetadataAnnotation, | 35 MetadataAnnotation, |
| 36 MixinApplicationElement, | 36 MixinApplicationElement, |
| 37 TypeVariableElement; | 37 TypeVariableElement; |
| 38 import '../elements/entities.dart' show LibraryEntity; |
| 38 import '../elements/modelx.dart' show ErroneousFieldElementX; | 39 import '../elements/modelx.dart' show ErroneousFieldElementX; |
| 39 import '../tree/tree.dart' show FunctionExpression, Node; | 40 import '../tree/tree.dart' show FunctionExpression, Node; |
| 40 import 'constant_visitor.dart'; | 41 import 'constant_visitor.dart'; |
| 41 import 'kernel_visitor.dart' show IrFunction, KernelVisitor; | 42 import 'kernel_visitor.dart' show IrFunction, KernelVisitor; |
| 42 | 43 |
| 43 typedef void WorkAction(); | 44 typedef void WorkAction(); |
| 44 | 45 |
| 45 class WorkItem { | 46 class WorkItem { |
| 46 final Element element; | 47 final Element element; |
| 47 final WorkAction action; | 48 final WorkAction action; |
| (...skipping 554 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 602 void debugMessage(Spannable spannable, String message) { | 603 void debugMessage(Spannable spannable, String message) { |
| 603 compiler.reporter | 604 compiler.reporter |
| 604 .reportHintMessage(spannable, MessageKind.GENERIC, {'text': message}); | 605 .reportHintMessage(spannable, MessageKind.GENERIC, {'text': message}); |
| 605 } | 606 } |
| 606 | 607 |
| 607 void internalError(Spannable spannable, String message) { | 608 void internalError(Spannable spannable, String message) { |
| 608 compiler.reporter.internalError(spannable, message); | 609 compiler.reporter.internalError(spannable, message); |
| 609 throw message; | 610 throw message; |
| 610 } | 611 } |
| 611 | 612 |
| 612 forEachLibraryElement(f(LibraryElement library)) { | 613 forEachLibraryElement(f(LibraryEntity library)) { |
| 613 return compiler.libraryLoader.libraries.forEach(f); | 614 return compiler.libraryLoader.libraries.forEach(f); |
| 614 } | 615 } |
| 615 | 616 |
| 616 ConstructorTarget computeEffectiveTarget( | 617 ConstructorTarget computeEffectiveTarget( |
| 617 ConstructorElement constructor, ResolutionDartType type) { | 618 ConstructorElement constructor, ResolutionDartType type) { |
| 618 constructor = constructor.implementation; | 619 constructor = constructor.implementation; |
| 619 Set<ConstructorElement> seen = new Set<ConstructorElement>(); | 620 Set<ConstructorElement> seen = new Set<ConstructorElement>(); |
| 620 functionToIr(constructor); | 621 functionToIr(constructor); |
| 621 while (constructor != constructor.effectiveTarget) { | 622 while (constructor != constructor.effectiveTarget) { |
| 622 type = constructor.computeEffectiveTargetType(type); | 623 type = constructor.computeEffectiveTargetType(type); |
| (...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 780 } | 781 } |
| 781 | 782 |
| 782 class ConstructorTarget { | 783 class ConstructorTarget { |
| 783 final ConstructorElement element; | 784 final ConstructorElement element; |
| 784 final ResolutionDartType type; | 785 final ResolutionDartType type; |
| 785 | 786 |
| 786 ConstructorTarget(this.element, this.type); | 787 ConstructorTarget(this.element, this.type); |
| 787 | 788 |
| 788 String toString() => "ConstructorTarget($element, $type)"; | 789 String toString() => "ConstructorTarget($element, $type)"; |
| 789 } | 790 } |
| OLD | NEW |