[cfe] Refactor FunctionNode.futureValueType into emitted value type
Previously we would encode the type of the value returned in `async` functions as the field `futureValueType` on `FunctionNode`. For all other kinds of functions, such as `sync`, `sync*`, and `async*`, that field would be null. This CL renames `futureValueType` into `emittedVAlueType`, and for functions of kinds `async`, `sync*`, and `async*` that is expected to be the type of values emitted via `return` or `yield` statements. For `sync` functions that field is supposed to contain `null`. In response to https://github.com/dart-lang/sdk/issues/54159 TEST=existing Change-Id: I1efdbcc4e75d150f5618c7ca50cfe49a0e54fce6 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/341662 Reviewed-by: Alexander Markov <alexmarkov@google.com> Reviewed-by: Johnni Winther <johnniwinther@google.com> Reviewed-by: Ömer Ağacan <omersa@google.com> Commit-Queue: Chloe Stefantsova <cstefantsova@google.com> Reviewed-by: Mayank Patke <fishythefish@google.com>
This commit is contained in:
committed by
Commit Queue
parent
8d8c4c6125
commit
3eeba4a4e2
@@ -2055,7 +2055,7 @@ class BinaryBuilder {
|
||||
returnType: returnType,
|
||||
asyncMarker: asyncMarker,
|
||||
dartAsyncMarker: dartAsyncMarker,
|
||||
futureValueType: futureValueType)
|
||||
emittedValueType: futureValueType)
|
||||
..fileOffset = offset
|
||||
..fileEndOffset = endOffset
|
||||
..redirectingFactoryTarget = redirectingFactoryTarget;
|
||||
|
||||
Reference in New Issue
Block a user