-
Notifications
You must be signed in to change notification settings - Fork 12.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
Eliminate std::vector from Type #1581
Comments
I would like to do this, Chris, but I'm not sure what you mean by "coallocate uint16_t NumContainedTys; in the Type class and then allocate additional space at the end of the object If that's not what you mean, could you clarify, please? |
I would like to do the standard trick of using: struct foo { instead of: struct foo { In this case, T is PATypeHandle. Is that what you wanted to know? -Chris |
I think we're proposing the same thing, except:
Does this make sense or do you have something more clever in mind? |
Yup, that sounds right! -Chris |
The case where the dummy argument is OPTIONAL was missing in the handling of VALUE numerical and logical dummies (passBy::BaseAddressValueAttribute). This caused segfaults while unconditionally copying actual arguments that were legally absent at runtime. Takes this bug as an opportunity to share the code that lowers arguments that must be passed by BaseAddress, BaseAddressValueAttribute, BoxChar, and CharBoxValueAttribute. It has to deal with the exact same issues (being able to make contiguous copies of the actual argument, potentially conditionally at runtime, and potentially requiring a copy-back). The VALUE case is the same as the non value case, except there is never a copy-back and there is always a copy-in for variables. This two differences are easily controlled by a byValue flag. This as the benefit of implementing CHARACTER, VALUE for free that was previously a hard TODO.
Extended Description
Type::ContainedTys is a vector of PATypeHandle's. It would be much more efficient to coallocate the array
on the end of the type object. This is a little tricky due to the fact that Type has subclasses.
The text was updated successfully, but these errors were encountered: