-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Open
Labels
P3A lower priority bug or feature requestA lower priority bug or feature requestarea-web-jsIssues related to JavaScript support for Dart Web, including DDC, dart2js, and JS interop.Issues related to JavaScript support for Dart Web, including DDC, dart2js, and JS interop.web-dev-compilerweb-technical-debt
Description
DDC has special logic to emit code differently when in the context of JS foreign functions. This has worked in the past because DDC is fairly local and all uses of JS foreign functions were within the SDK.
This special logic is hard to follow: reading the runtime libraries is ambiguous and confusing. Also the assumptions are changing:
- we are discussing the possiblity of implementing simple kernel inlining transformations, which will break the SDK-only assumption above
- In recent explorations with optimizing js_util methods, we have added lowering to helper methods and even to
JSforeign calls. This lowering broke assumptions made by DDC and started triggering issues. For example see https://dart-review.googlesource.com/c/sdk/+/199540
To eliminate all this special magic we should instead:
- use helpers methods like
typeRep<T>in the sdk libraries to remove the special magic. - eventually reduce the use of large string-interpolated inputs to
JS, instead adopt a more frugal use ofJSlike dart2js does.
nshahan, parlough and gustav3d
Metadata
Metadata
Assignees
Labels
P3A lower priority bug or feature requestA lower priority bug or feature requestarea-web-jsIssues related to JavaScript support for Dart Web, including DDC, dart2js, and JS interop.Issues related to JavaScript support for Dart Web, including DDC, dart2js, and JS interop.web-dev-compilerweb-technical-debt