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/dart/ast/ast.dart'; | 9 import 'package:analyzer/dart/ast/ast.dart'; |
10 import 'package:analyzer/dart/ast/token.dart'; | 10 import 'package:analyzer/dart/ast/token.dart'; |
(...skipping 1366 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1377 | 1377 |
1378 @override | 1378 @override |
1379 TaskDescriptor get descriptor => DESCRIPTOR; | 1379 TaskDescriptor get descriptor => DESCRIPTOR; |
1380 | 1380 |
1381 @override | 1381 @override |
1382 void internalPerform() { | 1382 void internalPerform() { |
1383 LibraryElementImpl library = getRequiredInput(LIBRARY_INPUT); | 1383 LibraryElementImpl library = getRequiredInput(LIBRARY_INPUT); |
1384 // | 1384 // |
1385 // Compute export namespace. | 1385 // Compute export namespace. |
1386 // | 1386 // |
| 1387 library.exportNamespace = null; |
1387 NamespaceBuilder builder = new NamespaceBuilder(); | 1388 NamespaceBuilder builder = new NamespaceBuilder(); |
1388 Namespace namespace = builder.createExportNamespaceForLibrary(library); | 1389 Namespace namespace = builder.createExportNamespaceForLibrary(library); |
1389 library.exportNamespace = namespace; | 1390 library.exportNamespace = namespace; |
1390 // | 1391 // |
1391 // Update entry point. | 1392 // Update entry point. |
1392 // | 1393 // |
1393 if (library.entryPoint == null) { | 1394 if (library.entryPoint == null) { |
1394 Iterable<Element> exportedElements = namespace.definedNames.values; | 1395 Iterable<Element> exportedElements = namespace.definedNames.values; |
1395 library.entryPoint = exportedElements.firstWhere( | 1396 library.entryPoint = exportedElements.firstWhere( |
1396 (element) => element is FunctionElement && element.isEntryPoint, | 1397 (element) => element is FunctionElement && element.isEntryPoint, |
(...skipping 4830 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6227 | 6228 |
6228 @override | 6229 @override |
6229 bool moveNext() { | 6230 bool moveNext() { |
6230 if (_newSources.isEmpty) { | 6231 if (_newSources.isEmpty) { |
6231 return false; | 6232 return false; |
6232 } | 6233 } |
6233 currentTarget = _newSources.removeLast(); | 6234 currentTarget = _newSources.removeLast(); |
6234 return true; | 6235 return true; |
6235 } | 6236 } |
6236 } | 6237 } |
OLD | NEW |