Files
sdk/pkg/vm/testcases/transformations
Jens Johansen cc40e17fd9 [CFE][ffi] Support FFI Finalizable transformation of redirecting factories
A redirecting factory is normally encoded as something like

```
  static factory •({required self::HelperClass bar = #C1}) → self::Bar
    return new self::Foo::•(bar: bar);
```

which the CFE also expects to recreate its internal state when loading
a dill file.

The Finalizable transformation from FFI can change that to something
like:

```
  static factory •({required self::HelperClass bar = #C1}) → self::Bar {
    return block {
      final synthesized self::Foo :expressionValueWrappedFinalizable = new self::Foo::•(bar: bar);
      _in::reachabilityFence(bar);
    } =>:expressionValueWrappedFinalizable;
  }
```

though, which the CFE doesn't understand and subsequently crashes as
in https://github.com/flutter/flutter/issues/124369

This CL makes the CFE understand this transformed version,
fixing the crash.

TEST=Existing tests; added incremental compiler test.

Change-Id: I5e7a5fc6201e4419e9ec1ca69d5522d5190f1f83
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/294761
Reviewed-by: Daco Harkes <dacoharkes@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2023-04-13 07:50:38 +00:00
..