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 327 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
338 DartType _inferExpression( | 338 DartType _inferExpression( |
339 KernelTypeInferrer inferrer, DartType typeContext, bool typeNeeded) { | 339 KernelTypeInferrer inferrer, DartType typeContext, bool typeNeeded) { |
340 // TODO(scheglov): implement. | 340 // TODO(scheglov): implement. |
341 return typeNeeded ? const DynamicType() : null; | 341 return typeNeeded ? const DynamicType() : null; |
342 } | 342 } |
343 } | 343 } |
344 | 344 |
345 /// Shadow object for [MethodInvocation]. | 345 /// Shadow object for [MethodInvocation]. |
346 class KernelMethodInvocation extends MethodInvocation | 346 class KernelMethodInvocation extends MethodInvocation |
347 implements KernelExpression { | 347 implements KernelExpression { |
348 KernelMethodInvocation(Expression receiver, Name name, Arguments arguments) | 348 KernelMethodInvocation(Expression receiver, Name name, Arguments arguments, |
349 : super(receiver, name, arguments); | 349 [Procedure interfaceTarget]) |
| 350 : super(receiver, name, arguments, interfaceTarget); |
350 | 351 |
351 KernelMethodInvocation.byReference(Expression receiver, Name name, | 352 KernelMethodInvocation.byReference(Expression receiver, Name name, |
352 Arguments arguments, Reference interfaceTargetReference) | 353 Arguments arguments, Reference interfaceTargetReference) |
353 : super.byReference(receiver, name, arguments, interfaceTargetReference); | 354 : super.byReference(receiver, name, arguments, interfaceTargetReference); |
354 | 355 |
355 @override | 356 @override |
356 DartType _inferExpression( | 357 DartType _inferExpression( |
357 KernelTypeInferrer inferrer, DartType typeContext, bool typeNeeded) { | 358 KernelTypeInferrer inferrer, DartType typeContext, bool typeNeeded) { |
358 // TODO(scheglov): implement. | 359 // TODO(scheglov): implement. |
359 return typeNeeded ? const DynamicType() : null; | 360 return typeNeeded ? const DynamicType() : null; |
(...skipping 17 matching lines...) Expand all Loading... |
377 @override | 378 @override |
378 DartType _inferExpression( | 379 DartType _inferExpression( |
379 KernelTypeInferrer inferrer, DartType typeContext, bool typeNeeded) { | 380 KernelTypeInferrer inferrer, DartType typeContext, bool typeNeeded) { |
380 // TODO(paulberry): implement. | 381 // TODO(paulberry): implement. |
381 return typeNeeded ? const DynamicType() : null; | 382 return typeNeeded ? const DynamicType() : null; |
382 } | 383 } |
383 } | 384 } |
384 | 385 |
385 /// Shadow object for [PropertyGet]. | 386 /// Shadow object for [PropertyGet]. |
386 class KernelPropertyGet extends PropertyGet implements KernelExpression { | 387 class KernelPropertyGet extends PropertyGet implements KernelExpression { |
387 KernelPropertyGet(Expression receiver, Name name) : super(receiver, name); | 388 KernelPropertyGet(Expression receiver, Name name, [Member interfaceTarget]) |
| 389 : super(receiver, name, interfaceTarget); |
388 | 390 |
389 KernelPropertyGet.byReference( | 391 KernelPropertyGet.byReference( |
390 Expression receiver, Name name, Reference interfaceTargetReference) | 392 Expression receiver, Name name, Reference interfaceTargetReference) |
391 : super.byReference(receiver, name, interfaceTargetReference); | 393 : super.byReference(receiver, name, interfaceTargetReference); |
392 | 394 |
393 @override | 395 @override |
394 DartType _inferExpression( | 396 DartType _inferExpression( |
395 KernelTypeInferrer inferrer, DartType typeContext, bool typeNeeded) { | 397 KernelTypeInferrer inferrer, DartType typeContext, bool typeNeeded) { |
396 // TODO(scheglov): implement. | 398 // TODO(scheglov): implement. |
397 return typeNeeded ? const DynamicType() : null; | 399 return typeNeeded ? const DynamicType() : null; |
398 } | 400 } |
399 } | 401 } |
400 | 402 |
401 /// Shadow object for [PropertyGet]. | 403 /// Shadow object for [PropertyGet]. |
402 class KernelPropertySet extends PropertySet implements KernelExpression { | 404 class KernelPropertySet extends PropertySet implements KernelExpression { |
403 KernelPropertySet(Expression receiver, Name name, Expression value) | 405 KernelPropertySet(Expression receiver, Name name, Expression value, |
404 : super(receiver, name, value); | 406 [Member interfaceTarget]) |
| 407 : super(receiver, name, value, interfaceTarget); |
405 | 408 |
406 KernelPropertySet.byReference(Expression receiver, Name name, | 409 KernelPropertySet.byReference(Expression receiver, Name name, |
407 Expression value, Reference interfaceTargetReference) | 410 Expression value, Reference interfaceTargetReference) |
408 : super.byReference(receiver, name, value, interfaceTargetReference); | 411 : super.byReference(receiver, name, value, interfaceTargetReference); |
409 | 412 |
410 @override | 413 @override |
411 DartType _inferExpression( | 414 DartType _inferExpression( |
412 KernelTypeInferrer inferrer, DartType typeContext, bool typeNeeded) { | 415 KernelTypeInferrer inferrer, DartType typeContext, bool typeNeeded) { |
413 // TODO(scheglov): implement. | 416 // TODO(scheglov): implement. |
414 return typeNeeded ? const DynamicType() : null; | 417 return typeNeeded ? const DynamicType() : null; |
(...skipping 460 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
875 // KernelVariableDeclaration. | 878 // KernelVariableDeclaration. |
876 mutatedInClosure = true; | 879 mutatedInClosure = true; |
877 declaredType = variable.type; | 880 declaredType = variable.type; |
878 } | 881 } |
879 return inferrer.inferVariableGet(typeContext, typeNeeded, mutatedInClosure, | 882 return inferrer.inferVariableGet(typeContext, typeNeeded, mutatedInClosure, |
880 _fact, _scope, fileOffset, declaredType, (type) { | 883 _fact, _scope, fileOffset, declaredType, (type) { |
881 promotedType = type; | 884 promotedType = type; |
882 }); | 885 }); |
883 } | 886 } |
884 } | 887 } |
OLD | NEW |