Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(155)

Side by Side Diff: pkg/dev_compiler/lib/src/analyzer/context.dart

Issue 2994203002: Optimize DDC private library files. (Closed)
Patch Set: Address comments Created 3 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 import 'package:args/args.dart' show ArgParser, ArgResults; 5 import 'package:args/args.dart' show ArgParser, ArgResults;
6 import 'package:analyzer/src/command_line/arguments.dart'; 6 import 'package:analyzer/src/command_line/arguments.dart';
7 import 'package:analyzer/file_system/file_system.dart' 7 import 'package:analyzer/file_system/file_system.dart'
8 show ResourceProvider, ResourceUriResolver; 8 show ResourceProvider, ResourceUriResolver;
9 import 'package:analyzer/file_system/physical_file_system.dart' 9 import 'package:analyzer/file_system/physical_file_system.dart'
10 show PhysicalResourceProvider; 10 show PhysicalResourceProvider;
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after
118 /// module root directory. 118 /// module root directory.
119 /// 119 ///
120 /// Removes any explicit module names from [summaryPaths] and populates with 120 /// Removes any explicit module names from [summaryPaths] and populates with
121 /// [customSummaryModules] with them. 121 /// [customSummaryModules] with them.
122 void _parseCustomSummaryModules() { 122 void _parseCustomSummaryModules() {
123 for (var i = 0; i < summaryPaths.length; i++) { 123 for (var i = 0; i < summaryPaths.length; i++) {
124 var summaryPath = summaryPaths[i]; 124 var summaryPath = summaryPaths[i];
125 var pipe = summaryPath.indexOf("="); 125 var pipe = summaryPath.indexOf("=");
126 if (pipe != -1) { 126 if (pipe != -1) {
127 summaryPaths[i] = summaryPath.substring(0, pipe); 127 summaryPaths[i] = summaryPath.substring(0, pipe);
128 customSummaryModules[summaryPaths[i]] = 128 customSummaryModules[summaryPaths[i]] = summaryPath.substring(pipe + 1);
129 summaryPath.substring(pipe + 1);
130 } 129 }
131 } 130 }
132 } 131 }
133 } 132 }
134 133
135 /// Creates a SourceFactory configured by the [options]. 134 /// Creates a SourceFactory configured by the [options].
136 /// 135 ///
137 /// If supplied, [fileResolvers] will override the default `file:` and 136 /// If supplied, [fileResolvers] will override the default `file:` and
138 /// `package:` URI resolvers. 137 /// `package:` URI resolvers.
139 SourceFactory createSourceFactory(AnalyzerOptions options, 138 SourceFactory createSourceFactory(AnalyzerOptions options,
(...skipping 28 matching lines...) Expand all
168 builderOptions.defaultPackagesDirectoryPath = options.packageRoot; 167 builderOptions.defaultPackagesDirectoryPath = options.packageRoot;
169 } 168 }
170 ContextBuilder builder = new ContextBuilder(resourceProvider, null, null, 169 ContextBuilder builder = new ContextBuilder(resourceProvider, null, null,
171 options: builderOptions); 170 options: builderOptions);
172 return new PackageMapUriResolver(resourceProvider, 171 return new PackageMapUriResolver(resourceProvider,
173 builder.convertPackagesToMap(builder.createPackageMap(''))); 172 builder.convertPackagesToMap(builder.createPackageMap('')));
174 } 173 }
175 174
176 return [new ResourceUriResolver(resourceProvider), packageResolver()]; 175 return [new ResourceUriResolver(resourceProvider), packageResolver()];
177 } 176 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698