| 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 file. | 3 // BSD-style license that can be found in the LICENSE file. | 
| 4 | 4 | 
| 5 library analyzer.src.summary.summary_file_builder; | 5 library analyzer.src.summary.summary_file_builder; | 
| 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 34 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 45     FolderBasedDartSdk sdk = new FolderBasedDartSdk( | 45     FolderBasedDartSdk sdk = new FolderBasedDartSdk( | 
| 46         resourceProvider, resourceProvider.getFolder(sdkPath), strong); | 46         resourceProvider, resourceProvider.getFolder(sdkPath), strong); | 
| 47     sdk.useSummary = false; | 47     sdk.useSummary = false; | 
| 48     sdk.analysisOptions = new AnalysisOptionsImpl()..strongMode = strong; | 48     sdk.analysisOptions = new AnalysisOptionsImpl()..strongMode = strong; | 
| 49 | 49 | 
| 50     // | 50     // | 
| 51     // Prepare 'dart:' URIs to serialize. | 51     // Prepare 'dart:' URIs to serialize. | 
| 52     // | 52     // | 
| 53     Set<String> uriSet = | 53     Set<String> uriSet = | 
| 54         sdk.sdkLibraries.map((SdkLibrary library) => library.shortName).toSet(); | 54         sdk.sdkLibraries.map((SdkLibrary library) => library.shortName).toSet(); | 
|  | 55     if (!strong) { | 
|  | 56       uriSet.add('dart:html/nativewrappers.dart'); | 
|  | 57     } | 
| 55     uriSet.add('dart:html_common/html_common_dart2js.dart'); | 58     uriSet.add('dart:html_common/html_common_dart2js.dart'); | 
| 56 | 59 | 
| 57     Set<Source> librarySources = new HashSet<Source>(); | 60     Set<Source> librarySources = new HashSet<Source>(); | 
| 58     for (String uri in uriSet) { | 61     for (String uri in uriSet) { | 
| 59       librarySources.add(sdk.mapDartUri(uri)); | 62       librarySources.add(sdk.mapDartUri(uri)); | 
| 60     } | 63     } | 
| 61 | 64 | 
| 62     return new SummaryBuilder(librarySources, sdk.context, strong); | 65     return new SummaryBuilder(librarySources, sdk.context, strong); | 
| 63   } | 66   } | 
| 64 | 67 | 
| (...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 138     scanner.scanGenericMethodComments = strong; | 141     scanner.scanGenericMethodComments = strong; | 
| 139     Token token = scanner.tokenize(); | 142     Token token = scanner.tokenize(); | 
| 140     LineInfo lineInfo = new LineInfo(scanner.lineStarts); | 143     LineInfo lineInfo = new LineInfo(scanner.lineStarts); | 
| 141     Parser parser = new Parser(source, errorListener); | 144     Parser parser = new Parser(source, errorListener); | 
| 142     parser.parseGenericMethodComments = strong; | 145     parser.parseGenericMethodComments = strong; | 
| 143     CompilationUnit unit = parser.parseCompilationUnit(token); | 146     CompilationUnit unit = parser.parseCompilationUnit(token); | 
| 144     unit.lineInfo = lineInfo; | 147     unit.lineInfo = lineInfo; | 
| 145     return unit; | 148     return unit; | 
| 146   } | 149   } | 
| 147 } | 150 } | 
| OLD | NEW | 
|---|