Skip to content

[vm/ffi] Support treeshaking of FFI structs #38721

@sjindel-google

Description

@sjindel-google

Update 2021-03-10: All API changes are done.

Everything except struct constructors is shaken out. Struct constructors are still retained, because the FFI trampolines creating structs (in FFI call returns, or FFI callback arguments) is not hooked up to the TFA.

Update 2021-01-05: We should make the necessary API changes introducing an Allocator interface before Flutter 2.0, the actual implementation of tree-shaking can be done later.

===============================================================================

The way FFI structs are implemented involves adding entry-point annotations to members of all generated struct classes.

This prevents any FFI structs from being tree-shaken. We should fix this.

Metadata

Metadata

Assignees

Labels

area-vmUse area-vm for VM related issues, including code coverage, and the AOT and JIT backends.library-ffi

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions