This is the mail archive of the 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: [patch 4/8] Simplify handling of scalar types

Zack Weinberg <> writes:

> 	* gengtype.h (struct type): Replace 'sc' with boolean, scalar_is_char.
> 	(string_type): Don't declare.
> 	(do_scalar_typedef): Declare.
> 	(create_scalar_type): Update prototype.
> 	* gengtype.c (string_type): Make static.
> 	(scalar_nonchar, scalar_char): New.
> 	(do_scalar_typedef): Export.  Always use scalar_nonchar for the type.
> 	(resolve_typedef): Use scalar_nonchar for error recovery.
> 	(create_scalar_type): Remove name_len field.  Return scalar_char
> 	or scalar_nonchar as appropriate.
> 	(adjust_field_type): Look at scalar_is_char boolean to decide whether
> 	to use string_type.
> 	(throughout): Use scalar_nonchar instead of calling create_scalar_type,
> 	whenever possible.
> 	(main): Initialize scalar_char and scalar_nonchar before calling
> 	gen_rtx_next.
> 	* gengtype-lex.l: Adjust for removal of second argument to
> 	create_scalar_type.  Use yylval.s instead of yylval.t when
> 	returning SCALAR.
> 	* gengtype-yacc.y: Type of SCALAR is string.  Call
> 	create_scalar_type from type:SCALAR rule.  Adjust for removal of
> 	second argument to create_scalar_type.

This is OK.



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