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

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

Issue 2689303003: Implement type variables in mixin applications. (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.outline_builder; 5 library fasta.outline_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 192 matching lines...) Expand 10 before | Expand all | Expand 10 after
203 } 203 }
204 204
205 @override 205 @override
206 void endClassDeclaration(int interfacesCount, Token beginToken, 206 void endClassDeclaration(int interfacesCount, Token beginToken,
207 Token extendsKeyword, Token implementsKeyword, Token endToken) { 207 Token extendsKeyword, Token implementsKeyword, Token endToken) {
208 debugEvent("endClassDeclaration"); 208 debugEvent("endClassDeclaration");
209 List<TypeBuilder> interfaces = popList(interfacesCount); 209 List<TypeBuilder> interfaces = popList(interfacesCount);
210 TypeBuilder supertype = pop(); 210 TypeBuilder supertype = pop();
211 List<TypeVariableBuilder> typeVariables = pop(); 211 List<TypeVariableBuilder> typeVariables = pop();
212 String name = pop(); 212 String name = pop();
213 if (typeVariables != null && supertype is MixinApplicationBuilder) {
214 supertype.typeVariables = typeVariables;
215 supertype.subclassName = name;
216 }
213 int modifiers = Modifier.validate(pop()); 217 int modifiers = Modifier.validate(pop());
214 List<MetadataBuilder> metadata = pop(); 218 List<MetadataBuilder> metadata = pop();
215 library.addClass(metadata, modifiers, name, typeVariables, supertype, 219 library.addClass(metadata, modifiers, name, typeVariables, supertype,
216 interfaces, beginToken.charOffset); 220 interfaces, beginToken.charOffset);
217 checkEmpty(); 221 checkEmpty();
218 } 222 }
219 223
220 ProcedureKind computeProcedureKind(Token token) { 224 ProcedureKind computeProcedureKind(Token token) {
221 if (token == null) return ProcedureKind.Method; 225 if (token == null) return ProcedureKind.Method;
222 if (optional("get", token)) return ProcedureKind.Getter; 226 if (optional("get", token)) return ProcedureKind.Getter;
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
314 } 318 }
315 319
316 @override 320 @override
317 void endNamedMixinApplication( 321 void endNamedMixinApplication(
318 Token classKeyword, Token implementsKeyword, Token endToken) { 322 Token classKeyword, Token implementsKeyword, Token endToken) {
319 debugEvent("endNamedMixinApplication"); 323 debugEvent("endNamedMixinApplication");
320 List<TypeBuilder> interfaces = popIfNotNull(implementsKeyword); 324 List<TypeBuilder> interfaces = popIfNotNull(implementsKeyword);
321 TypeBuilder mixinApplication = pop(); 325 TypeBuilder mixinApplication = pop();
322 List<TypeVariableBuilder> typeVariables = pop(); 326 List<TypeVariableBuilder> typeVariables = pop();
323 String name = pop(); 327 String name = pop();
328 if (typeVariables != null && mixinApplication is MixinApplicationBuilder) {
329 mixinApplication.typeVariables = typeVariables;
330 mixinApplication.subclassName = name;
331 }
324 int modifiers = Modifier.validate(pop()); 332 int modifiers = Modifier.validate(pop());
325 List<MetadataBuilder> metadata = pop(); 333 List<MetadataBuilder> metadata = pop();
326 library.addNamedMixinApplication( 334 library.addNamedMixinApplication(
327 metadata, name, typeVariables, modifiers, mixinApplication, interfaces, 335 metadata, name, typeVariables, modifiers, mixinApplication, interfaces,
328 classKeyword.charOffset); 336 classKeyword.charOffset);
329 checkEmpty(); 337 checkEmpty();
330 } 338 }
331 339
332 @override 340 @override
333 void endTypeArguments(int count, Token beginToken, Token endToken) { 341 void endTypeArguments(int count, Token beginToken, Token endToken) {
(...skipping 272 matching lines...) Expand 10 before | Expand all | Expand 10 after
606 Link<Token> handleMemberName(Link<Token> identifiers) { 614 Link<Token> handleMemberName(Link<Token> identifiers) {
607 if (!isDartLibrary || identifiers.isEmpty) return identifiers; 615 if (!isDartLibrary || identifiers.isEmpty) return identifiers;
608 return removeNativeClause(identifiers); 616 return removeNativeClause(identifiers);
609 } 617 }
610 618
611 @override 619 @override
612 void debugEvent(String name) { 620 void debugEvent(String name) {
613 // printEvent(name); 621 // printEvent(name);
614 } 622 }
615 } 623 }
OLDNEW
« no previous file with comments | « pkg/front_end/lib/src/fasta/kernel/kernel_target.dart ('k') | pkg/front_end/lib/src/fasta/source/source_class_builder.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698