| 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 analyzer.src.task.dart; | 5 library analyzer.src.task.dart; |
| 6 | 6 |
| 7 import 'dart:collection'; | 7 import 'dart:collection'; |
| 8 | 8 |
| 9 import 'package:analyzer/src/context/cache.dart'; | 9 import 'package:analyzer/src/context/cache.dart'; |
| 10 import 'package:analyzer/src/generated/ast.dart'; | 10 import 'package:analyzer/src/generated/ast.dart'; |
| (...skipping 2827 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2838 // | 2838 // |
| 2839 LibraryElement libraryElement = getRequiredInput(LIBRARY_INPUT); | 2839 LibraryElement libraryElement = getRequiredInput(LIBRARY_INPUT); |
| 2840 CompilationUnit unit = getRequiredInput(UNIT_INPUT); | 2840 CompilationUnit unit = getRequiredInput(UNIT_INPUT); |
| 2841 CompilationUnitElement unitElement = unit.element; | 2841 CompilationUnitElement unitElement = unit.element; |
| 2842 TypeProvider typeProvider = getRequiredInput(TYPE_PROVIDER_INPUT); | 2842 TypeProvider typeProvider = getRequiredInput(TYPE_PROVIDER_INPUT); |
| 2843 // | 2843 // |
| 2844 // Resolve references. | 2844 // Resolve references. |
| 2845 // | 2845 // |
| 2846 InheritanceManager inheritanceManager = | 2846 InheritanceManager inheritanceManager = |
| 2847 new InheritanceManager(libraryElement); | 2847 new InheritanceManager(libraryElement); |
| 2848 AstVisitor visitor = new ResolverVisitor.con2(libraryElement, | 2848 AstVisitor visitor = new ResolverVisitor( |
| 2849 unitElement.source, typeProvider, inheritanceManager, errorListener); | 2849 libraryElement, unitElement.source, typeProvider, errorListener, |
| 2850 inheritanceManager: inheritanceManager); |
| 2850 unit.accept(visitor); | 2851 unit.accept(visitor); |
| 2851 // | 2852 // |
| 2852 // Record outputs. | 2853 // Record outputs. |
| 2853 // | 2854 // |
| 2854 outputs[RESOLVE_REFERENCES_ERRORS] = | 2855 outputs[RESOLVE_REFERENCES_ERRORS] = |
| 2855 removeDuplicateErrors(errorListener.errors); | 2856 removeDuplicateErrors(errorListener.errors); |
| 2856 outputs[RESOLVED_UNIT5] = unit; | 2857 outputs[RESOLVED_UNIT5] = unit; |
| 2857 } | 2858 } |
| 2858 | 2859 |
| 2859 /** | 2860 /** |
| (...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2924 // | 2925 // |
| 2925 // Prepare inputs. | 2926 // Prepare inputs. |
| 2926 // | 2927 // |
| 2927 LibraryElement library = getRequiredInput(LIBRARY_INPUT); | 2928 LibraryElement library = getRequiredInput(LIBRARY_INPUT); |
| 2928 CompilationUnit unit = getRequiredInput(UNIT_INPUT); | 2929 CompilationUnit unit = getRequiredInput(UNIT_INPUT); |
| 2929 CompilationUnitElement unitElement = unit.element; | 2930 CompilationUnitElement unitElement = unit.element; |
| 2930 TypeProvider typeProvider = getRequiredInput(TYPE_PROVIDER_INPUT); | 2931 TypeProvider typeProvider = getRequiredInput(TYPE_PROVIDER_INPUT); |
| 2931 // | 2932 // |
| 2932 // Resolve TypeName nodes. | 2933 // Resolve TypeName nodes. |
| 2933 // | 2934 // |
| 2934 TypeResolverVisitor visitor = new TypeResolverVisitor.con2( | 2935 TypeResolverVisitor visitor = new TypeResolverVisitor( |
| 2935 library, unitElement.source, typeProvider, errorListener); | 2936 library, unitElement.source, typeProvider, errorListener); |
| 2936 unit.accept(visitor); | 2937 unit.accept(visitor); |
| 2937 // | 2938 // |
| 2938 // Record outputs. | 2939 // Record outputs. |
| 2939 // | 2940 // |
| 2940 outputs[RESOLVE_TYPE_NAMES_ERRORS] = | 2941 outputs[RESOLVE_TYPE_NAMES_ERRORS] = |
| 2941 removeDuplicateErrors(errorListener.errors); | 2942 removeDuplicateErrors(errorListener.errors); |
| 2942 outputs[RESOLVED_UNIT3] = unit; | 2943 outputs[RESOLVED_UNIT3] = unit; |
| 2943 } | 2944 } |
| 2944 | 2945 |
| (...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3008 // Prepare inputs. | 3009 // Prepare inputs. |
| 3009 // | 3010 // |
| 3010 LibraryElement libraryElement = getRequiredInput(LIBRARY_INPUT); | 3011 LibraryElement libraryElement = getRequiredInput(LIBRARY_INPUT); |
| 3011 CompilationUnit unit = getRequiredInput(UNIT_INPUT); | 3012 CompilationUnit unit = getRequiredInput(UNIT_INPUT); |
| 3012 CompilationUnitElement unitElement = unit.element; | 3013 CompilationUnitElement unitElement = unit.element; |
| 3013 // | 3014 // |
| 3014 // Resolve local variables. | 3015 // Resolve local variables. |
| 3015 // | 3016 // |
| 3016 TypeProvider typeProvider = getRequiredInput(TYPE_PROVIDER_INPUT); | 3017 TypeProvider typeProvider = getRequiredInput(TYPE_PROVIDER_INPUT); |
| 3017 Scope nameScope = new LibraryScope(libraryElement, errorListener); | 3018 Scope nameScope = new LibraryScope(libraryElement, errorListener); |
| 3018 AstVisitor visitor = new VariableResolverVisitor.con2(libraryElement, | 3019 AstVisitor visitor = new VariableResolverVisitor( |
| 3019 unitElement.source, typeProvider, nameScope, errorListener); | 3020 libraryElement, unitElement.source, typeProvider, errorListener, |
| 3021 nameScope: nameScope); |
| 3020 unit.accept(visitor); | 3022 unit.accept(visitor); |
| 3021 // | 3023 // |
| 3022 // Record outputs. | 3024 // Record outputs. |
| 3023 // | 3025 // |
| 3024 outputs[RESOLVED_UNIT4] = unit; | 3026 outputs[RESOLVED_UNIT4] = unit; |
| 3025 outputs[VARIABLE_REFERENCE_ERRORS] = | 3027 outputs[VARIABLE_REFERENCE_ERRORS] = |
| 3026 removeDuplicateErrors(errorListener.errors); | 3028 removeDuplicateErrors(errorListener.errors); |
| 3027 } | 3029 } |
| 3028 | 3030 |
| 3029 /** | 3031 /** |
| (...skipping 374 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3404 | 3406 |
| 3405 @override | 3407 @override |
| 3406 bool moveNext() { | 3408 bool moveNext() { |
| 3407 if (_newSources.isEmpty) { | 3409 if (_newSources.isEmpty) { |
| 3408 return false; | 3410 return false; |
| 3409 } | 3411 } |
| 3410 currentTarget = _newSources.removeLast(); | 3412 currentTarget = _newSources.removeLast(); |
| 3411 return true; | 3413 return true; |
| 3412 } | 3414 } |
| 3413 } | 3415 } |
| OLD | NEW |