Commit bcdb1106 by Jakub Jelinek Committed by Jakub Jelinek

objc-act.c: Include ggc.h.

	* objc/objc-act.c: Include ggc.h.
	(objc_tree_index, objc_global_trees): Convert most of the
	static tree variables into a static array with previous names
	as defines.
	(objc_ellipsis_node): New variable.
	(lang_init): Call objc_act_parse_init and c_parse_init.
	Create objc_ellipsis_node.
	(build_selector_translation_table): Use objc_ellipsis_node instead
	of (tree)1.
	(hack_method_prototype): Likewise.
	(get_arg_type_list): Likewise.
	(start_method_def): Likewise.
	(continue_method_def): Likewise.
	(gen_method_decl): Likewise.
	(ggc_mark_imp_list): New function.
	(ggc_mark_hash_table): New function.
	(objc_act_parse_init): New function.
	* objc/objc-act.h (objc_ellipsis_node): Add extern variable.
	* c-parse.in (c_parse_init): For objc add roots of objc specific
	local tree variables.
	* objc/objc-parse.y: Rebuilt.
	* objc/objc-parse.c: Rebuilt.
	(opt_parm_list): Use objc_ellipsis_node instead of (tree)1.

	* Object.m (strlen): Provide prototype on all 64bit platforms,
	not only alpha.
	* sarray.c (memcpy): Likewise.
	* encoding.c (objc_layout_finish_structure): Don't use
	ROUND_TYPE_ALIGN on sparc.

From-SVN: r33092
parent e8019e47
2000-04-12 Jakub Jelinek <jakub@redhat.com>
* objc/objc-act.c: Include ggc.h.
(objc_tree_index, objc_global_trees): Convert most of the
static tree variables into a static array with previous names
as defines.
(objc_ellipsis_node): New variable.
(lang_init): Call objc_act_parse_init and c_parse_init.
Create objc_ellipsis_node.
(build_selector_translation_table): Use objc_ellipsis_node instead
of (tree)1.
(hack_method_prototype): Likewise.
(get_arg_type_list): Likewise.
(start_method_def): Likewise.
(continue_method_def): Likewise.
(gen_method_decl): Likewise.
(ggc_mark_imp_list): New function.
(ggc_mark_hash_table): New function.
(objc_act_parse_init): New function.
* objc/objc-act.h (objc_ellipsis_node): Add extern variable.
* c-parse.in (c_parse_init): For objc add roots of objc specific
local tree variables.
* objc/objc-parse.y: Rebuilt.
* objc/objc-parse.c: Rebuilt.
(opt_parm_list): Use objc_ellipsis_node instead of (tree)1.
Wed Apr 12 01:00:44 EDT 2000 John Wehle (john@feith.com)
* cse.c (delete_trivially_dead_insns): Also delete insns
......
......@@ -266,6 +266,13 @@ c_parse_init ()
ggc_add_tree_root (&declspec_stack, 1);
ggc_add_tree_root (&current_declspecs, 1);
ggc_add_tree_root (&prefix_attributes, 1);
ifobjc
ggc_add_tree_root (&objc_interface_context, 1);
ggc_add_tree_root (&objc_implementation_context, 1);
ggc_add_tree_root (&objc_method_context, 1);
ggc_add_tree_root (&objc_ivar_chain, 1);
ggc_add_tree_root (&objc_ivar_context, 1);
end ifobjc
}
%}
......@@ -2876,7 +2883,7 @@ optparmlist:
| ',' ELLIPSIS
{
/* oh what a kludge! */
$$ = (tree)1;
$$ = objc_ellipsis_node;
}
| ','
{
......
......@@ -55,6 +55,7 @@ tree build_objc_string_object PARAMS ((tree));
extern tree objc_ivar_chain;
extern tree objc_method_context;
extern tree objc_ellipsis_node;
void objc_declare_alias PARAMS ((tree, tree));
void objc_declare_class PARAMS ((tree));
......
......@@ -160,6 +160,11 @@ c_parse_init ()
ggc_add_tree_root (&declspec_stack, 1);
ggc_add_tree_root (&current_declspecs, 1);
ggc_add_tree_root (&prefix_attributes, 1);
ggc_add_tree_root (&objc_interface_context, 1);
ggc_add_tree_root (&objc_implementation_context, 1);
ggc_add_tree_root (&objc_method_context, 1);
ggc_add_tree_root (&objc_ivar_chain, 1);
ggc_add_tree_root (&objc_ivar_context, 1);
}
#include <stdio.h>
......@@ -4881,7 +4886,7 @@ case 515:
#line 2809 "objc-parse.y"
{
/* oh what a kludge! */
yyval.ttype = (tree)1;
yyval.ttype = objc_ellipsis_node;
;
break;}
case 516:
......
......@@ -251,6 +251,11 @@ c_parse_init ()
ggc_add_tree_root (&declspec_stack, 1);
ggc_add_tree_root (&current_declspecs, 1);
ggc_add_tree_root (&prefix_attributes, 1);
ggc_add_tree_root (&objc_interface_context, 1);
ggc_add_tree_root (&objc_implementation_context, 1);
ggc_add_tree_root (&objc_method_context, 1);
ggc_add_tree_root (&objc_ivar_chain, 1);
ggc_add_tree_root (&objc_ivar_context, 1);
}
%}
......@@ -2808,7 +2813,7 @@ optparmlist:
| ',' ELLIPSIS
{
/* oh what a kludge! */
$$ = (tree)1;
$$ = objc_ellipsis_node;
}
| ','
{
......
2000-04-12 Jakub Jelinek <jakub@redhat.com>
* Object.m (strlen): Provide prototype on all 64bit platforms,
not only alpha.
* sarray.c (memcpy): Likewise.
* encoding.c (objc_layout_finish_structure): Don't use
ROUND_TYPE_ALIGN on sparc.
2000-03-29 Zack Weinberg <zack@wolery.cumb.org>
* objc/Protocol.h, objc/objc-list.h: Change #endif labels to
......
......@@ -320,7 +320,7 @@ extern int errno;
object_get_class_name(self), sel_get_name(aSel)];
}
#ifdef __alpha__
#if defined(__alpha__) || (defined(__sparc__) && (defined(__sparcv9) || defined(__arch64__))) || (defined(__ia64__) && defined(__LP64__))
extern size_t strlen(const char*);
#endif
......
......@@ -878,7 +878,7 @@ void objc_layout_finish_structure (struct objc_struct_layout *layout,
in the record type. Round it up to a multiple of the record's
alignment. */
#ifdef ROUND_TYPE_ALIGN
#if defined(ROUND_TYPE_ALIGN) && !defined(__sparc__)
layout->record_align = ROUND_TYPE_ALIGN (layout->original_type,
1,
layout->record_align);
......
......@@ -44,7 +44,7 @@ const char* __objc_sparse2_id = "2 level sparse indices";
const char* __objc_sparse3_id = "3 level sparse indices";
#endif
#ifdef __alpha__
#if defined(__alpha__) || (defined(__sparc__) && (defined(__sparcv9) || defined(__arch64__))) || (defined(__ia64__) && defined(__LP64__))
const void *memcpy (void*, const void*, size_t);
#endif
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment