Commit f444e36b by Mark Mitchell Committed by Mark Mitchell

c-common.h (genrtl_clear_out_block): Remove.

	* c-common.h (genrtl_clear_out_block): Remove.
	* c-semantics.c (genrtl_clear_out_block): Remove.
	(genrtl_while_stmt): Don't call it.
	(genrtl_for_stmt): Likewise.

	* cp-tree.h (struct saved_scope): Remove x_function_parms.
	(current_function_parms): Don't define.
	(struct cp_language_function): Remove parms_stored.
	(current_function_just_assigned_this): Don't define.
	(current_function_parms_stored): Likewise.
	(static_ctors): Declare.
	(static_dtors): Likewise.
	(SF_EXPAND): Don't define.
	(expand_start_early_try_stmts): Remove declaration.
	(store_parm_decls): Likewise.
	* decl.c (static_ctors): Don't declare.
	(static_dtors): Likewise.
	(struct binding_level): Remove this_block.
	(poplevel): Remove dead code.
	(set_block): Likewise.
	(mark_binding_level): Don't mark this_block.
	(mark_saved_scope): Don't mark x_function_parms.
	(init_decl_processing): Don't add current_function_parms as a GC
	root.
	(check_function_type): Change prototype.
	(start_function): Remove RTL-generation code.
	(expand_start_early_try_stmts): Remove.
	(store_parm_decls): Give it internal linkage.  Remove
	RTL-generation code.
	(finish_function): Remove RTL-generation code.
	* decl2.c (static_ctors): Fix formatting.
	(static_dtors): Likewise.
	* method.c (use_thunk): Don't call store_parm_decls.
	(synthesize_method): Likewise.
	* optimize.c (maybe_clone_body): Likewise.
	* parse.y (fn.def2): Likewise.
	(.set_base_init): Likewise.
	(nodecls): Likewise.
	* pt.c (instantiate_decl): Likewise.
	* rtti.c (synthesize_tinfo_fn): Likewise.
	* semantics.c (genrtl_try_block): Simplify.
	(expand_body): Use genrtl_start_function and
	genrtl_finish_function.
	(genrtl_start_function): New function.
	(genrtl_finish_function): Likewise.

From-SVN: r36350
parent 484d9e58
2000-09-11 Mark Mitchell <mark@codesourcery.com>
* c-common.h (genrtl_clear_out_block): Remove.
* c-semantics.c (genrtl_clear_out_block): Remove.
(genrtl_while_stmt): Don't call it.
(genrtl_for_stmt): Likewise.
2000-09-11 Zack Weinberg <zack@wolery.cumb.org> 2000-09-11 Zack Weinberg <zack@wolery.cumb.org>
* cppfiles.c: Move all default-#defines to top of file. * cppfiles.c: Move all default-#defines to top of file.
......
...@@ -570,7 +570,6 @@ enum c_tree_code { ...@@ -570,7 +570,6 @@ enum c_tree_code {
extern void add_c_tree_codes PARAMS ((void)); extern void add_c_tree_codes PARAMS ((void));
extern void genrtl_do_pushlevel PARAMS ((void)); extern void genrtl_do_pushlevel PARAMS ((void));
extern void genrtl_clear_out_block PARAMS ((void));
extern void genrtl_goto_stmt PARAMS ((tree)); extern void genrtl_goto_stmt PARAMS ((tree));
extern void genrtl_expr_stmt PARAMS ((tree)); extern void genrtl_expr_stmt PARAMS ((tree));
extern void genrtl_decl_stmt PARAMS ((tree)); extern void genrtl_decl_stmt PARAMS ((tree));
......
2000-09-11 Mark Mitchell <mark@codesourcery.com>
* cp-tree.h (struct saved_scope): Remove x_function_parms.
(current_function_parms): Don't define.
(struct cp_language_function): Remove parms_stored.
(current_function_just_assigned_this): Don't define.
(current_function_parms_stored): Likewise.
(static_ctors): Declare.
(static_dtors): Likewise.
(SF_EXPAND): Don't define.
(expand_start_early_try_stmts): Remove declaration.
(store_parm_decls): Likewise.
* decl.c (static_ctors): Don't declare.
(static_dtors): Likewise.
(struct binding_level): Remove this_block.
(poplevel): Remove dead code.
(set_block): Likewise.
(mark_binding_level): Don't mark this_block.
(mark_saved_scope): Don't mark x_function_parms.
(init_decl_processing): Don't add current_function_parms as a GC
root.
(check_function_type): Change prototype.
(start_function): Remove RTL-generation code.
(expand_start_early_try_stmts): Remove.
(store_parm_decls): Give it internal linkage. Remove
RTL-generation code.
(finish_function): Remove RTL-generation code.
* decl2.c (static_ctors): Fix formatting.
(static_dtors): Likewise.
* method.c (use_thunk): Don't call store_parm_decls.
(synthesize_method): Likewise.
* optimize.c (maybe_clone_body): Likewise.
* parse.y (fn.def2): Likewise.
(.set_base_init): Likewise.
(nodecls): Likewise.
* pt.c (instantiate_decl): Likewise.
* rtti.c (synthesize_tinfo_fn): Likewise.
* semantics.c (genrtl_try_block): Simplify.
(expand_body): Use genrtl_start_function and
genrtl_finish_function.
(genrtl_start_function): New function.
(genrtl_finish_function): Likewise.
2000-09-11 Nathan Sidwell <nathan@codesourcery.com> 2000-09-11 Nathan Sidwell <nathan@codesourcery.com>
* error.c (cp_tree_printer, case 'P'): Append break. * error.c (cp_tree_printer, case 'P'): Append break.
......
...@@ -792,7 +792,6 @@ struct saved_scope { ...@@ -792,7 +792,6 @@ struct saved_scope {
varray_type lang_base; varray_type lang_base;
tree *lang_stack; tree *lang_stack;
tree lang_name; tree lang_name;
tree x_function_parms;
tree template_parms; tree template_parms;
tree x_previous_class_type; tree x_previous_class_type;
tree x_previous_class_values; tree x_previous_class_values;
...@@ -841,7 +840,6 @@ struct saved_scope { ...@@ -841,7 +840,6 @@ struct saved_scope {
/* Parsing a function declarator leaves a list of parameter names /* Parsing a function declarator leaves a list of parameter names
or a chain or parameter decls here. */ or a chain or parameter decls here. */
#define current_function_parms scope_chain->x_function_parms
#define current_template_parms scope_chain->template_parms #define current_template_parms scope_chain->template_parms
#define processing_template_decl scope_chain->x_processing_template_decl #define processing_template_decl scope_chain->x_processing_template_decl
...@@ -889,7 +887,6 @@ struct cp_language_function ...@@ -889,7 +887,6 @@ struct cp_language_function
int returns_value; int returns_value;
int returns_null; int returns_null;
int parms_stored;
int in_function_try_handler; int in_function_try_handler;
int x_expanding_p; int x_expanding_p;
int name_declared; int name_declared;
...@@ -956,12 +953,6 @@ struct cp_language_function ...@@ -956,12 +953,6 @@ struct cp_language_function
#define current_function_returns_null cp_function_chain->returns_null #define current_function_returns_null cp_function_chain->returns_null
#define current_function_just_assigned_this \
cp_function_chain->just_assigned_this
#define current_function_parms_stored \
cp_function_chain->parms_stored
/* Nonzero if we have already generated code to initialize virtual /* Nonzero if we have already generated code to initialize virtual
function tables in this function. */ function tables in this function. */
...@@ -3509,6 +3500,11 @@ extern int flag_inline_trees; ...@@ -3509,6 +3500,11 @@ extern int flag_inline_trees;
extern int at_eof; extern int at_eof;
/* Functions called along with real static constructors and destructors. */
extern tree static_ctors;
extern tree static_dtors;
enum overload_flags { NO_SPECIAL = 0, DTOR_FLAG, OP_FLAG, TYPENAME_FLAG }; enum overload_flags { NO_SPECIAL = 0, DTOR_FLAG, OP_FLAG, TYPENAME_FLAG };
/* Some macros for char-based bitfields. */ /* Some macros for char-based bitfields. */
...@@ -3637,8 +3633,6 @@ enum overload_flags { NO_SPECIAL = 0, DTOR_FLAG, OP_FLAG, TYPENAME_FLAG }; ...@@ -3637,8 +3633,6 @@ enum overload_flags { NO_SPECIAL = 0, DTOR_FLAG, OP_FLAG, TYPENAME_FLAG };
already been parsed. */ already been parsed. */
#define SF_INCLASS_INLINE 2 /* The function is an inline, defined #define SF_INCLASS_INLINE 2 /* The function is an inline, defined
in the class body. */ in the class body. */
#define SF_EXPAND 4 /* Generate RTL for this function. */
/* Returns nonzero iff TYPE1 and TYPE2 are the same type, or if TYPE2 /* Returns nonzero iff TYPE1 and TYPE2 are the same type, or if TYPE2
is derived from TYPE1, or if TYPE2 is a pointer (reference) to a is derived from TYPE1, or if TYPE2 is a pointer (reference) to a
...@@ -3905,8 +3899,6 @@ extern tree start_enum PARAMS ((tree)); ...@@ -3905,8 +3899,6 @@ extern tree start_enum PARAMS ((tree));
extern tree finish_enum PARAMS ((tree)); extern tree finish_enum PARAMS ((tree));
extern void build_enumerator PARAMS ((tree, tree, tree)); extern void build_enumerator PARAMS ((tree, tree, tree));
extern int start_function PARAMS ((tree, tree, tree, int)); extern int start_function PARAMS ((tree, tree, tree, int));
extern void expand_start_early_try_stmts PARAMS ((void));
extern void store_parm_decls PARAMS ((void));
extern tree finish_function PARAMS ((int)); extern tree finish_function PARAMS ((int));
extern tree start_method PARAMS ((tree, tree, tree)); extern tree start_method PARAMS ((tree, tree, tree));
extern tree finish_method PARAMS ((tree)); extern tree finish_method PARAMS ((tree));
......
...@@ -128,7 +128,8 @@ int at_eof; ...@@ -128,7 +128,8 @@ int at_eof;
/* Functions called along with real static constructors and destructors. */ /* Functions called along with real static constructors and destructors. */
tree static_ctors, static_dtors; tree static_ctors;
tree static_dtors;
/* The :: namespace. */ /* The :: namespace. */
......
...@@ -2258,7 +2258,6 @@ use_thunk (thunk_fndecl, emit_p) ...@@ -2258,7 +2258,6 @@ use_thunk (thunk_fndecl, emit_p)
DECL_RESULT (thunk_fndecl) = NULL_TREE; DECL_RESULT (thunk_fndecl) = NULL_TREE;
start_function (NULL_TREE, thunk_fndecl, NULL_TREE, SF_PRE_PARSED); start_function (NULL_TREE, thunk_fndecl, NULL_TREE, SF_PRE_PARSED);
store_parm_decls ();
/* Adjust the this pointer by the constant. */ /* Adjust the this pointer by the constant. */
t = ssize_int (delta); t = ssize_int (delta);
...@@ -2530,7 +2529,6 @@ synthesize_method (fndecl) ...@@ -2530,7 +2529,6 @@ synthesize_method (fndecl)
interface_unknown = 1; interface_unknown = 1;
start_function (NULL_TREE, fndecl, NULL_TREE, SF_DEFAULT | SF_PRE_PARSED); start_function (NULL_TREE, fndecl, NULL_TREE, SF_DEFAULT | SF_PRE_PARSED);
store_parm_decls ();
clear_last_expr (); clear_last_expr ();
if (DECL_OVERLOADED_OPERATOR_P (fndecl) == NOP_EXPR) if (DECL_OVERLOADED_OPERATOR_P (fndecl) == NOP_EXPR)
......
...@@ -932,7 +932,6 @@ maybe_clone_body (fn) ...@@ -932,7 +932,6 @@ maybe_clone_body (fn)
/* Start processing the function. */ /* Start processing the function. */
push_to_top_level (); push_to_top_level ();
start_function (NULL_TREE, clone, NULL_TREE, SF_PRE_PARSED); start_function (NULL_TREE, clone, NULL_TREE, SF_PRE_PARSED);
store_parm_decls ();
/* Just clone the body, as if we were making an inline call. /* Just clone the body, as if we were making an inline call.
But, remap the parameters in the callee to the parameters of But, remap the parameters in the callee to the parameters of
......
...@@ -835,8 +835,6 @@ fn.def2: ...@@ -835,8 +835,6 @@ fn.def2:
return_id: return_id:
RETURN_KEYWORD IDENTIFIER RETURN_KEYWORD IDENTIFIER
{ {
if (! current_function_parms_stored)
store_parm_decls ();
$$ = $2; $$ = $2;
} }
; ;
...@@ -863,9 +861,6 @@ base_init: ...@@ -863,9 +861,6 @@ base_init:
.set_base_init: .set_base_init:
/* empty */ /* empty */
{ {
if (! current_function_parms_stored)
store_parm_decls ();
if (DECL_CONSTRUCTOR_P (current_function_decl)) if (DECL_CONSTRUCTOR_P (current_function_decl))
/* Make a contour for the initializer list. */ /* Make a contour for the initializer list. */
do_pushlevel (); do_pushlevel ();
...@@ -1723,8 +1718,6 @@ string: ...@@ -1723,8 +1718,6 @@ string:
nodecls: nodecls:
/* empty */ /* empty */
{ {
if (! current_function_parms_stored)
store_parm_decls ();
setup_vtbl_ptr (NULL_TREE, NULL_TREE); setup_vtbl_ptr (NULL_TREE, NULL_TREE);
} }
; ;
......
...@@ -9686,7 +9686,6 @@ instantiate_decl (d, defer_ok) ...@@ -9686,7 +9686,6 @@ instantiate_decl (d, defer_ok)
/* Set up context. */ /* Set up context. */
start_function (NULL_TREE, d, NULL_TREE, SF_PRE_PARSED); start_function (NULL_TREE, d, NULL_TREE, SF_PRE_PARSED);
store_parm_decls ();
/* We already set up __FUNCTION__, etc., so we don't want to do /* We already set up __FUNCTION__, etc., so we don't want to do
it again now. */ it again now. */
......
...@@ -1195,7 +1195,6 @@ synthesize_tinfo_fn (fndecl) ...@@ -1195,7 +1195,6 @@ synthesize_tinfo_fn (fndecl)
start_function (NULL_TREE, fndecl, NULL_TREE, start_function (NULL_TREE, fndecl, NULL_TREE,
SF_DEFAULT | SF_PRE_PARSED); SF_DEFAULT | SF_PRE_PARSED);
DECL_DEFER_OUTPUT (fndecl) = 1; DECL_DEFER_OUTPUT (fndecl) = 1;
store_parm_decls ();
clear_last_expr (); clear_last_expr ();
/* Begin the body of the function. */ /* Begin the body of the function. */
......
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