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

Unified Diff: pkg/kernel/lib/binary/limited_ast_to_binary.dart

Issue 2979463002: Revert "Tweak public APIs and use them in patch_sdk, dart2js, and kernel-service." (Closed)
Patch Set: Created 3 years, 5 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 | « pkg/kernel/lib/binary/ast_from_binary.dart ('k') | pkg/kernel/lib/target/targets.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/kernel/lib/binary/limited_ast_to_binary.dart
diff --git a/pkg/kernel/lib/binary/limited_ast_to_binary.dart b/pkg/kernel/lib/binary/limited_ast_to_binary.dart
index a4307e50e2cae0d9687cdf75418ad2cb3157fdde..12e768b2e679698ff0f9f93364d017c2473f68f5 100644
--- a/pkg/kernel/lib/binary/limited_ast_to_binary.dart
+++ b/pkg/kernel/lib/binary/limited_ast_to_binary.dart
@@ -13,17 +13,7 @@ import 'package:kernel/binary/ast_to_binary.dart';
class LimitedBinaryPrinter extends BinaryPrinter {
final LibraryFilter predicate;
- /// Excludes all uriToSource information.
- ///
- /// By default the [predicate] above will only exclude canonical names and
- /// kernel libraries, but it will still emit the sources for all libraries.
- /// filtered by libraries matching [predicate].
- // TODO(sigmund): provide a way to filter sources directly based on
- // [predicate]. That requires special logic to handle sources from part files.
- final bool excludeUriToSource;
-
- LimitedBinaryPrinter(
- Sink<List<int>> sink, this.predicate, this.excludeUriToSource)
+ LimitedBinaryPrinter(Sink<List<int>> sink, this.predicate)
: super(sink, stringIndexer: new ReferencesStringIndexer());
@override
@@ -78,19 +68,6 @@ class LimitedBinaryPrinter extends BinaryPrinter {
var librariesToWrite = libraries.where(predicate).toList();
super.writeProgramIndex(program, librariesToWrite);
}
-
- void writeUriToSource(Program program) {
- if (!excludeUriToSource) {
- super.writeUriToSource(program);
- } else {
- // Emit a practically empty uriToSrouce table.
- writeStringTable(new StringIndexer());
-
- // Add an entry for '', which is always included by default.
- writeUtf8Bytes(const <int>[]);
- writeUInt30(0);
- }
- }
}
/// Extension of [StringIndexer] that also indexes canonical names of
« no previous file with comments | « pkg/kernel/lib/binary/ast_from_binary.dart ('k') | pkg/kernel/lib/target/targets.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698