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

Some form of compile time branch elimination #402

Open
dadhi opened this issue Apr 15, 2024 · 0 comments
Open

Some form of compile time branch elimination #402

dadhi opened this issue Apr 15, 2024 · 0 comments

Comments

@dadhi
Copy link
Owner

dadhi commented Apr 15, 2024

Sometimes when composing the final expression, the parts are the Lambdas and Invocations (e.g. AutoMapper does this a lot).
The more generic lambda may take the null constant or default expression as invocation of a special kind.
After inlining the Invocation contains the conditions Test like Constant(null) == Default(typeof(X)) or similar.
Knowing that we may eliminate the false branch during Collect and Emit phase, and substitute the whole condition with the true branch body.

@dadhi dadhi added this to the v4.1.1 milestone Apr 15, 2024
@dadhi dadhi self-assigned this Apr 15, 2024
@dadhi dadhi removed this from the v4.2.0 milestone Apr 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant