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

Unified Diff: sdk/lib/_internal/docgen/lib/src/dart2js_mirrors.dart

Issue 16839004: Moved docgen out of the sdk into pkg/ (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Added copyright information., Created 7 years, 6 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 | « sdk/lib/_internal/docgen/lib/dart2yaml.dart ('k') | sdk/lib/_internal/docgen/pubspec.yaml » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sdk/lib/_internal/docgen/lib/src/dart2js_mirrors.dart
diff --git a/sdk/lib/_internal/docgen/lib/src/dart2js_mirrors.dart b/sdk/lib/_internal/docgen/lib/src/dart2js_mirrors.dart
deleted file mode 100644
index 188536325af958b688c71fad80492ef70a021e43..0000000000000000000000000000000000000000
--- a/sdk/lib/_internal/docgen/lib/src/dart2js_mirrors.dart
+++ /dev/null
@@ -1,77 +0,0 @@
-// Copyright (c) 2012, 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.
-
-library dart2js_util;
-
-// TODO(tmandel): This is a temporary copy of the dart2js_mirrors.dart
-// file in the dartdoc folder. One of the two should be deleted
-// when docgen can replace dartdoc.
-
-import 'dart:async' show Future;
-import 'dart:io' show Path;
-
-import '../../../compiler/compiler.dart' as api;
-import '../../../compiler/implementation/mirrors/dart2js_mirror.dart' as dart2js
- show analyze, Dart2JsMirrorSystem;
-import '../../../compiler/implementation/mirrors/mirrors.dart'
- show MirrorSystem;
-import '../../../compiler/implementation/source_file_provider.dart'
- show FormattingDiagnosticHandler, SourceFileProvider;
-import '../../../compiler/implementation/filenames.dart'
- show appendSlash, currentDirectory;
-
-// TODO(johnniwinther): Support client configurable providers.
-
-/**
- * Returns a future that completes to a non-null String when [script]
- * has been successfully compiled.
- */
-// TODO(amouravski): Remove this method and call dart2js via a process instead.
-Future<String> compile(Path script,
- Path libraryRoot,
- {Path packageRoot,
- List<String> options: const <String>[],
- api.DiagnosticHandler diagnosticHandler}) {
- SourceFileProvider provider = new SourceFileProvider();
- if (diagnosticHandler == null) {
- diagnosticHandler =
- new FormattingDiagnosticHandler(provider).diagnosticHandler;
- }
- Uri scriptUri = currentDirectory.resolve(script.toString());
- Uri libraryUri = currentDirectory.resolve(appendSlash('$libraryRoot'));
- Uri packageUri = null;
- if (packageRoot != null) {
- packageUri = currentDirectory.resolve(appendSlash('$packageRoot'));
- }
- return api.compile(scriptUri, libraryUri, packageUri,
- provider.readStringFromUri, diagnosticHandler, options);
-}
-
-/**
- * Analyzes set of libraries and provides a mirror system which can be used for
- * static inspection of the source code.
- */
-Future<MirrorSystem> analyze(List<Path> libraries,
- Path libraryRoot,
- {Path packageRoot,
- List<String> options: const <String>[],
- api.DiagnosticHandler diagnosticHandler}) {
- SourceFileProvider provider = new SourceFileProvider();
- if (diagnosticHandler == null) {
- diagnosticHandler =
- new FormattingDiagnosticHandler(provider).diagnosticHandler;
- }
- Uri libraryUri = currentDirectory.resolve(appendSlash('$libraryRoot'));
- Uri packageUri = null;
- if (packageRoot != null) {
- packageUri = currentDirectory.resolve(appendSlash('$packageRoot'));
- }
- List<Uri> librariesUri = <Uri>[];
- for (Path library in libraries) {
- librariesUri.add(currentDirectory.resolve(library.toString()));
- }
- return dart2js.analyze(librariesUri, libraryUri, packageUri,
- provider.readStringFromUri, diagnosticHandler,
- options);
-}
« no previous file with comments | « sdk/lib/_internal/docgen/lib/dart2yaml.dart ('k') | sdk/lib/_internal/docgen/pubspec.yaml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698