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

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

Issue 2916273002: Clean up type inference for PropertySet. (Closed)
Patch Set: Created 3 years, 6 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/type_inference/type_inferrer.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) 2017, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2017, 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 /// This file declares a "shadow hierarchy" of concrete classes which extend 5 /// This file declares a "shadow hierarchy" of concrete classes which extend
6 /// the kernel class hierarchy, adding methods and fields needed by the 6 /// the kernel class hierarchy, adding methods and fields needed by the
7 /// BodyBuilder. 7 /// BodyBuilder.
8 /// 8 ///
9 /// Instances of these classes may be created using the factory methods in 9 /// Instances of these classes may be created using the factory methods in
10 /// `ast_factory.dart`. 10 /// `ast_factory.dart`.
(...skipping 1174 matching lines...) Expand 10 before | Expand all | Expand 10 after
1185 .getInterfaceMember(receiverType.classNode, name, setter: true); 1185 .getInterfaceMember(receiverType.classNode, name, setter: true);
1186 // Our non-strong golden files currently don't include interface targets, 1186 // Our non-strong golden files currently don't include interface targets,
1187 // so we can't store the interface target without causing tests to fail. 1187 // so we can't store the interface target without causing tests to fail.
1188 // TODO(paulberry): fix this. 1188 // TODO(paulberry): fix this.
1189 if (inferrer.strongMode) { 1189 if (inferrer.strongMode) {
1190 inferrer.instrumentation?.record(Uri.parse(inferrer.uri), fileOffset, 1190 inferrer.instrumentation?.record(Uri.parse(inferrer.uri), fileOffset,
1191 'target', new InstrumentationValueForMember(interfaceMember)); 1191 'target', new InstrumentationValueForMember(interfaceMember));
1192 interfaceTarget = interfaceMember; 1192 interfaceTarget = interfaceMember;
1193 } 1193 }
1194 } 1194 }
1195 var setterType = 1195 var setterType = inferrer.getSetterType(interfaceMember, receiverType);
1196 inferrer.getSetterType(interfaceMember, receiverType, name);
1197 var inferredType = inferrer.inferExpression(value, setterType, typeNeeded); 1196 var inferredType = inferrer.inferExpression(value, setterType, typeNeeded);
1198 inferrer.listener.propertySetExit(this, inferredType); 1197 inferrer.listener.propertySetExit(this, inferredType);
1199 return typeNeeded ? inferredType : null; 1198 return typeNeeded ? inferredType : null;
1200 } 1199 }
1201 } 1200 }
1202 1201
1203 /// Concrete shadow object representing a redirecting initializer in kernel 1202 /// Concrete shadow object representing a redirecting initializer in kernel
1204 /// form. 1203 /// form.
1205 class KernelRedirectingInitializer extends RedirectingInitializer 1204 class KernelRedirectingInitializer extends RedirectingInitializer
1206 implements KernelInitializer { 1205 implements KernelInitializer {
(...skipping 704 matching lines...) Expand 10 before | Expand all | Expand 10 after
1911 } 1910 }
1912 1911
1913 transformChildren(v) { 1912 transformChildren(v) {
1914 return internalError("Internal error: Unsupported operation."); 1913 return internalError("Internal error: Unsupported operation.");
1915 } 1914 }
1916 1915
1917 visitChildren(v) { 1916 visitChildren(v) {
1918 return internalError("Internal error: Unsupported operation."); 1917 return internalError("Internal error: Unsupported operation.");
1919 } 1918 }
1920 } 1919 }
OLDNEW
« no previous file with comments | « no previous file | pkg/front_end/lib/src/fasta/type_inference/type_inferrer.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698