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

Unified Diff: pkg/front_end/lib/src/fasta/kernel/kernel_target.dart

Issue 2729913005: [Fasta] include source code in dill (Closed)
Patch Set: Use Uint8List.view when possible Created 3 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
Index: pkg/front_end/lib/src/fasta/kernel/kernel_target.dart
diff --git a/pkg/front_end/lib/src/fasta/kernel/kernel_target.dart b/pkg/front_end/lib/src/fasta/kernel/kernel_target.dart
index 93ef76172e29583654c9f2b40c62a6190b6b6a85..08be42b68d7eee2173f6e39bd59b05f433d9ab0d 100644
--- a/pkg/front_end/lib/src/fasta/kernel/kernel_target.dart
+++ b/pkg/front_end/lib/src/fasta/kernel/kernel_target.dart
@@ -106,9 +106,10 @@ class KernelTarget extends TargetImplementation {
SourceLoader<Library> createLoader() => new SourceLoader<Library>(this);
- void addLineStarts(Uri uri, List<int> lineStarts) {
+ void addSourceInformation(
+ Uri uri, List<int> lineStarts, List<int> sourceCode) {
String fileUri = relativizeUri(uri);
- uriToSource[fileUri] = new Source(lineStarts, fileUri);
+ uriToSource[fileUri] = new Source(lineStarts, sourceCode);
}
void read(Uri uri) {
@@ -317,7 +318,7 @@ class KernelTarget extends TargetImplementation {
// TODO(ahe): Remove this line. Kernel seems to generate a default line map
// that used when there's no fileUri on an element. Instead, ensure all
// elements have a fileUri.
- uriToSource[""] = new Source(<int>[0], "");
+ uriToSource[""] = new Source(<int>[0], const <int>[]);
Program program = new Program(libraries, uriToSource);
if (loader.first != null) {
Builder builder = loader.first.members["main"];
« no previous file with comments | « pkg/front_end/lib/src/fasta/dill/dill_target.dart ('k') | pkg/front_end/lib/src/fasta/source/source_loader.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698