Skip to content

[js_interop] Consider using a synthesized getter for top-level getters in DDC lowering.Β #60505

Open
@rakudrama

Description

@rakudrama

https://dart-review.googlesource.com/c/sdk/+/418880 changed the lowering for dart2js to use a synthesized getter that is replaces the external getter, and is (usually) later inlined. The synthesized getter has the annotations of the external getter, allowing dart2js optimization annotations to be used.

Consider doing this for the lowering for DDC, for consistency.

Concerns that prevented us from using the same pattern for DDC:

  • The cost of the additional call. If problematic, this could be solved by doing more inlining in DDC.
  • The synthesized getter shows up in the library or class scope in debugging. This breaks some non-sdk tests. This could be solved by fixing the tests to expect some external members to be in scope.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area-web-jsIssues related to JavaScript support for Dart Web, including DDC, dart2js, and JS interop.web-dev-compilerweb-js-interopIssues that impact all js interop

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions