projects
/
libfirm
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
15d0489
)
change firm API so the firm_parameter_t struct becomes completely optional and deprec...
author
Matthias Braun
<matze@braunis.de>
Tue, 25 May 2010 13:42:23 +0000
(13:42 +0000)
committer
Matthias Braun
<matze@braunis.de>
Tue, 25 May 2010 13:42:23 +0000
(13:42 +0000)
[r27584]
include/libfirm/firm_common.h
patch
|
blob
|
history
include/libfirm/firmstat.h
patch
|
blob
|
history
include/libfirm/ircons.h
patch
|
blob
|
history
include/libfirm/typerep.h
patch
|
blob
|
history
ir/common/firm.c
patch
|
blob
|
history
ir/ir/ircons.c
patch
|
blob
|
history
ir/ir/ircons_t.h
patch
|
blob
|
history
ir/tr/type.c
patch
|
blob
|
history
ir/tr/type_t.h
patch
|
blob
|
history
diff --git
a/include/libfirm/firm_common.h
b/include/libfirm/firm_common.h
index
668ac74
..
28b578b
100644
(file)
--- a/
include/libfirm/firm_common.h
+++ b/
include/libfirm/firm_common.h
@@
-68,7
+68,10
@@
struct _firm_parameter_t {
ident_if_t *id_if;
/**
ident_if_t *id_if;
/**
- * The default calling convention.
+ * dummy parameter
+ * (this used to hold a default calling convention, but this concept is no
+ * more. You should always set the calling convention manually after
+ * creating the method entity if you need something else)
*/
unsigned cc_mask;
*/
unsigned cc_mask;
diff --git
a/include/libfirm/firmstat.h
b/include/libfirm/firmstat.h
index
0ac038e
..
54a49ef
100644
(file)
--- a/
include/libfirm/firmstat.h
+++ b/
include/libfirm/firmstat.h
@@
-188,6
+188,7
@@
FIRM_API ir_prog_pass_t *stat_dump_snapshot_pass(
/**
* initialize the statistics module.
/**
* initialize the statistics module.
+ * Should be called directly after ir_init
*
* @param enable_options a bitmask containing the statistic options
*/
*
* @param enable_options a bitmask containing the statistic options
*/
diff --git
a/include/libfirm/ircons.h
b/include/libfirm/ircons.h
index
2f35b09
..
1036d81
100644
(file)
--- a/
include/libfirm/ircons.h
+++ b/
include/libfirm/ircons.h
@@
-4609,6
+4609,9
@@
FIRM_API ir_type *get_cur_frame_type(void);
* e.g., that no more subtypes will be added. */
FIRM_API void irp_finalize_cons(void);
* e.g., that no more subtypes will be added. */
FIRM_API void irp_finalize_cons(void);
+FIRM_API void ir_set_uninitialized_local_variable_func(
+ uninitialized_local_variable_func_t *func);
+
#include "end.h"
#endif
#include "end.h"
#endif
diff --git
a/include/libfirm/typerep.h
b/include/libfirm/typerep.h
index
3b8de53
..
782c95f
100644
(file)
--- a/
include/libfirm/typerep.h
+++ b/
include/libfirm/typerep.h
@@
-1740,9
+1740,6
@@
typedef enum {
/** fastcall calling convention */
#define cc_fastcall_set (cc_reg_param|cc_callee_clear_stk)
/** fastcall calling convention */
#define cc_fastcall_set (cc_reg_param|cc_callee_clear_stk)
-/** Returns the default calling convention for method types. */
-FIRM_API unsigned get_default_cc_mask(void);
-
/**
* check for the CDECL calling convention
*/
/**
* check for the CDECL calling convention
*/
diff --git
a/ir/common/firm.c
b/ir/common/firm.c
index
9756939
..
e6d3196
100644
(file)
--- a/
ir/common/firm.c
+++ b/
ir/common/firm.c
@@
-111,7
+111,7
@@
void ir_init(const firm_parameter_t *param)
/* initialize all op codes an irnode can consist of */
init_op();
/* called once for each run of this library */
/* initialize all op codes an irnode can consist of */
init_op();
/* called once for each run of this library */
-
firm_init_cons
(def_params.initialize_local_func);
+
ir_set_uninitialized_local_variable_func
(def_params.initialize_local_func);
/* initialize reassociation */
firm_init_reassociation();
/* initialize function call optimization */
/* initialize reassociation */
firm_init_reassociation();
/* initialize function call optimization */
@@
-124,7
+124,7
@@
void ir_init(const firm_parameter_t *param)
later. */
init_irprog_2();
/* Initialize the type module and construct some idents needed. */
later. */
init_irprog_2();
/* Initialize the type module and construct some idents needed. */
- firm_init_type(
def_params.cc_mask
);
+ firm_init_type();
/* initialize the entity module */
firm_init_entity();
/* class cast optimization */
/* initialize the entity module */
firm_init_entity();
/* class cast optimization */
diff --git
a/ir/ir/ircons.c
b/ir/ir/ircons.c
index
55937c7
..
852196c
100644
(file)
--- a/
ir/ir/ircons.c
+++ b/
ir/ir/ircons.c
@@
-1476,10
+1476,11
@@
ir_type *get_cur_frame_type(void)
/* initialize */
/* call once for each run of the library */
/* initialize */
/* call once for each run of the library */
-void firm_init_cons(uninitialized_local_variable_func_t *func)
+void ir_set_uninitialized_local_variable_func(
+ uninitialized_local_variable_func_t *func)
{
default_initialize_local_variable = func;
{
default_initialize_local_variable = func;
-}
/* firm_init_cons */
+}
void irp_finalize_cons(void)
{
void irp_finalize_cons(void)
{
diff --git
a/ir/ir/ircons_t.h
b/ir/ir/ircons_t.h
index
46066cc
..
99e5668
100644
(file)
--- a/
ir/ir/ircons_t.h
+++ b/
ir/ir/ircons_t.h
@@
-30,16
+30,6
@@
#include "ircons.h"
#include "irgraph_t.h"
#include "ircons.h"
#include "irgraph_t.h"
-/**
- * Initializes the graph construction.
- *
- * @param func callback that is called if a uninitialized
- * variable is detected
- *
- * @see uninitialized_local_variable_func_t
- */
-void firm_init_cons(uninitialized_local_variable_func_t *func);
-
/**
* Creates a new Anchor node.
*/
/**
* Creates a new Anchor node.
*/
diff --git
a/ir/tr/type.c
b/ir/tr/type.c
index
7553fb6
..
30a9bf4
100644
(file)
--- a/
ir/tr/type.c
+++ b/
ir/tr/type.c
@@
-85,17
+85,8
@@
ir_type *get_unknown_type(void)
static ident *value_params_suffix = NULL;
static ident *value_ress_suffix = NULL;
static ident *value_params_suffix = NULL;
static ident *value_ress_suffix = NULL;
-/** The default calling convention for method types. */
-static unsigned default_cc_mask;
-
-unsigned get_default_cc_mask(void)
-{
- return default_cc_mask;
-}
-
-void firm_init_type(unsigned def_cc_mask)
+void firm_init_type(void)
{
{
- default_cc_mask = def_cc_mask;
value_params_suffix = new_id_from_str(VALUE_PARAMS_SUFFIX);
value_ress_suffix = new_id_from_str(VALUE_RESS_SUFFIX);
value_params_suffix = new_id_from_str(VALUE_PARAMS_SUFFIX);
value_ress_suffix = new_id_from_str(VALUE_RESS_SUFFIX);
@@
-1215,7
+1206,6
@@
ir_type *new_d_type_method(int n_param, int n_res, type_dbg_info *db)
res->attr.ma.variadicity = variadicity_non_variadic;
res->attr.ma.first_variadic_param = -1;
res->attr.ma.additional_properties = mtp_no_property;
res->attr.ma.variadicity = variadicity_non_variadic;
res->attr.ma.first_variadic_param = -1;
res->attr.ma.additional_properties = mtp_no_property;
- res->attr.ma.irg_calling_conv = default_cc_mask;
hook_new_type(res);
return res;
}
hook_new_type(res);
return res;
}
diff --git
a/ir/tr/type_t.h
b/ir/tr/type_t.h
index
8dad4d7
..
7f9c33f
100644
(file)
--- a/
ir/tr/type_t.h
+++ b/
ir/tr/type_t.h
@@
-283,10
+283,8
@@
void remove_compound_member(ir_type *compound, ir_entity *entity);
/**
* Initialize the type module.
/**
* Initialize the type module.
- *
- * @param default_cc_mask default calling conventions for methods
*/
*/
-void firm_init_type(
unsigned default_cc_mask
);
+void firm_init_type(
void
);
/** Clone an existing method type.
*
/** Clone an existing method type.
*