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

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

Issue 2830313002: Split up TypeInferrer class. (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.kernel_library_builder; 5 library fasta.kernel_library_builder;
6 6
7 import 'package:front_end/src/fasta/scanner/token.dart' show Token; 7 import 'package:front_end/src/fasta/scanner/token.dart' show Token;
8 8
9 import 'package:kernel/ast.dart'; 9 import 'package:kernel/ast.dart';
10 10
(...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after
158 modifiers, mixinApplication, interfaces, this, charOffset); 158 modifiers, mixinApplication, interfaces, this, charOffset);
159 // Nested declaration began in `OutlineBuilder.beginNamedMixinApplication`. 159 // Nested declaration began in `OutlineBuilder.beginNamedMixinApplication`.
160 endNestedDeclaration().resolveTypes(typeVariables, this); 160 endNestedDeclaration().resolveTypes(typeVariables, this);
161 addBuilder(name, builder, charOffset); 161 addBuilder(name, builder, charOffset);
162 } 162 }
163 163
164 void addField(List<MetadataBuilder> metadata, int modifiers, 164 void addField(List<MetadataBuilder> metadata, int modifiers,
165 KernelTypeBuilder type, String name, int charOffset, Token initializer) { 165 KernelTypeBuilder type, String name, int charOffset, Token initializer) {
166 addBuilder( 166 addBuilder(
167 name, 167 name,
168 new KernelFieldBuilder(loader.astFactory, loader.topLevelTypeInferrer, 168 new KernelFieldBuilder(loader.astFactory, loader.typeInferenceEngine,
169 metadata, type, name, modifiers, this, charOffset, initializer), 169 metadata, type, name, modifiers, this, charOffset, initializer),
170 charOffset); 170 charOffset);
171 } 171 }
172 172
173 String computeAndValidateConstructorName(String name, int charOffset) { 173 String computeAndValidateConstructorName(String name, int charOffset) {
174 String className = currentDeclaration.name; 174 String className = currentDeclaration.name;
175 bool startsWithClassName = name.startsWith(className); 175 bool startsWithClassName = name.startsWith(className);
176 if (startsWithClassName && name.length == className.length) { 176 if (startsWithClassName && name.length == className.length) {
177 // Unnamed constructor or factory. 177 // Unnamed constructor or factory.
178 return ""; 178 return "";
(...skipping 362 matching lines...) Expand 10 before | Expand all | Expand 10 after
541 } 541 }
542 542
543 @override 543 @override
544 void includePart(covariant KernelLibraryBuilder part) { 544 void includePart(covariant KernelLibraryBuilder part) {
545 super.includePart(part); 545 super.includePart(part);
546 nativeMethods.addAll(part.nativeMethods); 546 nativeMethods.addAll(part.nativeMethods);
547 boundlessTypeVariables.addAll(part.boundlessTypeVariables); 547 boundlessTypeVariables.addAll(part.boundlessTypeVariables);
548 assert(mixinApplicationClasses.isEmpty); 548 assert(mixinApplicationClasses.isEmpty);
549 } 549 }
550 } 550 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698