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

Side by Side Diff: pkg/front_end/lib/src/fasta/source/source_library_builder.dart

Issue 2676823002: Add option --compile-sdk to fasta compile and run. (Closed)
Patch Set: Address comments. Created 3 years, 10 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 library fasta.source_library_builder; 5 library fasta.source_library_builder;
6 6
7 import 'package:kernel/ast.dart' show 7 import 'package:kernel/ast.dart' show
8 AsyncMarker, 8 AsyncMarker,
9 ProcedureKind; 9 ProcedureKind;
10 10
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
117 Unhandled conditionalUris, List<Combinator> combinators) { 117 Unhandled conditionalUris, List<Combinator> combinators) {
118 loader.read(resolve(uri)).addExporter(this, combinators); 118 loader.read(resolve(uri)).addExporter(this, combinators);
119 } 119 }
120 120
121 void addImport(List<MetadataBuilder> metadata, String uri, 121 void addImport(List<MetadataBuilder> metadata, String uri,
122 Unhandled conditionalUris, String prefix, List<Combinator> combinators, 122 Unhandled conditionalUris, String prefix, List<Combinator> combinators,
123 bool deferred) { 123 bool deferred) {
124 imports.add(new Import(loader.read(resolve(uri)), prefix, combinators)); 124 imports.add(new Import(loader.read(resolve(uri)), prefix, combinators));
125 } 125 }
126 126
127 void addPart(List<MetadataBuilder> metadata, String uri) { 127 void addPart(List<MetadataBuilder> metadata, String path) {
128 parts.add(loader.read(resolve(uri))); 128 Uri resolvedUri;
129 Uri newFileUri;
130 if (uri.scheme == "dart") {
131 resolvedUri = new Uri(scheme: "dart", path: "${uri.path}/$path");
132 newFileUri = fileUri.resolve(path);
133 } else {
134 newFileUri = resolvedUri = resolve(path);
135 }
136 LibraryBuilder part = loader.read(resolvedUri);
137 if (part is SourceLibraryBuilder) {
138 part.fileUri ??= newFileUri;
139 }
140 parts.add(part);
129 } 141 }
130 142
131 void addPartOf(List<MetadataBuilder> metadata, String name) { 143 void addPartOf(List<MetadataBuilder> metadata, String name) {
132 partOf = name; 144 partOf = name;
133 } 145 }
134 146
135 ClassBuilder addClass(List<MetadataBuilder> metadata, 147 ClassBuilder addClass(List<MetadataBuilder> metadata,
136 int modifiers, String name, 148 int modifiers, String name,
137 List<TypeVariableBuilder> typeVariables, T supertype, 149 List<TypeVariableBuilder> typeVariables, T supertype,
138 List<T> interfaces); 150 List<T> interfaces);
(...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after
325 } 337 }
326 338
327 int resolveConstructors(_) { 339 int resolveConstructors(_) {
328 int count = 0; 340 int count = 0;
329 members.forEach((String name, Builder member) { 341 members.forEach((String name, Builder member) {
330 count += member.resolveConstructors(this); 342 count += member.resolveConstructors(this);
331 }); 343 });
332 return count; 344 return count;
333 } 345 }
334 } 346 }
OLDNEW
« no previous file with comments | « pkg/front_end/lib/src/fasta/source/outline_builder.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