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

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

Issue 2856363002: Inference for typed ListLiteral(s). (Closed)
Patch Set: Created 3 years, 7 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 import 'package:front_end/src/fasta/kernel/utils.dart'; 5 import 'package:front_end/src/fasta/kernel/utils.dart';
6 import 'package:front_end/src/fasta/scanner/token.dart' show Token; 6 import 'package:front_end/src/fasta/scanner/token.dart' show Token;
7 import 'package:front_end/src/fasta/type_inference/type_promotion.dart'; 7 import 'package:front_end/src/fasta/type_inference/type_promotion.dart';
8 import 'package:kernel/ast.dart'; 8 import 'package:kernel/ast.dart';
9 9
10 import '../builder/ast_factory.dart'; 10 import '../builder/ast_factory.dart';
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
117 return new KernelLogicalExpression(left, operator, right); 117 return new KernelLogicalExpression(left, operator, right);
118 } 118 }
119 119
120 @override 120 @override
121 MapLiteral mapLiteral( 121 MapLiteral mapLiteral(
122 Token beginToken, Token constKeyword, List<MapEntry> entries, 122 Token beginToken, Token constKeyword, List<MapEntry> entries,
123 {DartType keyType: const DynamicType(), 123 {DartType keyType: const DynamicType(),
124 DartType valueType: const DynamicType()}) { 124 DartType valueType: const DynamicType()}) {
125 return new KernelMapLiteral(entries, 125 return new KernelMapLiteral(entries,
126 keyType: keyType, valueType: valueType, isConst: constKeyword != null) 126 keyType: keyType, valueType: valueType, isConst: constKeyword != null)
127 ..fileOffset = constKeyword?.charOffset ?? beginToken.charOffset; 127 ..fileOffset = constKeyword?.charOffset ?? offsetForToken(beginToken);
128 } 128 }
129 129
130 @override 130 @override
131 MethodInvocation methodInvocation( 131 MethodInvocation methodInvocation(
132 Expression receiver, Name name, Arguments arguments, 132 Expression receiver, Name name, Arguments arguments,
133 [Procedure interfaceTarget]) { 133 [Procedure interfaceTarget]) {
134 return new KernelMethodInvocation(receiver, name, arguments); 134 return new KernelMethodInvocation(receiver, name, arguments);
135 } 135 }
136 136
137 @override 137 @override
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after
243 @override 243 @override
244 VariableGet variableGet( 244 VariableGet variableGet(
245 VariableDeclaration variable, 245 VariableDeclaration variable,
246 TypePromotionFact<VariableDeclaration> fact, 246 TypePromotionFact<VariableDeclaration> fact,
247 TypePromotionScope scope, 247 TypePromotionScope scope,
248 Token token) { 248 Token token) {
249 return new KernelVariableGet(variable, fact, scope) 249 return new KernelVariableGet(variable, fact, scope)
250 ..fileOffset = offsetForToken(token); 250 ..fileOffset = offsetForToken(token);
251 } 251 }
252 } 252 }
OLDNEW
« no previous file with comments | « pkg/front_end/lib/src/fasta/kernel/body_builder.dart ('k') | pkg/front_end/lib/src/fasta/kernel/kernel_shadow_ast.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698