Add prototypes for static functions.
(expand_fixups): New function. (fixup_gotos): Now static. Don't call bc_fixup_gotos with wrong type (but now probably wrong value). (bc_*): Now static. (expand_exit_loop_if_false): Call bc_expand_goto_internal with proper null pointer. (expand_decl_init): Call bc_expand_decl_init if writing bytecode. From-SVN: r7121
This commit is contained in:
parent
a035305579
commit
704f4dca8c
49
gcc/stmt.c
49
gcc/stmt.c
|
@ -1085,7 +1085,7 @@ bc_expand_fixup (opcode, label, stack_level)
|
||||||
contour from before the beginning of the contour.
|
contour from before the beginning of the contour.
|
||||||
This is also done if STACK_LEVEL is nonzero. */
|
This is also done if STACK_LEVEL is nonzero. */
|
||||||
|
|
||||||
void
|
static void
|
||||||
fixup_gotos (thisblock, stack_level, cleanup_list, first_insn, dont_jump_in)
|
fixup_gotos (thisblock, stack_level, cleanup_list, first_insn, dont_jump_in)
|
||||||
struct nesting *thisblock;
|
struct nesting *thisblock;
|
||||||
rtx stack_level;
|
rtx stack_level;
|
||||||
|
@ -1097,7 +1097,10 @@ fixup_gotos (thisblock, stack_level, cleanup_list, first_insn, dont_jump_in)
|
||||||
|
|
||||||
if (output_bytecode)
|
if (output_bytecode)
|
||||||
{
|
{
|
||||||
bc_fixup_gotos (thisblock, stack_level, cleanup_list, first_insn, dont_jump_in);
|
/* ??? The second arg is the bc stack level, which is not the same
|
||||||
|
as STACK_LEVEL. I have no idea what should go here, so I'll
|
||||||
|
just pass 0. */
|
||||||
|
bc_fixup_gotos (thisblock, 0, cleanup_list, first_insn, dont_jump_in);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1238,8 +1241,8 @@ fixup_gotos (thisblock, stack_level, cleanup_list, first_insn, dont_jump_in)
|
||||||
/* When exiting a binding contour, process all pending gotos requiring fixups.
|
/* When exiting a binding contour, process all pending gotos requiring fixups.
|
||||||
Note: STACK_DEPTH is not altered.
|
Note: STACK_DEPTH is not altered.
|
||||||
|
|
||||||
The arguments are currently not used in the bytecode compiler, but we may need
|
The arguments are currently not used in the bytecode compiler, but we may
|
||||||
them one day for languages other than C.
|
need them one day for languages other than C.
|
||||||
|
|
||||||
THISBLOCK is the structure that describes the block being exited.
|
THISBLOCK is the structure that describes the block being exited.
|
||||||
STACK_LEVEL is the rtx for the stack level to restore exiting this contour.
|
STACK_LEVEL is the rtx for the stack level to restore exiting this contour.
|
||||||
|
@ -2249,7 +2252,8 @@ expand_end_cond ()
|
||||||
whose truth is to be tested; if EXITFLAG is nonzero this conditional
|
whose truth is to be tested; if EXITFLAG is nonzero this conditional
|
||||||
is to be visible to exit_something. It is assumed that the caller
|
is to be visible to exit_something. It is assumed that the caller
|
||||||
has pushed the previous context on the cond stack. */
|
has pushed the previous context on the cond stack. */
|
||||||
void
|
|
||||||
|
static void
|
||||||
bc_expand_start_cond (cond, exitflag)
|
bc_expand_start_cond (cond, exitflag)
|
||||||
tree cond;
|
tree cond;
|
||||||
int exitflag;
|
int exitflag;
|
||||||
|
@ -2270,7 +2274,8 @@ bc_expand_start_cond (cond, exitflag)
|
||||||
|
|
||||||
/* Generate the label for the end of an if with
|
/* Generate the label for the end of an if with
|
||||||
no else- clause. */
|
no else- clause. */
|
||||||
void
|
|
||||||
|
static void
|
||||||
bc_expand_end_cond ()
|
bc_expand_end_cond ()
|
||||||
{
|
{
|
||||||
struct nesting *thiscond = cond_stack;
|
struct nesting *thiscond = cond_stack;
|
||||||
|
@ -2280,7 +2285,8 @@ bc_expand_end_cond ()
|
||||||
|
|
||||||
/* Generate code for the start of the else- clause of
|
/* Generate code for the start of the else- clause of
|
||||||
an if-then-else. */
|
an if-then-else. */
|
||||||
void
|
|
||||||
|
static void
|
||||||
bc_expand_start_else ()
|
bc_expand_start_else ()
|
||||||
{
|
{
|
||||||
struct nesting *thiscond = cond_stack;
|
struct nesting *thiscond = cond_stack;
|
||||||
|
@ -2367,6 +2373,7 @@ expand_loop_continue_here ()
|
||||||
}
|
}
|
||||||
|
|
||||||
/* End a loop. */
|
/* End a loop. */
|
||||||
|
|
||||||
static void
|
static void
|
||||||
bc_expand_end_loop ()
|
bc_expand_end_loop ()
|
||||||
{
|
{
|
||||||
|
@ -2556,7 +2563,7 @@ expand_exit_loop_if_false (whichloop, cond)
|
||||||
bc_expand_expr (cond);
|
bc_expand_expr (cond);
|
||||||
bc_expand_goto_internal (xjumpifnot,
|
bc_expand_goto_internal (xjumpifnot,
|
||||||
BYTECODE_BC_LABEL (whichloop->exit_label),
|
BYTECODE_BC_LABEL (whichloop->exit_label),
|
||||||
NULL_RTX);
|
NULL_TREE);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
do_jump (cond, whichloop->data.loop.end_label, NULL_RTX);
|
do_jump (cond, whichloop->data.loop.end_label, NULL_RTX);
|
||||||
|
@ -3310,7 +3317,7 @@ expand_end_bindings (vars, mark_ends, dont_jump_in)
|
||||||
DONT_JUMP_IN is nonzero if it is not valid to jump into this
|
DONT_JUMP_IN is nonzero if it is not valid to jump into this
|
||||||
contour. */
|
contour. */
|
||||||
|
|
||||||
void
|
static void
|
||||||
bc_expand_end_bindings (vars, mark_ends, dont_jump_in)
|
bc_expand_end_bindings (vars, mark_ends, dont_jump_in)
|
||||||
tree vars;
|
tree vars;
|
||||||
int mark_ends;
|
int mark_ends;
|
||||||
|
@ -3554,7 +3561,7 @@ expand_decl (decl)
|
||||||
compiler sometimes emits cleanups without variables and we will
|
compiler sometimes emits cleanups without variables and we will
|
||||||
have to deal with those too. */
|
have to deal with those too. */
|
||||||
|
|
||||||
void
|
static void
|
||||||
bc_expand_decl (decl, cleanup)
|
bc_expand_decl (decl, cleanup)
|
||||||
tree decl;
|
tree decl;
|
||||||
tree cleanup;
|
tree cleanup;
|
||||||
|
@ -3602,6 +3609,12 @@ expand_decl_init (decl)
|
||||||
{
|
{
|
||||||
int was_used = TREE_USED (decl);
|
int was_used = TREE_USED (decl);
|
||||||
|
|
||||||
|
if (output_bytecode)
|
||||||
|
{
|
||||||
|
bc_expand_decl_init (decl);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
/* If this is a CONST_DECL, we don't have to generate any code, but
|
/* If this is a CONST_DECL, we don't have to generate any code, but
|
||||||
if DECL_INITIAL is a constant, call expand_expr to force TREE_CST_RTL
|
if DECL_INITIAL is a constant, call expand_expr to force TREE_CST_RTL
|
||||||
to be set while in the obstack containing the constant. If we don't
|
to be set while in the obstack containing the constant. If we don't
|
||||||
|
@ -3648,6 +3661,7 @@ expand_decl_init (decl)
|
||||||
using newlocalSI and set local variable, which is a pointer to the
|
using newlocalSI and set local variable, which is a pointer to the
|
||||||
storage. */
|
storage. */
|
||||||
|
|
||||||
|
static void
|
||||||
bc_expand_variable_local_init (decl)
|
bc_expand_variable_local_init (decl)
|
||||||
tree decl;
|
tree decl;
|
||||||
{
|
{
|
||||||
|
@ -3677,7 +3691,8 @@ bc_expand_variable_local_init (decl)
|
||||||
|
|
||||||
|
|
||||||
/* Emit code to initialize a declaration. */
|
/* Emit code to initialize a declaration. */
|
||||||
void
|
|
||||||
|
static void
|
||||||
bc_expand_decl_init (decl)
|
bc_expand_decl_init (decl)
|
||||||
tree decl;
|
tree decl;
|
||||||
{
|
{
|
||||||
|
@ -3956,7 +3971,8 @@ expand_start_case (exit_flag, expr, type, printname)
|
||||||
|
|
||||||
/* Enter a case statement. It is assumed that the caller has pushed
|
/* Enter a case statement. It is assumed that the caller has pushed
|
||||||
the current context onto the case stack. */
|
the current context onto the case stack. */
|
||||||
void
|
|
||||||
|
static void
|
||||||
bc_expand_start_case (thiscase, expr, type, printname)
|
bc_expand_start_case (thiscase, expr, type, printname)
|
||||||
struct nesting *thiscase;
|
struct nesting *thiscase;
|
||||||
tree expr;
|
tree expr;
|
||||||
|
@ -4269,7 +4285,7 @@ pushcase_range (value1, value2, converter, label, duplicate)
|
||||||
bytecode compiler, which was based on gcc 1.37. It should be
|
bytecode compiler, which was based on gcc 1.37. It should be
|
||||||
merged into pushcase. */
|
merged into pushcase. */
|
||||||
|
|
||||||
int
|
static int
|
||||||
bc_pushcase (value, label)
|
bc_pushcase (value, label)
|
||||||
tree value;
|
tree value;
|
||||||
tree label;
|
tree label;
|
||||||
|
@ -4445,7 +4461,8 @@ check_for_full_enumeration_handling (type)
|
||||||
/* Check that all enumeration literals are covered by the case
|
/* Check that all enumeration literals are covered by the case
|
||||||
expressions of a switch. Also warn if there are any cases
|
expressions of a switch. Also warn if there are any cases
|
||||||
that are not elements of the enumerated type. */
|
that are not elements of the enumerated type. */
|
||||||
void
|
|
||||||
|
static void
|
||||||
bc_check_for_full_enumeration_handling (type)
|
bc_check_for_full_enumeration_handling (type)
|
||||||
tree type;
|
tree type;
|
||||||
{
|
{
|
||||||
|
@ -4855,7 +4872,8 @@ expand_end_case (orig_index)
|
||||||
|
|
||||||
/* Terminate a case statement. EXPR is the original index
|
/* Terminate a case statement. EXPR is the original index
|
||||||
expression. */
|
expression. */
|
||||||
void
|
|
||||||
|
static void
|
||||||
bc_expand_end_case (expr)
|
bc_expand_end_case (expr)
|
||||||
tree expr;
|
tree expr;
|
||||||
{
|
{
|
||||||
|
@ -4947,6 +4965,7 @@ bc_expand_end_case (expr)
|
||||||
|
|
||||||
|
|
||||||
/* Return unique bytecode ID. */
|
/* Return unique bytecode ID. */
|
||||||
|
|
||||||
int
|
int
|
||||||
bc_new_uid ()
|
bc_new_uid ()
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue