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

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

Issue 2644633004: Updated to kernel changes in master. (Closed)
Patch Set: Created 3 years, 11 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/fasta/lib/src/compile_platform.dart ('k') | pkg/fasta/lib/testing/suite.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/fasta/lib/src/kernel/kernel_target.dart
diff --git a/pkg/fasta/lib/src/kernel/kernel_target.dart b/pkg/fasta/lib/src/kernel/kernel_target.dart
index 10d36dac19d405baaea8f78a94b3e6be5abd3616..bd93c117b14273682a1d0cde3828a868deda3517 100644
--- a/pkg/fasta/lib/src/kernel/kernel_target.dart
+++ b/pkg/fasta/lib/src/kernel/kernel_target.dart
@@ -33,6 +33,7 @@ import 'package:kernel/ast.dart' show
Program,
RedirectingInitializer,
ReturnStatement,
+ Source,
StaticGet,
StringLiteral,
SuperInitializer,
@@ -48,8 +49,7 @@ import 'package:kernel/text/ast_to_text.dart' show
Printer;
import 'package:kernel/transformations/mixin_full_resolution.dart' show
- MixinFullResolution,
- SuperInitializerResolutionTransformer;
+ MixinFullResolution;
import '../source/source_loader.dart' show
SourceLoader;
@@ -281,7 +281,7 @@ class KernelSourceTarget extends TargetImplementation {
/// Creates a program by combining [libraries] with the libraries of
/// `dillTarget.loader.program`.
Program link(List<Library> libraries) {
- Map<String, List<int>> uriToLineStarts = <String, List<int>>{};
+ Map<String, Source> uriToSource = <String, Source>{};
// for (Library library in libraries) {
// // TODO(ahe): Compute line starts instead.
@@ -291,14 +291,14 @@ class KernelSourceTarget extends TargetImplementation {
final Program binary = dillTarget.loader.program;
if (binary != null) {
libraries.addAll(binary.libraries);
- uriToLineStarts.addAll(binary.uriToLineStarts);
+ uriToSource.addAll(binary.uriToSource);
}
// 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.
- uriToLineStarts[""] = <int>[0];
- Program program = new Program(libraries, uriToLineStarts);
+ uriToSource[""] = new Source(<int>[0], "");
+ Program program = new Program(libraries, uriToSource);
if (loader.first != null) {
Builder builder = loader.first.members["main"];
if (builder is KernelProcedureBuilder) {
« no previous file with comments | « pkg/fasta/lib/src/compile_platform.dart ('k') | pkg/fasta/lib/testing/suite.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698