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

Unified Diff: lib/src/utils.dart

Issue 1788973002: Remove code that requires whole-program compile (Closed) Base URL: git@github.com:dart-lang/dev_compiler.git@master
Patch Set: merged Created 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « lib/src/transformer/uri_resolver.dart ('k') | lib/transformer.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/src/utils.dart
diff --git a/lib/src/utils.dart b/lib/src/utils.dart
index 5ff9558daaa2537eec8d5371643269dee8575898..df6b054dc8d00002a3bf81876616c74e3c3a061c 100644
--- a/lib/src/utils.dart
+++ b/lib/src/utils.dart
@@ -30,7 +30,6 @@ import 'package:analyzer/src/task/dart.dart' show ParseDartTask;
import 'package:analyzer/src/generated/resolver.dart' show TypeProvider;
import 'package:analyzer/src/generated/source.dart' show LineInfo, Source;
import 'package:analyzer/analyzer.dart' show parseDirectives;
-import 'package:crypto/crypto.dart' show CryptoUtils, MD5;
import 'package:source_span/source_span.dart';
import 'codegen/js_names.dart' show invalidVariableName;
@@ -300,18 +299,6 @@ SourceLocation locationForOffset(LineInfo lineInfo, Uri uri, int offset) {
sourceUrl: uri, line: loc.lineNumber - 1, column: loc.columnNumber - 1);
}
-/// Computes a hash for the given contents.
-String computeHash(String contents) {
- if (contents == null || contents == '') return null;
- return CryptoUtils.bytesToHex((new MD5()..add(contents.codeUnits)).close());
-}
-
-/// Computes a hash for the given file path (reads the contents in binary form).
-String computeHashFromFile(String filepath) {
- var bytes = new File(filepath).readAsBytesSync();
- return CryptoUtils.bytesToHex((new MD5()..add(bytes)).close());
-}
-
String resourceOutputPath(Uri resourceUri, Uri entryUri, String runtimeDir) {
if (resourceUri.scheme == 'package') return resourceUri.path;
« no previous file with comments | « lib/src/transformer/uri_resolver.dart ('k') | lib/transformer.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698