-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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
Remove FEATURE_COMPILE define constant from System.Linq.Expressions #32878
Comments
@marek-safar Is this going to be needed for some of the Mono flavors? (Blazor, Xamarin iOS, ...) |
We don't plan to use the SLE interpreter in .net5. The runtime interpreter should work fine with the "compile" version. |
What about for size? Would a build without the compiler be significantly smaller enough to warrant building without it on some platforms? Or we think we could remove it via the linker based on how the Compile method is called? |
(I have a similar question about System.Text.RegularExpressions, which also has a very similar ifdef for its compiler.) |
My understanding, in this case, is that the non-compile version brings whole SLE interpreter which is a chunk of code as well. If we want to optimize for size, in this case, it should be with e.g. RuntimeFeature.IsDynamicCodeCompiled condition which ILLinker knowns how to remove. |
And there aren't any platforms where IsDynamicCodeCompiled returns true but we still care about size? If we can have a single build, removing the ifdefs, and then let the linker exclude stuff to optimize for size, that's great. I just want to make sure we use the right guard condition. The recommendation then is, anywhere we or anyone else has both an interpreter and a compiler implementation for the same functionally, that they both be built in and the compiler guarded behind IsDynamicCodeCompiled? |
We have only Android in that camp but the speed improvement from the compiled code there outweighs potential size increase. |
Moving to 6.0. Please follow up if this needs to be addressed sooner. |
|
FEATURE_COMPILE
is defined on all platforms so the define constant can be removed along with the#else
blocks from any#if FEATURE_COMPILE
.The text was updated successfully, but these errors were encountered: