gengtype plugin improvement last4round -patch 5 [typedopt]
Basile Starynkevitch
basile@starynkevitch.net
Mon Nov 22 12:44:00 GMT 2010
Hello All,
References:
http://gcc.gnu.org/ml/gcc-patches/2010-09/msg01744.html
and previous references
Attached patch to trunk r167024 did bootstrap.
######## gcc/ChangeLog entry
2010-11-22 Jeremie Salvucci <jeremie.salvucci@free.fr>
Basile Starynkevitch <basile@starynkevitch.net>
* gengtype.c
(enum typekind, struct options, struct nested_ptr_data)
(struct pair, NUM_PARAM, enum gc_used_enum, struct type, UNION_P)
(UNION_OR_STRUCT_P): Moved into gengtype.h
(string_type, scalar_nonchar, scalar_char): Removed static and
added state_number fake value.
(typedefs, structures, param_structs, variables): Removed static.
(create_option): Removed function.
(create_string_option, create_type_option, created_nested_option):
New.
(created_nested_ptr_option, create_optional_field_)
(adjust_field_rtx_def, adjust_field_tree_exp): Updated accordingly.
(adjust_field_type, process_gc_options, output_mangled_typename)
(walk_type, write_func_for_structure, write_types, write_roots)
(note_def_vec, dump_options): Ditto. Access to options is
protected by tests on their kind.
* gengtype.h: Added a lot of comments. Moved many definitions
from gengtype.h and updated them.
(typedef, structures, param_structs, variables): Declared extern.
(enum typekind): Moved from gengtype.c and added TYPE_NONE.
(enum option_kind): New.
(struct options): Added discriminating kind, and info union.
(struct nested_ptr_data): Moved from gengtype.c.
(create_string_option, create_type_option, create_nested_option):
New.
(struct pair, enum_gc_used_enum, NUM_PARAM): Moved
from gengtype.c and commented more.
(struct_type): Ditto, added state_number.
(string_type, scalar_nonchar, scalar_char): Moved from gengtype.c.
(type_lineloc): New function.
(UNION_P, UNION_OR_STRUCT_P): Moved from gengtype.c and commented
more.
(struct outf): Indented better.
* gengtype-parse.c (str_optvalue_opt, type_optvalue, option):
Updated for our discriminated option.
################
Ok for trunk?
--
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 mines, sont seulement les miennes} ***
-------------- next part --------------
A non-text attachment was scrubbed...
Name: gengtype-typedopt-r167024.diff
Type: text/x-diff
Size: 31596 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20101122/4cd45728/attachment.bin>
More information about the Gcc-patches
mailing list