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

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

Issue 1880323002: dart2js cleanup: remove unused imports and variables (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: merge master Created 4 years, 8 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;
11 import 'dart:typed_data';
11 12
12 import '../compiler.dart' as api show Diagnostic, DiagnosticHandler; 13 import '../compiler.dart' as api show Diagnostic;
13 import '../compiler_new.dart' as api show CompilerInput, CompilerDiagnostics; 14 import '../compiler_new.dart' as api;
15 import '../compiler_new.dart';
16 import 'colors.dart' as colors;
14 import 'dart2js.dart' show AbortLeg; 17 import 'dart2js.dart' show AbortLeg;
15 import 'colors.dart' as colors; 18 import 'filenames.dart';
16 import 'io/source_file.dart'; 19 import 'io/source_file.dart';
17 import 'filenames.dart';
18 import 'util/uri_extras.dart'; 20 import 'util/uri_extras.dart';
19 import 'dart:typed_data';
20 import '../compiler_new.dart';
21 21
22 List<int> readAll(String filename) { 22 List<int> readAll(String filename) {
23 var file = (new File(filename)).openSync(); 23 var file = (new File(filename)).openSync();
24 var length = file.lengthSync(); 24 var length = file.lengthSync();
25 // +1 to have a 0 terminated list, see [Scanner]. 25 // +1 to have a 0 terminated list, see [Scanner].
26 var buffer = new Uint8List(length + 1); 26 var buffer = new Uint8List(length + 1);
27 file.readIntoSync(buffer, 0, length); 27 file.readIntoSync(buffer, 0, length);
28 file.closeSync(); 28 file.closeSync();
29 return buffer; 29 return buffer;
30 } 30 }
(...skipping 300 matching lines...) Expand 10 before | Expand all | Expand 10 after
331 var onAdd, onClose; 331 var onAdd, onClose;
332 332
333 EventSinkWrapper(this.onAdd, this.onClose); 333 EventSinkWrapper(this.onAdd, this.onClose);
334 334
335 void add(String data) => onAdd(data); 335 void add(String data) => onAdd(data);
336 336
337 void addError(error, [StackTrace stackTrace]) => throw error; 337 void addError(error, [StackTrace stackTrace]) => throw error;
338 338
339 void close() => onClose(); 339 void close() => onClose();
340 } 340 }
OLDNEW
« no previous file with comments | « pkg/compiler/lib/src/serialization/serialization_util.dart ('k') | pkg/compiler/lib/src/ssa/builder.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698