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

Side by Side Diff: pkg/front_end/lib/src/fasta/builder/class_builder.dart

Issue 2795723003: Change signature of resolveConstructors. (Closed)
Patch Set: Created 3 years, 8 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.class_builder; 5 library fasta.class_builder;
6 6
7 import '../errors.dart' show internalError; 7 import '../errors.dart' show internalError;
8 8
9 import 'builder.dart' 9 import 'builder.dart'
10 show 10 show
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
53 53
54 Map<String, Builder> get constructors; 54 Map<String, Builder> get constructors;
55 55
56 Map<String, Builder> get membersInScope => members; 56 Map<String, Builder> get membersInScope => members;
57 57
58 LibraryBuilder get library { 58 LibraryBuilder get library {
59 LibraryBuilder library = parent; 59 LibraryBuilder library = parent;
60 return library.partOfLibrary ?? library; 60 return library.partOfLibrary ?? library;
61 } 61 }
62 62
63 @override
63 int resolveConstructors(LibraryBuilder library) { 64 int resolveConstructors(LibraryBuilder library) {
64 if (constructorReferences == null) return 0; 65 if (constructorReferences == null) return 0;
65 Scope scope = computeInstanceScope(library.scope); 66 Scope scope = computeInstanceScope(library.scope);
66 for (ConstructorReferenceBuilder ref in constructorReferences) { 67 for (ConstructorReferenceBuilder ref in constructorReferences) {
67 ref.resolveIn(scope); 68 ref.resolveIn(scope);
68 } 69 }
69 return constructorReferences.length; 70 return constructorReferences.length;
70 } 71 }
71 72
72 Scope computeInstanceScope(Scope parent) { 73 Scope computeInstanceScope(Scope parent) {
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after
207 } 208 }
208 209
209 void addWarning(int charOffset, String message) { 210 void addWarning(int charOffset, String message) {
210 library.addWarning(charOffset, message, fileUri: fileUri); 211 library.addWarning(charOffset, message, fileUri: fileUri);
211 } 212 }
212 213
213 void addNit(int charOffset, String message) { 214 void addNit(int charOffset, String message) {
214 library.addNit(charOffset, message, fileUri: fileUri); 215 library.addNit(charOffset, message, fileUri: fileUri);
215 } 216 }
216 } 217 }
OLDNEW
« no previous file with comments | « pkg/front_end/lib/src/fasta/builder/builder.dart ('k') | pkg/front_end/lib/src/fasta/kernel/kernel_class_builder.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698