X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=ir%2Fst%2Fexc.h;h=826b270138a6d3d96e3dc351566a4de427e87f8f;hb=395c1f470c010aaef09345d08204e8780df6ee0b;hp=fa7b496cd13372ef83f5121395843c27464f501f;hpb=627e17872263df1abe20244ca5a4199ae51970ad;p=libfirm diff --git a/ir/st/exc.h b/ir/st/exc.h index fa7b496cd..826b27013 100644 --- a/ir/st/exc.h +++ b/ir/st/exc.h @@ -1,19 +1,23 @@ -/* Copyright (c) 2002 by Universität Karlsruhe (TH). All Rights Reserved */ -// -// Time-stamp: <02/03/22 17:03:05 liekweg> -// +/* + * Project: libFIRM + * File name: ir/st/exc.h + * Purpose: Helper functions for jack exceptions. + * Author: Florian Liekweg + * Modified by: + * Created: 4.3.2002 + * CVS-ID: $Id$ + * Copyright: (c) 2002-2003 Universität Karlsruhe + * Licence: This file protected by GPL - GNU GENERAL PUBLIC LICENSE. + */ -/*** + +/** NAME exc PURPOSE Helper functions for exceptions - NOTES + S not quite complete - HISTORY - liekweg - Mar 4, 2002: Created. - CVS: - $Id$ ***/ # include "irnode.h" @@ -25,24 +29,30 @@ # include "irop.h" # include "irouts.h" -# include +#include + +#ifdef __cplusplus + extern "C" { +#endif typedef enum { - exc_invalid, /* not yet computed */ + exc_invalid = 0, /* not yet computed */ exc_normal, /* normal CF */ - // must push a new exc contrext at entry of block: + /* must push a new exc context at entry of block: */ exc_region, /* region entry */ - // must pop current exc contrext at exit of block + /* must pop current exc context at EXIT of block */ exc_exit, /* region exit */ - // must pop current exc contrext at entry of block + /* must pop current exc context at entry of block */ exc_handler, /* handler entry */ exc_max /* maximum value of enum for 'bounds checking' */ } exc_t; + + const char *exc_to_string (exc_t); bool is_handler_entry (ir_graph*, ir_node*); @@ -50,5 +60,21 @@ bool is_region_entry (ir_graph*, ir_node*); bool is_handler_block (ir_graph*, ir_node*); bool is_cont_entry (ir_graph*, ir_node*); +void set_Block_exc (ir_node*, exc_t); +exc_t get_Block_exc (ir_node*); + +void set_Node_exc (ir_node*, exc_t); +exc_t get_Node_exc (ir_node*); + +/* handler handling @@@ ajacs specific -- not supported */ +void set_Block_handler (ir_node*, ir_node*); +ir_node* get_Block_handler (ir_node*); + +void set_Node_handler (ir_node*, ir_node*); +ir_node* get_Node_handler (ir_node*); + +#ifdef __cplusplus +} +#endif # endif /* def _EXC_H_ */