This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: current_function -> cfun


    This is a first step to eliminate the accessor macros.  

This is OK.

    Since variable names like current_function_outgoing_args_size and the
    potential replacement, current_function->outgoing_args_size, are
    somewhat unwieldy, this patch renames current_function to something
    shorter.  I'm still open to suggestions whether a name like curr_func
    would make more sense.

My suggestion for the next step is actually now to leave the accessor macros,
but convert them to upper case, so they are obviously macros.  Once you do
that, the field names can have the "x_" deleted from them.  Since I think
nearly all of the uses of the fields of struct function are inside the
macros, perhaps those names can be shortened even more.

    ! #define first_label_num (cfun->emit->x_first_label_num)

So this would become

#define FIRST_LABEL_NUM cfun->em->first_label_num

This I think isn't too unwieldly in GDB and we should perhaps write a
function to print out the non-array data in a struct function.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]