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]

PATCH: Add objc-lang.c, further cleanup - TAKE TWO


This patch moves the lang_hooks machinery from objc-act.c to
a newly-created objc-lang.c, for symmetry with other front-ends.
Also, a real hash function (i.e., one based on the value rather
than the address) has been provided for storing message
selectors.  Finally, typos and copyright notices have been
corrected here and there.

Per Neil's suggestion, I've removed the call to maybe_add_objc_tree_codes
from c-lang.c and placed it in objc-act.c.

Bootstrapped successfully on i686-pc-linux-gnu, no regressions.
OK to commit?

--Zem

======================================================================

2001-12-03  Ziemowit Laski  <zlaski@apple.com>

[gcc/ChangeLog]

	* objc/Make-lang.in: Update copyright.
	(OBJC_OBJS): Add objc-lang.o.
	(objc-lang.o): New rule.
	* objc/config-lang.in: Fix file description and update
	copyright.
	* objc/objc-act.c: Do not include langhooks.h and
	langhooks-def.h (objc/objc-lang.c will).
	(lang_hooks): Move (along with LANG_HOOKS...) to objc-lang.c.
	(objc_post_options): Move to objc-lang.c.
	(objc_init_options): Move to objc-lang.c.
	(objc_init): Make non-static.
	(objc_decode_option): Make non-static.
	(HASHFUNCTION): Remove macro.
	(hash_func): New static function.
	(hash_enter): Replace HASHFUNCTION with hash_func.
	(hash_lookup): Replace HASHFUNCTION with hash_func.
	(add_objc_tree_codes): New static function.
	(init_objc): Call add_objc_tree_codes().
	* objc/objc-act.h (GCC_OBJC_ACT_H): New include guard.
	(objc_init): New public prototype.
	(objc_decode_option): New public prototype.
	* objc/objc-lang.c (lang_hooks): Moved from objc-act.c.
	(objc_post_options): Move from objc-act.c.
	(objc_init_options): Move from objc-act.c.

Attachment: objc.diff
Description: Binary data


--------------------------------------------------------------
Ziemowit Laski                   Apple Computer, Inc.
zlaski@apple.com                 2 Infinite Loop, MS 302-4SN
+1.408.974.6229  Fax .1344       Cupertino, CA  95014-2085

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