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

Side by Side Diff: pkg/front_end/lib/src/fasta/dill/dill_library_builder.dart

Issue 2669363004: Set fileUri when creating library builders. (Closed)
Patch Set: 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.dill_library_builder; 5 library fasta.dill_library_builder;
6 6
7 import 'package:kernel/ast.dart' show 7 import 'package:kernel/ast.dart' show
8 Class, 8 Class,
9 ExpressionStatement, 9 ExpressionStatement,
10 Field, 10 Field,
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
46 final Map<String, Builder> exports = <String, Builder>{}; 46 final Map<String, Builder> exports = <String, Builder>{};
47 47
48 final DillLoader loader; 48 final DillLoader loader;
49 49
50 Library library; 50 Library library;
51 51
52 DillLibraryBuilder(this.uri, this.loader); 52 DillLibraryBuilder(this.uri, this.loader);
53 53
54 get scope => internalError("Scope not supported"); 54 get scope => internalError("Scope not supported");
55 55
56 Uri get fileUri => uri;
57
56 void addClass(Class cls) { 58 void addClass(Class cls) {
57 DillClassBuilder classBulder = new DillClassBuilder(cls, this); 59 DillClassBuilder classBulder = new DillClassBuilder(cls, this);
58 addBuilder(cls.name, classBulder); 60 addBuilder(cls.name, classBulder);
59 cls.procedures.forEach(classBulder.addMember); 61 cls.procedures.forEach(classBulder.addMember);
60 cls.constructors.forEach(classBulder.addMember); 62 cls.constructors.forEach(classBulder.addMember);
61 for (Field field in cls.fields) { 63 for (Field field in cls.fields) {
62 if (field.name.name == "_redirecting#") { 64 if (field.name.name == "_redirecting#") {
63 // This is a hack / work around for storing redirecting constructors in 65 // This is a hack / work around for storing redirecting constructors in
64 // dill files. See `buildFactoryConstructor` in 66 // dill files. See `buildFactoryConstructor` in
65 // [package:kernel/analyzer/ast_from_analyzer.dart] 67 // [package:kernel/analyzer/ast_from_analyzer.dart]
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
107 109
108 void addToScope(String name, Builder member) { 110 void addToScope(String name, Builder member) {
109 internalError("Not implemented yet."); 111 internalError("Not implemented yet.");
110 } 112 }
111 113
112 KernelInvalidTypeBuilder buildAmbiguousBuilder( 114 KernelInvalidTypeBuilder buildAmbiguousBuilder(
113 String name, Builder builder, Builder other) { 115 String name, Builder builder, Builder other) {
114 return new KernelInvalidTypeBuilder(name, this); 116 return new KernelInvalidTypeBuilder(name, this);
115 } 117 }
116 } 118 }
OLDNEW
« no previous file with comments | « pkg/front_end/lib/src/fasta/builder/library_builder.dart ('k') | pkg/front_end/lib/src/fasta/dill/dill_loader.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698