PREFERRED_STACK_BOUNDARY/function calling code fix
Wed Mar 8 08:50:00 GMT 2000
Generally, the patch is OK, but there are a few issues.
o + perm = (struct perm_function *) xcalloc ...
This will never be freed, even if the function is garbage collected.
I now that doesn't happen now, but maybe it will at some point.
You can fix this by using ggc_alloc_obj to allocate the memory,
and then making sure that the memory is marked as needed when
the function is.
o I don't like the name `perm_function' for the structure, or the
name DECL_FUNCTION for the macro. How
about naming the structure `post_compilation_data' and macro
field DECL_PCD, not DECL_FUNCTION.
o I'm nervous about the places where you changed how we copy
DECL_SAVED_INSNS and/or DECL_FRAME_SIZE. Those members are
part of a union; we have to make sure we copy the biggest member.
That's hard to do, and hard to maintain, so really that code
ought just to copy the entire union. That's safer -- in case
someone adds something bigger in there at some point.
Please repost the patch with those changes for one more round of
approval. RTH may have additional comments as well.
Mark Mitchell email@example.com
CodeSourcery, LLC http://www.codesourcery.com
More information about the Gcc-patches