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 2273 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2284 | 2284 |
2285 bool _mutatedAnywhere = false; | 2285 bool _mutatedAnywhere = false; |
2286 | 2286 |
2287 final bool _isLocalFunction; | 2287 final bool _isLocalFunction; |
2288 | 2288 |
2289 KernelVariableDeclaration(String name, this._functionNestingLevel, | 2289 KernelVariableDeclaration(String name, this._functionNestingLevel, |
2290 {Expression initializer, | 2290 {Expression initializer, |
2291 DartType type, | 2291 DartType type, |
2292 bool isFinal: false, | 2292 bool isFinal: false, |
2293 bool isConst: false, | 2293 bool isConst: false, |
| 2294 bool isFieldFormal: false, |
2294 bool isLocalFunction: false}) | 2295 bool isLocalFunction: false}) |
2295 : _implicitlyTyped = type == null, | 2296 : _implicitlyTyped = type == null, |
2296 _isLocalFunction = isLocalFunction, | 2297 _isLocalFunction = isLocalFunction, |
2297 super(name, | 2298 super(name, |
2298 initializer: initializer, | 2299 initializer: initializer, |
2299 type: type ?? const DynamicType(), | 2300 type: type ?? const DynamicType(), |
2300 isFinal: isFinal, | 2301 isFinal: isFinal, |
2301 isConst: isConst); | 2302 isConst: isConst, |
| 2303 isFieldFormal: isFieldFormal); |
2302 | 2304 |
2303 KernelVariableDeclaration.forValue( | 2305 KernelVariableDeclaration.forValue( |
2304 Expression initializer, this._functionNestingLevel) | 2306 Expression initializer, this._functionNestingLevel) |
2305 : _implicitlyTyped = true, | 2307 : _implicitlyTyped = true, |
2306 _isLocalFunction = false, | 2308 _isLocalFunction = false, |
2307 super.forValue(initializer); | 2309 super.forValue(initializer); |
2308 | 2310 |
2309 @override | 2311 @override |
2310 void _inferStatement(KernelTypeInferrer inferrer) { | 2312 void _inferStatement(KernelTypeInferrer inferrer) { |
2311 inferrer.listener.variableDeclarationEnter(this); | 2313 inferrer.listener.variableDeclarationEnter(this); |
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2413 accept(v) => unsupported("accept", -1, null); | 2415 accept(v) => unsupported("accept", -1, null); |
2414 | 2416 |
2415 accept1(v, arg) => unsupported("accept1", -1, null); | 2417 accept1(v, arg) => unsupported("accept1", -1, null); |
2416 | 2418 |
2417 getStaticType(types) => unsupported("getStaticType", -1, null); | 2419 getStaticType(types) => unsupported("getStaticType", -1, null); |
2418 | 2420 |
2419 transformChildren(v) => unsupported("transformChildren", -1, null); | 2421 transformChildren(v) => unsupported("transformChildren", -1, null); |
2420 | 2422 |
2421 visitChildren(v) => unsupported("visitChildren", -1, null); | 2423 visitChildren(v) => unsupported("visitChildren", -1, null); |
2422 } | 2424 } |
OLD | NEW |