projects
/
cparser
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
condeval is called jump threading now
[cparser]
/
ast2firm.c
diff --git
a/ast2firm.c
b/ast2firm.c
index
eb8dd33
..
ab7516b
100644
(file)
--- a/
ast2firm.c
+++ b/
ast2firm.c
@@
-4987,12
+4987,14
@@
static ir_node *get_break_label(void)
static void switch_statement_to_firm(switch_statement_t *statement)
{
static void switch_statement_to_firm(switch_statement_t *statement)
{
- ir_node *first_block =
get_cur_block()
;
+ ir_node *first_block =
NULL
;
dbg_info *dbgi = get_dbg_info(&statement->base.source_position);
ir_node *cond = NULL;
dbg_info *dbgi = get_dbg_info(&statement->base.source_position);
ir_node *cond = NULL;
- if (first_block != NULL) {
+
+ if (get_cur_block() != NULL) {
ir_node *expression = expression_to_firm(statement->expression);
cond = new_d_Cond(dbgi, expression);
ir_node *expression = expression_to_firm(statement->expression);
cond = new_d_Cond(dbgi, expression);
+ first_block = get_cur_block();
}
set_cur_block(NULL);
}
set_cur_block(NULL);
@@
-5569,7
+5571,7
@@
static void initialize_function_parameters(entity_t *entity)
if (entity->function.need_closure) {
/* add an extra parameter for the static link */
if (entity->function.need_closure) {
/* add an extra parameter for the static link */
- entity->function.static_link = new_r_Proj(
irg,
start_block, args, mode_P_data, 0);
+ entity->function.static_link = new_r_Proj(start_block, args, mode_P_data, 0);
++first_param_nr;
}
++first_param_nr;
}
@@
-5603,7
+5605,7
@@
static void initialize_function_parameters(entity_t *entity)
ir_mode *param_mode = get_type_mode(param_irtype);
long pn = n + first_param_nr;
ir_mode *param_mode = get_type_mode(param_irtype);
long pn = n + first_param_nr;
- ir_node *value = new_r_Proj(
irg,
start_block, args, param_mode, pn);
+ ir_node *value = new_r_Proj(start_block, args, param_mode, pn);
ir_mode *mode = get_ir_mode_storage(type);
value = create_conv(NULL, value, mode);
ir_mode *mode = get_ir_mode_storage(type);
value = create_conv(NULL, value, mode);