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]
Other format: [Raw text]

Re: PATH: call move init_reg_modes call (for compile-server)


Zack Weinberg wrote:

Per Bothner <per@bothner.com> writes:
How about:

init_xxx_once
  - global run-once initialization
init_xxx_eachsrc (instead of init_xxx_eachtu)
  - (re)init for each source module (translation unit)
init_xxx_eachasm
  - (re-)init for each output (asm) file
init_xxx_eachfn
  - (re-)init for each function
plain init_xxx
  - should be avoided and renamed to one of the above

Sounds good to me. This should be documented somewhere - would you be willing to create a "coding conventions" section of the internals manual and put this information there?

Sure - but one more issue first: Front-end initialization currently uses the names LANGUAGE_init as well as LANGUAGE_init_decl_processing. Should these also (at some point) change to init_LANGUAGE{_once,_eachsrc} and init_LANGUAGE_decl_processing{_once,_eachsrc}, for consistency?

Would a "postfix" convention be better:  xxx_init_once,
xxx_init_eachsrc, etc?  You'd get names like:  eh_init_once,
reg_init_eachfn, c_init_once, c_obj_common_init_eachsrc.

I'll wait a day or two in case someone else chimes in.
--
	--Per Bothner
per@bothner.com   http://per.bothner.com/



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