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

Side by Side Diff: lib/src/server/server.dart

Issue 1700153002: Wrapperless dart:html and friends (Closed) Base URL: https://github.com/dart-lang/dev_compiler.git@master
Patch Set: A couple more tweaks Created 4 years, 10 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
« no previous file with comments | « lib/src/compiler.dart ('k') | test/codegen/expect/collection/src/canonicalized_map.js » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 /// Development server that compiles Dart to JS on the fly. 5 /// Development server that compiles Dart to JS on the fly.
6 6
7 import 'dart:async'; 7 import 'dart:async';
8 import 'dart:convert'; 8 import 'dart:convert';
9 import 'dart:io'; 9 import 'dart:io';
10 10
(...skipping 201 matching lines...) Expand 10 before | Expand all | Expand 10 after
212 } 212 }
213 213
214 class DevServer { 214 class DevServer {
215 final ServerCompiler compiler; 215 final ServerCompiler compiler;
216 final String outDir; 216 final String outDir;
217 final String host; 217 final String host;
218 final int port; 218 final int port;
219 final String _entryPath; 219 final String _entryPath;
220 220
221 factory DevServer(CompilerOptions options) { 221 factory DevServer(CompilerOptions options) {
222 assert(options.inputs.length == 1); 222 assert(options.inputs.isNotEmpty);
223 223
224 var fileResolvers = createFileResolvers(options.sourceOptions); 224 var fileResolvers = createFileResolvers(options.sourceOptions);
225 if (options.sourceOptions.useImplicitHtml) { 225 if (options.sourceOptions.useImplicitHtml) {
226 fileResolvers.insert(0, _createImplicitEntryResolver(options.inputs[0])); 226 fileResolvers.insert(0, _createImplicitEntryResolver(options.inputs[0]));
227 } 227 }
228 228
229 var context = createAnalysisContextWithSources(options.sourceOptions, 229 var context = createAnalysisContextWithSources(options.sourceOptions,
230 fileResolvers: fileResolvers); 230 fileResolvers: fileResolvers);
231 231
232 var entryPath = path.basename(options.inputs[0]); 232 var entryPath = path.basename(options.inputs[0]);
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
331 Source resolveAbsolute(Uri uri, [Uri actualUri]) { 331 Source resolveAbsolute(Uri uri, [Uri actualUri]) {
332 var src = resolver.resolveAbsolute(uri, actualUri); 332 var src = resolver.resolveAbsolute(uri, actualUri);
333 return src.exists() ? src : null; 333 return src.exists() ? src : null;
334 } 334 }
335 335
336 Uri restoreAbsolute(Source source) => resolver.restoreAbsolute(source); 336 Uri restoreAbsolute(Source source) => resolver.restoreAbsolute(source);
337 } 337 }
338 338
339 final _log = new Logger('dev_compiler.src.server'); 339 final _log = new Logger('dev_compiler.src.server');
340 final _earlyErrorResult = new CheckerResults(const [], true); 340 final _earlyErrorResult = new CheckerResults(const [], true);
OLDNEW
« no previous file with comments | « lib/src/compiler.dart ('k') | test/codegen/expect/collection/src/canonicalized_map.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698