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

Unified Diff: pkg/front_end/lib/summary_generator.dart

Issue 2417043003: Initial API for the Dart front_end package. (Closed)
Patch Set: Address code review comments Created 4 years, 2 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
Index: pkg/front_end/lib/summary_generator.dart
diff --git a/pkg/front_end/lib/summary_generator.dart b/pkg/front_end/lib/summary_generator.dart
new file mode 100644
index 0000000000000000000000000000000000000000..3a60354dfa2ef16ca650c715505027c94c11dfa6
--- /dev/null
+++ b/pkg/front_end/lib/summary_generator.dart
@@ -0,0 +1,31 @@
+// 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.
+
+/// Defines the front-end API for converting source code to summaries.
+library front_end.summary_generator;
+
+import 'dart:async';
+import 'options.dart';
+
+/// Creates a summary representation of the build unit whose source files are in
+/// [sources].
+///
+/// Intended to be a part of a modular compilation process.
+///
+/// [sources] should be the complete set of source files for a build unit
+/// (including both library and part files).
+///
+/// The summarization process is hermetic, meaning that the only files which
+/// will be read are those listed in [sources], [Options.inputSummaries], and
+/// [Options.sdkSummary]. If a source file attempts to refer to a file which is
+/// not obtainable from these paths, that will result in an error, even if the
+/// file exists on the filesystem.
+///
+/// Any `part` declarations found in [sources] must refer to part files which
+/// are also listed in [sources], otherwise an error results. (It is not
+/// permitted to refer to a part file declared in another build unit).
+///
+/// The return value is a list of bytes to write to the summary file.
Siggi Cherem (dart-lang) 2016/10/17 16:27:29 Not sure yet about the use cases, but are there si
Paul Berry 2016/10/17 17:04:27 At the moment I can't imagine a scenario where it
+Future<List<int>> summarizeBuildUnit(Options options, List<Uri> sources) =>
+ throw new UnimplementedError();
« pkg/front_end/lib/options.dart ('K') | « pkg/front_end/lib/resolved_ast_generator.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698