| 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 2360 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2371 final bool _implicitlyTyped; | 2371 final bool _implicitlyTyped; |
| 2372 | 2372 |
| 2373 final int _functionNestingLevel; | 2373 final int _functionNestingLevel; |
| 2374 | 2374 |
| 2375 bool _mutatedInClosure = false; | 2375 bool _mutatedInClosure = false; |
| 2376 | 2376 |
| 2377 bool _mutatedAnywhere = false; | 2377 bool _mutatedAnywhere = false; |
| 2378 | 2378 |
| 2379 final bool _isLocalFunction; | 2379 final bool _isLocalFunction; |
| 2380 | 2380 |
| 2381 /// If this variable declaration represents a formal parameter, indicates | |
| 2382 /// whether uses of it need to be type-checked due to the covariance of class | |
| 2383 /// type parameters. | |
| 2384 /// | |
| 2385 /// TODO(paulberry): replace this with an enum so that it can represent | |
| 2386 /// "unsafe" parameters as well. | |
| 2387 /// | |
| 2388 /// TODO(paulberry): remove this once there is a corresponding annotation in | |
| 2389 /// the kernel representation. | |
| 2390 bool isSemiSafe = false; | |
| 2391 | |
| 2392 ShadowVariableDeclaration(String name, this._functionNestingLevel, | 2381 ShadowVariableDeclaration(String name, this._functionNestingLevel, |
| 2393 {Expression initializer, | 2382 {Expression initializer, |
| 2394 DartType type, | 2383 DartType type, |
| 2395 bool isFinal: false, | 2384 bool isFinal: false, |
| 2396 bool isConst: false, | 2385 bool isConst: false, |
| 2397 bool isFieldFormal: false, | 2386 bool isFieldFormal: false, |
| 2398 bool isCovariant: false, | 2387 bool isCovariant: false, |
| 2399 bool isLocalFunction: false}) | 2388 bool isLocalFunction: false}) |
| 2400 : _implicitlyTyped = type == null, | 2389 : _implicitlyTyped = type == null, |
| 2401 _isLocalFunction = isLocalFunction, | 2390 _isLocalFunction = isLocalFunction, |
| (...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2520 accept(v) => unsupported("accept", -1, null); | 2509 accept(v) => unsupported("accept", -1, null); |
| 2521 | 2510 |
| 2522 accept1(v, arg) => unsupported("accept1", -1, null); | 2511 accept1(v, arg) => unsupported("accept1", -1, null); |
| 2523 | 2512 |
| 2524 getStaticType(types) => unsupported("getStaticType", -1, null); | 2513 getStaticType(types) => unsupported("getStaticType", -1, null); |
| 2525 | 2514 |
| 2526 transformChildren(v) => unsupported("transformChildren", -1, null); | 2515 transformChildren(v) => unsupported("transformChildren", -1, null); |
| 2527 | 2516 |
| 2528 visitChildren(v) => unsupported("visitChildren", -1, null); | 2517 visitChildren(v) => unsupported("visitChildren", -1, null); |
| 2529 } | 2518 } |
| OLD | NEW |