You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently we pass a pointer to Type descriptor to new. It preserves alive all methods of
allocated types, as Type contains Method array. So linker can't strip them.
We should pass a special object that contains only necessary information to new:
1. size
2. size class (needs to be ignored for arrays with more than one element)
2. name string
3. embed GC pointer bitmask or a pointer to satellite GC bitmask (if both are zero, then
it's noptr type)
The text was updated successfully, but these errors were encountered:
The linker looks smart enough not to keep the unused methods.
Unless there is another reason to avoid passing a type to the newobject, this issue could probably be closed.
We've tended to minimize the number of arguments we pass to runtime functions, to minimize binary size. I think it'd be reasonable to call mallocgc directly (three args instead of one, IIRC), but extracting the full suite of info on the caller side is probably not a win. But I might be wrong. :)
The text was updated successfully, but these errors were encountered: