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

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

Issue 3000353002: Start implementing logic for determining when formal parameters need type checks. (Closed)
Patch Set: Created 3 years, 3 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
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 2360 matching lines...) Expand 10 before | Expand all | Expand 10 after
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;
ahe 2017/08/23 09:55:58 As for the future direction, I suggest these are r
Paul Berry 2017/08/23 17:09:10 Let's talk with the kernel folks about this. My g
2391
2381 KernelVariableDeclaration(String name, this._functionNestingLevel, 2392 KernelVariableDeclaration(String name, this._functionNestingLevel,
2382 {Expression initializer, 2393 {Expression initializer,
2383 DartType type, 2394 DartType type,
2384 bool isFinal: false, 2395 bool isFinal: false,
2385 bool isConst: false, 2396 bool isConst: false,
2386 bool isFieldFormal: false, 2397 bool isFieldFormal: false,
2387 bool isLocalFunction: false}) 2398 bool isLocalFunction: false})
2388 : _implicitlyTyped = type == null, 2399 : _implicitlyTyped = type == null,
2389 _isLocalFunction = isLocalFunction, 2400 _isLocalFunction = isLocalFunction,
2390 super(name, 2401 super(name,
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after
2507 accept(v) => unsupported("accept", -1, null); 2518 accept(v) => unsupported("accept", -1, null);
2508 2519
2509 accept1(v, arg) => unsupported("accept1", -1, null); 2520 accept1(v, arg) => unsupported("accept1", -1, null);
2510 2521
2511 getStaticType(types) => unsupported("getStaticType", -1, null); 2522 getStaticType(types) => unsupported("getStaticType", -1, null);
2512 2523
2513 transformChildren(v) => unsupported("transformChildren", -1, null); 2524 transformChildren(v) => unsupported("transformChildren", -1, null);
2514 2525
2515 visitChildren(v) => unsupported("visitChildren", -1, null); 2526 visitChildren(v) => unsupported("visitChildren", -1, null);
2516 } 2527 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698