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

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

Issue 2994973002: Implement type variables on local function declarations and expressions. (Closed)
Patch Set: Update expectation files after adding copyright. Created 3 years, 4 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 1339 matching lines...) Expand 10 before | Expand all | Expand 10 after
1350 /// Concrete shadow object representing a named function expression. 1350 /// Concrete shadow object representing a named function expression.
1351 /// 1351 ///
1352 /// Named function expressions are not legal in Dart, but they are accepted by 1352 /// Named function expressions are not legal in Dart, but they are accepted by
1353 /// the parser and BodyBuilder for error recovery purposes. 1353 /// the parser and BodyBuilder for error recovery purposes.
1354 /// 1354 ///
1355 /// A named function expression of the form `f() { ... }` is represented as the 1355 /// A named function expression of the form `f() { ... }` is represented as the
1356 /// kernel expression: 1356 /// kernel expression:
1357 /// 1357 ///
1358 /// let f = () { ... } in f 1358 /// let f = () { ... } in f
1359 class KernelNamedFunctionExpression extends Let implements KernelExpression { 1359 class KernelNamedFunctionExpression extends Let implements KernelExpression {
1360 KernelNamedFunctionExpression(VariableDeclaration variable, Expression body) 1360 KernelNamedFunctionExpression(VariableDeclaration variable)
1361 : super(variable, body); 1361 : super(variable, new VariableGet(variable));
1362 1362
1363 @override 1363 @override
1364 void _collectDependencies(KernelDependencyCollector collector) { 1364 void _collectDependencies(KernelDependencyCollector collector) {
1365 collector.collectDependencies(variable.initializer); 1365 collector.collectDependencies(variable.initializer);
1366 } 1366 }
1367 1367
1368 @override 1368 @override
1369 DartType _inferExpression( 1369 DartType _inferExpression(
1370 KernelTypeInferrer inferrer, DartType typeContext, bool typeNeeded) { 1370 KernelTypeInferrer inferrer, DartType typeContext, bool typeNeeded) {
1371 typeNeeded = 1371 typeNeeded =
(...skipping 1135 matching lines...) Expand 10 before | Expand all | Expand 10 after
2507 accept(v) => unsupported("accept", -1, null); 2507 accept(v) => unsupported("accept", -1, null);
2508 2508
2509 accept1(v, arg) => unsupported("accept1", -1, null); 2509 accept1(v, arg) => unsupported("accept1", -1, null);
2510 2510
2511 getStaticType(types) => unsupported("getStaticType", -1, null); 2511 getStaticType(types) => unsupported("getStaticType", -1, null);
2512 2512
2513 transformChildren(v) => unsupported("transformChildren", -1, null); 2513 transformChildren(v) => unsupported("transformChildren", -1, null);
2514 2514
2515 visitChildren(v) => unsupported("visitChildren", -1, null); 2515 visitChildren(v) => unsupported("visitChildren", -1, null);
2516 } 2516 }
OLDNEW
« no previous file with comments | « pkg/front_end/lib/src/fasta/kernel/body_builder.dart ('k') | pkg/front_end/lib/src/fasta/parser/listener.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698