-
Notifications
You must be signed in to change notification settings - Fork 5.2k
Closed
Labels
Milestone
Description
...because someone might want to put a Hello World (compiled with the default compiler settings) on a floppy. Of course we can go smaller if one starts disabling features like globalization or stack traces. But the defaults are interesting.
The theme is: type loader should not be necessary in a Hello World and we should be able to trim it.
- Improve EqualityComparer for NativeAOT #83054
- Avoid generic virtual methods in enum infrastructure #83063
- Make open method resolver pay for play #83064
- Emit leaner cctor context for preinitialized types #83065
[ ] Limit impact of reflectable Invoke methods #83066- Ifdef out a piece of unreachable reflection stack #83067
- Split
TryGetGenericMethodComponentsinto two overloads #84156 This is keeping around MethodSignature support that needs type loader to do things like Equals.Lines 893 to 895 in c9a7a2d
MethodNameAndSignature dummyNameAndSignature; bool success = TypeLoaderEnvironment.Instance.TryGetGenericMethodComponents(instantiationArgument, out declaringTypeHandle, out dummyNameAndSignature, out genericMethodTypeArgumentHandles); Debug.Assert(success);
We should delete those lines and in the compiler emit what the else branch will handle. This will be a net improvement (search for "file format limitation" in the AOT compiler sources to find spots that deleting this will also fix) - Switch attribute equality to the valuetype equality plan #84095 Attribute.Equals/GetHashCode. This was left unresolved in Bringing down the size of Hello World under 2 MB #80165. Asking for BaseType in the custom attribute requires type loader support to resolve the signature (similar for field signatures).
With the above (and hacks for the last two), I see default Hello World at 1.46 MB, down from 1.77 MB.
omariom, expcat, harrison314, nietras, damieng and 4 moreGnbrkm41, neon-sunset, Joe4evr, EgorBo, PaulusParssinen and 6 moreGnbrkm41, maxkatz6, filipnavara, KeterSCP, EgorBo and 9 more
Metadata
Metadata
Assignees
Labels
Type
Projects
Status
No status