Skip to content

Commit 64060a8

Browse files
srawlinsCommit Queue
authored andcommitted
vm_service: Assign fields in field initializers
This is achieved with just a bit of delicacy around commas, braces, semicolons, and possible super-initializers. There is exactly one case of a statement that needs to remain in the constructor body: `_parseTokenPosTable()`. Additionally I add one helper, `_createServiceObjectListOrNull`, which takes care of some casting and nullability quirks. This also includes one small perf improvement: when `createServiceObject` returns null, we immediately return an empty list, without wrapping it in `List.from`. vm_service: helper for list fields Change-Id: Ic5e36bbfa451bea06edf0d9e684705d392f1ad39 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/436540 Commit-Queue: Samuel Rawlins <[email protected]> Reviewed-by: Ben Konyi <[email protected]>
1 parent 59ed4eb commit 64060a8

File tree

3 files changed

+858
-895
lines changed

3 files changed

+858
-895
lines changed

0 commit comments

Comments
 (0)