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

Side by Side Diff: pkg/front_end/lib/src/fasta/kernel/kernel_library_builder.dart

Issue 2792453003: Remove classMembers getter. (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
« no previous file with comments | « no previous file | pkg/front_end/lib/src/fasta/source/source_library_builder.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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.kernel_library_builder; 5 library fasta.kernel_library_builder;
6 6
7 import 'package:kernel/ast.dart'; 7 import 'package:kernel/ast.dart';
8 8
9 import 'package:kernel/clone.dart' show CloneVisitor; 9 import 'package:kernel/clone.dart' show CloneVisitor;
10 10
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
94 } 94 }
95 95
96 void addClass( 96 void addClass(
97 List<MetadataBuilder> metadata, 97 List<MetadataBuilder> metadata,
98 int modifiers, 98 int modifiers,
99 String className, 99 String className,
100 List<TypeVariableBuilder> typeVariables, 100 List<TypeVariableBuilder> typeVariables,
101 KernelTypeBuilder supertype, 101 KernelTypeBuilder supertype,
102 List<KernelTypeBuilder> interfaces, 102 List<KernelTypeBuilder> interfaces,
103 int charOffset) { 103 int charOffset) {
104 assert(currentDeclaration.parent == libraryDeclaration);
105 Map<String, MemberBuilder> members = currentDeclaration.members;
104 ClassBuilder cls = new SourceClassBuilder( 106 ClassBuilder cls = new SourceClassBuilder(
105 metadata, 107 metadata,
106 modifiers, 108 modifiers,
107 className, 109 className,
108 typeVariables, 110 typeVariables,
109 supertype, 111 supertype,
110 interfaces, 112 interfaces,
111 classMembers, 113 members,
112 this, 114 this,
113 new List<ConstructorReferenceBuilder>.from(constructorReferences), 115 new List<ConstructorReferenceBuilder>.from(constructorReferences),
114 charOffset); 116 charOffset);
115 constructorReferences.clear(); 117 constructorReferences.clear();
116 classMembers.forEach((String name, MemberBuilder builder) { 118 members.forEach((String name, MemberBuilder builder) {
117 while (builder != null) { 119 while (builder != null) {
118 builder.parent = cls; 120 builder.parent = cls;
119 builder = builder.next; 121 builder = builder.next;
120 } 122 }
121 }); 123 });
122 // Nested declaration began in `OutlineBuilder.beginClassDeclaration`. 124 // Nested declaration began in `OutlineBuilder.beginClassDeclaration`.
123 endNestedDeclaration().resolveTypes(typeVariables, this); 125 endNestedDeclaration().resolveTypes(typeVariables, this);
124 addBuilder(className, cls, charOffset); 126 addBuilder(className, cls, charOffset);
125 } 127 }
126 128
(...skipping 387 matching lines...) Expand 10 before | Expand all | Expand 10 after
514 } 516 }
515 } 517 }
516 518
517 bool isConstructorName(String name, String className) { 519 bool isConstructorName(String name, String className) {
518 if (name.startsWith(className)) { 520 if (name.startsWith(className)) {
519 if (name.length == className.length) return true; 521 if (name.length == className.length) return true;
520 if (name.startsWith(".", className.length)) return true; 522 if (name.startsWith(".", className.length)) return true;
521 } 523 }
522 return false; 524 return false;
523 } 525 }
OLDNEW
« no previous file with comments | « no previous file | pkg/front_end/lib/src/fasta/source/source_library_builder.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698