| 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 2377 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2388 /// TODO(paulberry): remove this once there is a corresponding annotation in | 2388 /// TODO(paulberry): remove this once there is a corresponding annotation in |
| 2389 /// the kernel representation. | 2389 /// the kernel representation. |
| 2390 bool isSemiSafe = false; | 2390 bool isSemiSafe = false; |
| 2391 | 2391 |
| 2392 KernelVariableDeclaration(String name, this._functionNestingLevel, | 2392 KernelVariableDeclaration(String name, this._functionNestingLevel, |
| 2393 {Expression initializer, | 2393 {Expression initializer, |
| 2394 DartType type, | 2394 DartType type, |
| 2395 bool isFinal: false, | 2395 bool isFinal: false, |
| 2396 bool isConst: false, | 2396 bool isConst: false, |
| 2397 bool isFieldFormal: false, | 2397 bool isFieldFormal: false, |
| 2398 bool isCovariant: false, |
| 2398 bool isLocalFunction: false}) | 2399 bool isLocalFunction: false}) |
| 2399 : _implicitlyTyped = type == null, | 2400 : _implicitlyTyped = type == null, |
| 2400 _isLocalFunction = isLocalFunction, | 2401 _isLocalFunction = isLocalFunction, |
| 2401 super(name, | 2402 super(name, |
| 2402 initializer: initializer, | 2403 initializer: initializer, |
| 2403 type: type ?? const DynamicType(), | 2404 type: type ?? const DynamicType(), |
| 2404 isFinal: isFinal, | 2405 isFinal: isFinal, |
| 2405 isConst: isConst, | 2406 isConst: isConst, |
| 2406 isFieldFormal: isFieldFormal); | 2407 isFieldFormal: isFieldFormal, |
| 2408 isCovariant: isCovariant); |
| 2407 | 2409 |
| 2408 KernelVariableDeclaration.forValue( | 2410 KernelVariableDeclaration.forValue( |
| 2409 Expression initializer, this._functionNestingLevel) | 2411 Expression initializer, this._functionNestingLevel) |
| 2410 : _implicitlyTyped = true, | 2412 : _implicitlyTyped = true, |
| 2411 _isLocalFunction = false, | 2413 _isLocalFunction = false, |
| 2412 super.forValue(initializer); | 2414 super.forValue(initializer); |
| 2413 | 2415 |
| 2414 @override | 2416 @override |
| 2415 void _inferStatement(KernelTypeInferrer inferrer) { | 2417 void _inferStatement(KernelTypeInferrer inferrer) { |
| 2416 inferrer.listener.variableDeclarationEnter(this); | 2418 inferrer.listener.variableDeclarationEnter(this); |
| (...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2518 accept(v) => unsupported("accept", -1, null); | 2520 accept(v) => unsupported("accept", -1, null); |
| 2519 | 2521 |
| 2520 accept1(v, arg) => unsupported("accept1", -1, null); | 2522 accept1(v, arg) => unsupported("accept1", -1, null); |
| 2521 | 2523 |
| 2522 getStaticType(types) => unsupported("getStaticType", -1, null); | 2524 getStaticType(types) => unsupported("getStaticType", -1, null); |
| 2523 | 2525 |
| 2524 transformChildren(v) => unsupported("transformChildren", -1, null); | 2526 transformChildren(v) => unsupported("transformChildren", -1, null); |
| 2525 | 2527 |
| 2526 visitChildren(v) => unsupported("visitChildren", -1, null); | 2528 visitChildren(v) => unsupported("visitChildren", -1, null); |
| 2527 } | 2529 } |
| OLD | NEW |