[vm, tfa] Fix tree-shaking of late final fields with initializers TFA tree shaker removes initializers of fields which cannot be accessed but retained due to an entry point pragma / dynamic interface. For late final fields with initializers that changes semantics as late final fields without initializers have an implicit setter. Such setter is not accounted in the kernel AST (Field.setterReference == null and Field.hasSetter == false) and it doesn't get an assigned selector id, which causes a crash in dispatch table generator. The change fixes this bug by retaining initializers for late final fields. The initializer code is still replaced with throw "Attempt to execute code removed by Dart AOT compiler (TFA)". TEST=pkg/vm/testcases/transformations/type_flow/transformer/regress_b404559785.dart Bug: b/404559785 Change-Id: Id998a715ea75a4768414997ce66bcdd1d4f19189 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/416720 Commit-Queue: Alexander Markov <alexmarkov@google.com> Reviewed-by: Slava Egorov <vegorov@google.com> Reviewed-by: Sigmund Cherem <sigmund@google.com> https://dart.googlesource.com/sdk/+/1b6f89d284dc30afc52147158aae6a2ace6ab0c0
diff --git a/DEPS b/DEPS index 7cd4cc3..be0e31a 100644 --- a/DEPS +++ b/DEPS
@@ -238,7 +238,7 @@ ] deps = { - 'flutter/engine/src/flutter/third_party/dart': Var('dart_git') + '/sdk' + '@' + '42bdd6071f5fc09183bf40c779dee211675d3d4a', + 'flutter/engine/src/flutter/third_party/dart': Var('dart_git') + '/sdk' + '@' + '1b6f89d284dc30afc52147158aae6a2ace6ab0c0', 'flutter': Var('flutter_git') + '/mirrors/flutter' + '@' + 'bf3826d2ce928dc8ed0d66c0aeb4c8c3a86705ab',
diff --git a/commits.json b/commits.json index 989dd6e..54a08c0 100644 --- a/commits.json +++ b/commits.json
@@ -1,4 +1,4 @@ { "flutter":"bf3826d2ce928dc8ed0d66c0aeb4c8c3a86705ab", - "flutter/engine/src/flutter/third_party/dart":"42bdd6071f5fc09183bf40c779dee211675d3d4a" + "flutter/engine/src/flutter/third_party/dart":"1b6f89d284dc30afc52147158aae6a2ace6ab0c0" } \ No newline at end of file