This is the mail archive of the
gcc-cvs@gcc.gnu.org
mailing list for the GCC project.
egcs/gcc ChangeLog Makefile.in cppfiles.c cpph ...
- To: gcc-cvs at gcc dot gnu dot org
- Subject: egcs/gcc ChangeLog Makefile.in cppfiles.c cpph ...
- From: zack at gcc dot gnu dot org
- Date: 12 Mar 2000 23:46:06 -0000
CVSROOT: /cvs/gcc
Module name: egcs
Changes by: zack@sourceware.cygnus.com 00/03/12 15:46:06
Modified files:
gcc : ChangeLog Makefile.in cppfiles.c cpphash.c
cpphash.h cppinit.c cpplib.c cpplib.h
Log message:
Convert cpplib to use libiberty/hashtab.c.
* cpplib.h (struct cpp_reader): Make hashtab and
all_include_files of type 'struct htab *'. Delete HASHSIZE
and ALL_INCLUDE_HASHSIZE macros.
* cpphash.h: Update prototypes.
(struct hashnode): Remove next, prev, and bucket_hdr members.
Make length a size_t. Add hash member.
(struct ihash): Remove next member. Add hash member. Make
name a flexible array member.
* cppfiles.c: Include hashtab.h.
(include_hash): Delete.
(IHASHSIZE): New macro.
(hash_IHASH, eq_IHASH, _cpp_init_include_hash): New functions.
(cpp_included): Do the hash lookup here.
(_cpp_find_include_file): Rewrite.
(cpp_read_file): Put the "fake" hash entry into the hash
table. Honor the control_macro, if it turns out we've seen
the file before. Don't push the buffer here.
(_cpp_read_include_file): Push the buffer here.
(OMODES): New macro. Use it whenever we call open(2).
* cpphash.c: Include hashtab.h.
(hash_HASHNODE, eq_HASHNODE, del_HASHNODE, dump_hash_helper,
_cpp_init_macro_hash, _cpp_dump_macro_hash, _cpp_make_hashnode,
_cpp_lookup_slot): New functions.
(HASHSIZE): new macro.
(hashf, _cpp_install, _cpp_delete_macro): Delete.
(_cpp_lookup): Use hashtab.h routines.
* cppinit.c: Include hashtab.h.
(cpp_reader_init): Call _cpp_init_macro_hash and
_cpp_init_include_hash. Don't allocate hashtab directly.
(cpp_cleanup): Just call htab_delete on pfile->hashtab and
pfile->all_include_files.
(initialize_builtins): Use _cpp_make_hashnode and
htab_find_slot to add hash entries.
(cpp_finish): Just call _cpp_dump_macro_hash.
* cpplib.c: Include hashtab.h.
(do_define): Use _cpp_lookup_slot and _cpp_make_hashnode to
create hash entries.
(do_pragma_poison, do_assert): Likewise.
(do_include): Don't push the buffer here. Don't increment
system_include_depth unless _cpp_read_include_file succeeds.
(do_undef, do_unassert): Use _cpp_lookup_slot and htab_clear_slot
or htab_remove_elt.
(do_pragma_implementation): Use alloca to create copy.
* Makefile.in: Update dependencies.
Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/egcs/gcc/ChangeLog.diff?cvsroot=gcc&r1=1.5910&r2=1.5911
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/egcs/gcc/Makefile.in.diff?cvsroot=gcc&r1=1.396&r2=1.397
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/egcs/gcc/cppfiles.c.diff?cvsroot=gcc&r1=1.44&r2=1.45
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/egcs/gcc/cpphash.c.diff?cvsroot=gcc&r1=1.52&r2=1.53
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/egcs/gcc/cpphash.h.diff?cvsroot=gcc&r1=1.20&r2=1.21
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/egcs/gcc/cppinit.c.diff?cvsroot=gcc&r1=1.61&r2=1.62
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/egcs/gcc/cpplib.c.diff?cvsroot=gcc&r1=1.130&r2=1.131
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/egcs/gcc/cpplib.h.diff?cvsroot=gcc&r1=1.69&r2=1.70