Files
sdk/pkg/dart2wasm
Martin Kustermann 96d8359e32 [dart2wasm] Cleanup closure related things
Move the creation of

* name of a lambda to `translator.functions.getLambdaFunctionName`
* type of a lambda to `translator.functions.getLambdaFunctionType`

Removes dependency on `w.FunctionBuilder` in the lambda code generators
- as they don't need access to the wasm function. This may allow
inlining closure calls in the future.

Avoid creating `w.FunctionBuilder` eagerly when analyzing closures and
instead create it only when there's a call to it (or the closure object
gets instantiated).

Use `CallTarget` abstraction when invoking lambdas.

Avoid carrying around
`(lambda, enclosingMember, enclosingMemberClosures)` throughout
the codebase and instead store this information on `Lambda`.

=> All these changes make the codebase more uniform between
   lambdas and normal functions and also is net code removal.

Change-Id: Ib69566ea9580827be0ed52c0c179884e84599d88
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/501983
Commit-Queue: Martin Kustermann <kustermann@google.com>
Reviewed-by: Srujan Gaddam <srujzs@google.com>
2026-05-11 01:48:14 -07:00
..
2026-03-19 01:25:57 -07:00