OLD | NEW |
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 Loading... |
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 Loading... |
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 } |
OLD | NEW |