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 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/scanner/token.dart' show Token; | 6 import 'package:front_end/src/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 168 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
179 } | 179 } |
180 | 180 |
181 @override | 181 @override |
182 StaticGet staticGet(Member readTarget, Token token) { | 182 StaticGet staticGet(Member readTarget, Token token) { |
183 return new KernelStaticGet(readTarget)..fileOffset = offsetForToken(token); | 183 return new KernelStaticGet(readTarget)..fileOffset = offsetForToken(token); |
184 } | 184 } |
185 | 185 |
186 @override | 186 @override |
187 StaticInvocation staticInvocation(Procedure target, Arguments arguments, | 187 StaticInvocation staticInvocation(Procedure target, Arguments arguments, |
188 {bool isConst: false}) { | 188 {bool isConst: false}) { |
| 189 if (target.kind == ProcedureKind.Factory) { |
| 190 return new KernelFactoryConstructorInvocation(target, arguments, |
| 191 isConst: isConst); |
| 192 } |
189 return new KernelStaticInvocation(target, arguments, isConst: isConst); | 193 return new KernelStaticInvocation(target, arguments, isConst: isConst); |
190 } | 194 } |
191 | 195 |
192 @override | 196 @override |
193 StringConcatenation stringConcatenation( | 197 StringConcatenation stringConcatenation( |
194 List<Expression> expressions, Token token) { | 198 List<Expression> expressions, Token token) { |
195 return new KernelStringConcatenation(expressions) | 199 return new KernelStringConcatenation(expressions) |
196 ..fileOffset = offsetForToken(token); | 200 ..fileOffset = offsetForToken(token); |
197 } | 201 } |
198 | 202 |
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
261 Token token) { | 265 Token token) { |
262 return new KernelVariableGet(variable, fact, scope) | 266 return new KernelVariableGet(variable, fact, scope) |
263 ..fileOffset = offsetForToken(token); | 267 ..fileOffset = offsetForToken(token); |
264 } | 268 } |
265 | 269 |
266 @override | 270 @override |
267 VariableSet variableSet(VariableDeclaration variable, Expression value) { | 271 VariableSet variableSet(VariableDeclaration variable, Expression value) { |
268 return new KernelVariableSet(variable, value); | 272 return new KernelVariableSet(variable, value); |
269 } | 273 } |
270 } | 274 } |
OLD | NEW |