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

Side by Side Diff: pkg/compiler/lib/src/source_file_provider.dart

Issue 1220043005: dart2js send stats, includes: (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years, 5 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) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, 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 source_file_provider; 5 library source_file_provider;
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 import 'dart:math' as math; 10 import 'dart:math' as math;
(...skipping 257 matching lines...) Expand 10 before | Expand all | Expand 10 after
268 uri = out; 268 uri = out;
269 } else if (extension == 'precompiled.js') { 269 } else if (extension == 'precompiled.js') {
270 uri = computePrecompiledUri(out); 270 uri = computePrecompiledUri(out);
271 onInfo("File ($uri) is compatible with header" 271 onInfo("File ($uri) is compatible with header"
272 " \"Content-Security-Policy: script-src 'self'\""); 272 " \"Content-Security-Policy: script-src 'self'\"");
273 } else if (extension == 'js.map' || extension == 'dart.map') { 273 } else if (extension == 'js.map' || extension == 'dart.map') {
274 uri = sourceMapOut; 274 uri = sourceMapOut;
275 } else if (extension == "info.json") { 275 } else if (extension == "info.json") {
276 String outName = out.path.substring(out.path.lastIndexOf('/') + 1); 276 String outName = out.path.substring(out.path.lastIndexOf('/') + 1);
277 uri = out.resolve('$outName.$extension'); 277 uri = out.resolve('$outName.$extension');
278 } else if (extension == "stats.json") {
279 String outName = out.path.substring(out.path.lastIndexOf('/') + 1);
280 uri = out.resolve('$outName.$extension');
278 } else { 281 } else {
279 onFailure('Unknown extension: $extension'); 282 onFailure('Unknown extension: $extension');
280 } 283 }
281 } else { 284 } else {
282 uri = out.resolve('$name.$extension'); 285 uri = out.resolve('$name.$extension');
283 } 286 }
284 287
285 if (uri.scheme != 'file') { 288 if (uri.scheme != 'file') {
286 onFailure('Unhandled scheme ${uri.scheme} in $uri.'); 289 onFailure('Unhandled scheme ${uri.scheme} in $uri.');
287 } 290 }
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
325 var onAdd, onClose; 328 var onAdd, onClose;
326 329
327 EventSinkWrapper(this.onAdd, this.onClose); 330 EventSinkWrapper(this.onAdd, this.onClose);
328 331
329 void add(String data) => onAdd(data); 332 void add(String data) => onAdd(data);
330 333
331 void addError(error, [StackTrace stackTrace]) => throw error; 334 void addError(error, [StackTrace stackTrace]) => throw error;
332 335
333 void close() => onClose(); 336 void close() => onClose();
334 } 337 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698