Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't bind signatures to immediately applied closures #31204

Open
leafpetersen opened this issue Oct 24, 2017 · 0 comments
Open

Don't bind signatures to immediately applied closures #31204

leafpetersen opened this issue Oct 24, 2017 · 0 comments
Labels
area-web Use area-web for Dart web related issues, including the DDC and dart2js compilers and JS interop. type-performance Issue relates to performance or code size web-dev-compiler

Comments

@leafpetersen
Copy link
Member

A relatively common pattern is

assert(() { // validate; return true; }());

We currently bind a signature to the closure, despite it obviously not escaping. There is an example of this in angular change detection, which causes substantial unnecessary allocation.

@jmesserly jmesserly added type-performance Issue relates to performance or code size and removed dev-compiler-performance labels Apr 19, 2018
@vsmenon vsmenon added the area-web Use area-web for Dart web related issues, including the DDC and dart2js compilers and JS interop. label Jul 20, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-web Use area-web for Dart web related issues, including the DDC and dart2js compilers and JS interop. type-performance Issue relates to performance or code size web-dev-compiler
Projects
None yet
Development

No branches or pull requests

3 participants