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 summary_resynthesizer; | 5 library summary_resynthesizer; |
6 | 6 |
7 import 'package:analyzer/analyzer.dart'; | 7 import 'package:analyzer/analyzer.dart'; |
8 import 'package:analyzer/src/generated/element.dart'; | 8 import 'package:analyzer/src/generated/element.dart'; |
9 import 'package:analyzer/src/generated/element_handle.dart'; | 9 import 'package:analyzer/src/generated/element_handle.dart'; |
10 import 'package:analyzer/src/generated/engine.dart'; | 10 import 'package:analyzer/src/generated/engine.dart'; |
(...skipping 618 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
629 .toString(); | 629 .toString(); |
630 importElement.importedLibrary = new LibraryElementHandle( | 630 importElement.importedLibrary = new LibraryElementHandle( |
631 summaryResynthesizer, | 631 summaryResynthesizer, |
632 new ElementLocationImpl.con3(<String>[absoluteUri])); | 632 new ElementLocationImpl.con3(<String>[absoluteUri])); |
633 if (isSynthetic) { | 633 if (isSynthetic) { |
634 importElement.synthetic = true; | 634 importElement.synthetic = true; |
635 } else { | 635 } else { |
636 importElement.uri = serializedImport.uri; | 636 importElement.uri = serializedImport.uri; |
637 importElement.uriOffset = serializedImport.uriOffset; | 637 importElement.uriOffset = serializedImport.uriOffset; |
638 importElement.uriEnd = serializedImport.uriEnd; | 638 importElement.uriEnd = serializedImport.uriEnd; |
| 639 importElement.deferred = serializedImport.isDeferred; |
639 } | 640 } |
640 if (serializedImport.prefixReference != 0) { | 641 if (serializedImport.prefixReference != 0) { |
641 UnlinkedReference serializedPrefix = | 642 UnlinkedReference serializedPrefix = |
642 unlinkedUnits[0].references[serializedImport.prefixReference]; | 643 unlinkedUnits[0].references[serializedImport.prefixReference]; |
643 importElement.prefix = new PrefixElementImpl( | 644 importElement.prefix = new PrefixElementImpl( |
644 serializedPrefix.name, serializedImport.prefixOffset); | 645 serializedPrefix.name, serializedImport.prefixOffset); |
645 } | 646 } |
646 importElement.combinators = | 647 importElement.combinators = |
647 serializedImport.combinators.map(buildCombinator).toList(); | 648 serializedImport.combinators.map(buildCombinator).toList(); |
648 return importElement; | 649 return importElement; |
(...skipping 348 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
997 } | 998 } |
998 for (FunctionTypeAliasElement typeAlias in unit.functionTypeAliases) { | 999 for (FunctionTypeAliasElement typeAlias in unit.functionTypeAliases) { |
999 elementMap[typeAlias.name] = typeAlias; | 1000 elementMap[typeAlias.name] = typeAlias; |
1000 } | 1001 } |
1001 resummarizedElements[absoluteUri] = elementMap; | 1002 resummarizedElements[absoluteUri] = elementMap; |
1002 unitHolder = null; | 1003 unitHolder = null; |
1003 prelinkedUnit = null; | 1004 prelinkedUnit = null; |
1004 unlinkedUnit = null; | 1005 unlinkedUnit = null; |
1005 } | 1006 } |
1006 } | 1007 } |
OLD | NEW |