From beba5255fff4d41a34d91adcfccd047724c23002 Mon Sep 17 00:00:00 2001 From: =?utf8?q?G=C3=B6tz=20Lindenmaier?= Date: Tue, 3 Dec 2002 12:33:52 +0000 Subject: [PATCH] Added assertions to enforce proper use of set_value, set_store [r528] --- ir/ir/ircons.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ir/ir/ircons.c b/ir/ir/ircons.c index fdb83ddd4..0d04c8561 100644 --- a/ir/ir/ircons.c +++ b/ir/ir/ircons.c @@ -2164,6 +2164,8 @@ INLINE void set_value (int pos, ir_node *value) { assert(get_irg_phase_state (current_ir_graph) == phase_building); + assert(!get_Block_matured(current_ir_graph->current_block)); + assert(pos+1 < current_ir_graph->n_loc); current_ir_graph->current_block->attr.block.graph_arr[pos + 1] = value; } @@ -2181,8 +2183,9 @@ get_store (void) INLINE void set_store (ir_node *store) { - assert(get_irg_phase_state (current_ir_graph) == phase_building); /* GL: one could call set_value instead */ + assert(get_irg_phase_state (current_ir_graph) == phase_building); + assert(!get_Block_matured(current_ir_graph->current_block)); current_ir_graph->current_block->attr.block.graph_arr[0] = store; } -- 2.20.1