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

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

Issue 2766323005: Fix warnings in dart2js and analyzer caused by Fasta. (Closed)
Patch Set: Created 3 years, 9 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 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
81 } 81 }
82 dartCharactersRead += totalLength; 82 dartCharactersRead += totalLength;
83 sourceFiles[resourceUri] = new CachingUtf8BytesSourceFile( 83 sourceFiles[resourceUri] = new CachingUtf8BytesSourceFile(
84 resourceUri, resourceUri.toString(), result); 84 resourceUri, resourceUri.toString(), result);
85 return result; 85 return result;
86 }); 86 });
87 } 87 }
88 88
89 // TODO(johnniwinther): Remove this when no longer needed for the old compiler 89 // TODO(johnniwinther): Remove this when no longer needed for the old compiler
90 // API. 90 // API.
91 Future/*<List<int> | String>*/ call(Uri resourceUri) => throw "unimplemented"; 91 Future /* <List<int> | String> */ call(Uri resourceUri) {
92 throw "unimplemented";
93 }
92 94
93 relativizeUri(Uri uri) => relativize(cwd, uri, isWindows); 95 relativizeUri(Uri uri) => relativize(cwd, uri, isWindows);
94 96
95 SourceFile getSourceFile(Uri resourceUri) { 97 SourceFile getSourceFile(Uri resourceUri) {
96 return sourceFiles[resourceUri]; 98 return sourceFiles[resourceUri];
97 } 99 }
98 } 100 }
99 101
100 List<int> readAll(String filename) { 102 List<int> readAll(String filename) {
101 var file = (new File(filename)).openSync(); 103 var file = (new File(filename)).openSync();
(...skipping 310 matching lines...) Expand 10 before | Expand all | Expand 10 after
412 resolvedUri = file; 414 resolvedUri = file;
413 break; 415 break;
414 } 416 }
415 } 417 }
416 } 418 }
417 var result = await readUtf8BytesFromUri(resolvedUri); 419 var result = await readUtf8BytesFromUri(resolvedUri);
418 sourceFiles[uri] = sourceFiles[resolvedUri]; 420 sourceFiles[uri] = sourceFiles[resolvedUri];
419 return result; 421 return result;
420 } 422 }
421 } 423 }
OLDNEW
« no previous file with comments | « pkg/compiler/lib/src/parser/element_listener.dart ('k') | pkg/front_end/test/fasta/testing.json » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698