gengtype plugin improvement last4round -patch 3 [inputfile]

Basile Starynkevitch basile@starynkevitch.net
Mon Nov 8 18:44:00 GMT 2010


On Fri, 5 Nov 2010 05:51:31 +0200
Laurynas Biveinis <laurynas.biveinis@gmail.com> wrote:


References http://gcc.gnu.org/ml/gcc-patches/2010-10/msg01774.html
          http://gcc.gnu.org/ml/gcc-patches/2010-11/msg00483.html

> Basile -
> 
> We are getting there

Sorry, my english is much worse that yours,
what do you mean by "there"? What is the (imaginary) "place" you think
we are getting to?  What exactly do you mean? I was not able to parse
your sentence unambigously.


> and as much as I'd like to say "OK with such and
> such", I'll have to ask you to submit a new patch. Basically you did
> not address my last two comments from the previous round. Please take
> care to see that the new patch contains only relevant changes and
> nothing else.
> 
> -extern outf_p get_output_file_with_visibility (const char *input_file);
> +   made in INPF and is linked into every language that uses INPF.  May
> +   return NULL in plugin mode.  The INPF argument is almost const, but
> +   since the result is cached in its inpoutf field it cannot be
> +   declared const, because this function stores the computed output
> +   file in that field to speed it up for further invocations.  */
> +outf_p get_output_file_with_visibility (input_file* inpf);
> 
> Drop the last clause after "because".

I am not sure to understand what you mean by clause in that context;
but I shortened the comment to please you more.

The attached patch to trunk r166446 tries hard to take your comments
into account.

########## gcc/ChangeLog entry
2010-11-08  Basile Starynkevitch  <basile@starynkevitch.net>
	    Jeremie Salvucci  <jeremie.salvucci@free.fr>

	* gengtype.c (get_output_file_name): declaration moved to
	gengtype.h.
	(plugin_files, get_file_basename, get_file_realbasename)
	(get_file_langdir, error_at_line, gt_files, this_file)
	(system_h_file, read_input_list, create_field_all)
	(get_file_srcdir_relative_path, get_file_basename)
	(get_file_langdir, get_file_gtfilename)
	(get_output_file_with_visibility, get_output_file_name)
	(struct flist, put_mangled_filename, walk_type)
	(put_mangled_filename, finish_root_table, write_roots): use
	input_file-s.
	(lang_dir_names, num_lang_dirs): remove static.
	(get_lang_bitmap, set_lang_bitmap): moved to gengtype.h.
	(main): Use input_file-s. Don't fatal on plugin mode without
        state.

	* gengtype.h:
	(struct input_file_st, input_file): New type.
	(struct fileloc): use it.
	(gt_files, num_gt_files, this_file, system_h_file)
	(input_file_by_name, get_file_srcdir_relative_path); use
	input_file.
	(get_input_file_name): New function.
	(get_lang_bitmap, set_lang_bitmap): Moved from gengtype.c and
        use input_file.
	(lang_dir_names, num_lang_dirs, get_output_file_with_visibility)
	(get_output_file_name): Ditto.

	* gengtype-lex.l (yybegin): use input_file.

	* gengtype-parse.c (parse_error): use input_file.
##########

I am too afraid to ask if it is ok with some changes.  But I would like
this work to be accepted somehow...


Cheers.
-- 
Basile STARYNKEVITCH         http://starynkevitch.net/Basile/
email: basile<at>starynkevitch<dot>net mobile: +33 6 8501 2359
8, rue de la Faiencerie, 92340 Bourg La Reine, France
*** opinions {are only mine, sont seulement les miennes} ***
-------------- next part --------------
A non-text attachment was scrubbed...
Name: gengtype-r166446-inputfile.diff
Type: text/x-diff
Size: 27744 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20101108/42933b02/attachment.bin>


More information about the Gcc-patches mailing list