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

Unified Diff: lib/src/transformer/asset_source.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/summary.dart ('k') | lib/src/transformer/asset_universe.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/src/transformer/asset_source.dart
diff --git a/lib/src/transformer/asset_source.dart b/lib/src/transformer/asset_source.dart
deleted file mode 100644
index 0ff85e98403d014d088f71f2e8fe92791db71212..0000000000000000000000000000000000000000
--- a/lib/src/transformer/asset_source.dart
+++ /dev/null
@@ -1,66 +0,0 @@
-// Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-import 'package:analyzer/src/generated/engine.dart';
-import 'package:analyzer/src/generated/source.dart' show Source, UriKind;
-import 'package:barback/barback.dart' show Asset, TimestampedData;
-import 'package:path/path.dart' as path;
-
-class AssetSource implements Source {
- final Uri uri;
- final Asset asset;
- final String contentString;
- AssetSource(this.uri, this.asset, this.contentString);
-
- @override
- toString() => 'AssetSource($uri, ${asset.id})';
-
- @override
- TimestampedData<String> get contents =>
- new TimestampedData(modificationStamp, contentString);
-
- @override
- String get encoding => null;
-
- @override
- bool exists() => true;
-
- @override
- String get fullName => uri.toString();
-
- @override
- bool get isInSystemLibrary => uriKind == UriKind.DART_URI;
-
- @override
- int get modificationStamp => 0;
-
- @override
- Uri resolveRelativeUri(Uri relativeUri) {
- var resolvedPath = path.join(path.dirname(uri.path), relativeUri.path);
- return new Uri(scheme: uri.scheme, path: resolvedPath);
- }
-
- @override
- String get shortName => uri.toString();
-
- @override
- Source get source => this;
-
- @override
- UriKind get uriKind {
- switch (uri.scheme) {
- case 'package':
- return UriKind.PACKAGE_URI;
-
- case 'dart':
- return UriKind.DART_URI;
-
- case 'file':
- return UriKind.FILE_URI;
-
- default:
- throw new StateError(uri.toString());
- }
- }
-}
« no previous file with comments | « lib/src/summary.dart ('k') | lib/src/transformer/asset_universe.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698