Commit 5d84b5a8 authored by Matthias Braun's avatar Matthias Braun
Browse files

do not use identifiers with underscore prefix

Underscore prefix is reserved by the C language standard.
parent 5fa09240
......@@ -85,7 +85,7 @@ void set_master_type_visited(ir_visited_t val)
ir_visited_t (get_master_type_visited)(void)
{
return _get_master_type_visited();
return get_master_type_visited_();
}
void inc_master_type_visited(void)
......@@ -161,22 +161,22 @@ void free_type(ir_type *tp)
void *(get_type_link)(const ir_type *tp)
{
return _get_type_link(tp);
return get_type_link_(tp);
}
void (set_type_link)(ir_type *tp, void *l)
{
_set_type_link(tp, l);
set_type_link_(tp, l);
}
const tp_op *(get_type_tpop)(const ir_type *tp)
{
return _get_type_tpop(tp);
return get_type_tpop_(tp);
}
ident *(get_type_tpop_nameid)(const ir_type *tp)
{
return _get_type_tpop_nameid(tp);
return get_type_tpop_nameid_(tp);
}
const char* get_type_tpop_name(const ir_type *tp)
......@@ -187,12 +187,12 @@ const char* get_type_tpop_name(const ir_type *tp)
tp_opcode (get_type_tpop_code)(const ir_type *tp)
{
return _get_type_tpop_code(tp);
return get_type_tpop_code_(tp);
}
ir_mode *(get_type_mode)(const ir_type *tp)
{
return _get_type_mode(tp);
return get_type_mode_(tp);
}
void set_type_mode(ir_type *tp, ir_mode *mode)
......@@ -217,7 +217,7 @@ long get_type_nr(const ir_type *tp)
unsigned (get_type_size_bytes)(const ir_type *tp)
{
return _get_type_size_bytes(tp);
return get_type_size_bytes_(tp);
}
ir_visibility get_type_visibility(const ir_type *tp)
......@@ -291,7 +291,7 @@ const char *get_type_state_name(ir_type_state s)
ir_type_state (get_type_state)(const ir_type *tp)
{
return _get_type_state(tp);
return get_type_state_(tp);
}
void set_type_state(ir_type *tp, ir_type_state state)
......@@ -338,37 +338,37 @@ void set_type_state(ir_type *tp, ir_type_state state)
ir_visited_t (get_type_visited)(const ir_type *tp)
{
return _get_type_visited(tp);
return get_type_visited_(tp);
}
void (set_type_visited)(ir_type *tp, ir_visited_t num)
{
_set_type_visited(tp, num);
set_type_visited_(tp, num);
}
void (mark_type_visited)(ir_type *tp)
{
_mark_type_visited(tp);
mark_type_visited_(tp);
}
int (type_visited)(const ir_type *tp)
{
return _type_visited(tp);
return type_visited_(tp);
}
type_dbg_info *(get_type_dbg_info)(const ir_type *tp)
{
return _get_type_dbg_info(tp);
return get_type_dbg_info_(tp);
}
void (set_type_dbg_info)(ir_type *tp, type_dbg_info *db)
{
_set_type_dbg_info(tp, db);
set_type_dbg_info_(tp, db);
}
int (is_type)(const void *thing)
{
return _is_type(thing);
return is_type_(thing);
}
static void compound_init(ir_type *type)
......@@ -473,7 +473,7 @@ static void add_class_member(ir_type *clss, ir_entity *member)
size_t (get_class_n_members)(const ir_type *clss)
{
return _get_class_n_members(clss);
return get_class_n_members_(clss);
}
size_t get_class_member_index(const ir_type *clss, ir_entity *mem)
......@@ -484,7 +484,7 @@ size_t get_class_member_index(const ir_type *clss, ir_entity *mem)
ir_entity *(get_class_member)(const ir_type *clss, size_t pos)
{
return _get_class_member(clss, pos);
return get_class_member_(clss, pos);
}
static void remove_class_member(ir_type *clss, ir_entity *member)
......@@ -609,7 +609,7 @@ void remove_class_supertype(ir_type *clss, ir_type *supertype)
int (is_Class_type)(const ir_type *clss)
{
return _is_class_type(clss);
return is_class_type_(clss);
}
void set_class_mode(ir_type *tp, ir_mode *mode)
......@@ -690,7 +690,7 @@ static void remove_struct_member(ir_type *strct, ir_entity *member)
int (is_Struct_type)(const ir_type *strct)
{
return _is_struct_type(strct);
return is_struct_type_(strct);
}
void set_struct_mode(ir_type *tp, ir_mode *mode)
......@@ -752,7 +752,7 @@ void free_method_attrs(ir_type *method)
size_t (get_method_n_params)(const ir_type *method)
{
return _get_method_n_params(method);
return get_method_n_params_(method);
}
ir_type *get_method_param_type(const ir_type *method, size_t pos)
......@@ -772,7 +772,7 @@ void set_method_param_type(ir_type *method, size_t pos, ir_type *tp)
size_t (get_method_n_ress)(const ir_type *method)
{
return _get_method_n_ress(method);
return get_method_n_ress_(method);
}
ir_type *get_method_res_type(const ir_type *method, size_t pos)
......@@ -816,28 +816,28 @@ void set_method_variadicity(ir_type *method, ir_variadicity vari)
mtp_additional_properties (get_method_additional_properties)(const ir_type *method)
{
return _get_method_additional_properties(method);
return get_method_additional_properties_(method);
}
void (set_method_additional_properties)(ir_type *method, mtp_additional_properties mask)
{
_set_method_additional_properties(method, mask);
set_method_additional_properties_(method, mask);
}
void (add_method_additional_properties)(ir_type *method,
mtp_additional_properties flag)
{
_add_method_additional_properties(method, flag);
add_method_additional_properties_(method, flag);
}
unsigned (get_method_calling_convention)(const ir_type *method)
{
return _get_method_calling_convention(method);
return get_method_calling_convention_(method);
}
void (set_method_calling_convention)(ir_type *method, unsigned cc_mask)
{
_set_method_calling_convention(method, cc_mask);
set_method_calling_convention_(method, cc_mask);
}
unsigned get_method_n_regparams(ir_type *method)
......@@ -858,7 +858,7 @@ void set_method_n_regparams(ir_type *method, unsigned n_regs)
int (is_Method_type)(const ir_type *method)
{
return _is_method_type(method);
return is_method_type_(method);
}
ir_type *new_type_union(ident *name)
......@@ -928,7 +928,7 @@ static void remove_union_member(ir_type *uni, ir_entity *member)
int (is_Union_type)(const ir_type *uni)
{
return _is_union_type(uni);
return is_union_type_(uni);
}
ir_type *new_type_segment(ident *const name, type_flags const flags)
......@@ -1038,7 +1038,7 @@ void set_array_variable_size(ir_type *array, int flag)
int (is_Array_type)(const ir_type *array)
{
return _is_array_type(array);
return is_array_type_(array);
}
......@@ -1067,7 +1067,7 @@ ir_type *get_pointer_points_to_type(const ir_type *pointer)
int (is_Pointer_type)(const ir_type *pointer)
{
return _is_pointer_type(pointer);
return is_pointer_type_(pointer);
}
void set_pointer_mode(ir_type *tp, ir_mode *mode)
......@@ -1100,7 +1100,7 @@ ir_type *new_type_primitive(ir_mode *mode)
int (is_Primitive_type)(const ir_type *primitive)
{
return _is_primitive_type(primitive);
return is_primitive_type_(primitive);
}
void set_primitive_mode(ir_type *tp, ir_mode *mode)
......@@ -1116,7 +1116,7 @@ void set_primitive_mode(ir_type *tp, ir_mode *mode)
int (is_atomic_type)(const ir_type *tp)
{
return _is_atomic_type(tp);
return is_atomic_type_(tp);
}
size_t get_compound_n_members(const ir_type *tp)
......
......@@ -19,39 +19,39 @@
#include "array.h"
#define get_master_type_visited() _get_master_type_visited()
#define get_type_link(tp) _get_type_link(tp)
#define set_type_link(tp, l) _set_type_link(tp, l)
#define get_type_tpop(tp) _get_type_tpop(tp)
#define get_type_tpop_nameid(tp) _get_type_tpop_nameid(tp)
#define get_type_tpop_code(tp) _get_type_tpop_code(tp)
#define get_type_mode(tp) _get_type_mode(tp)
#define get_type_size_bytes(tp) _get_type_size_bytes(tp)
#define get_type_state(tp) _get_type_state(tp)
#define get_type_visited(tp) _get_type_visited(tp)
#define set_type_visited(tp, num) _set_type_visited(tp, num)
#define mark_type_visited(tp) _mark_type_visited(tp)
#define type_visited(tp) _type_visited(tp)
#define get_type_dbg_info(tp) _get_type_dbg_info(tp)
#define set_type_dbg_info(tp, db) _set_type_dbg_info(tp, db)
#define is_type(thing) _is_type(thing)
#define is_Class_type(clss) _is_class_type(clss)
#define get_class_n_members(clss) _get_class_n_members(clss)
#define get_class_member(clss, pos) _get_class_member(clss, pos)
#define is_Struct_type(strct) _is_struct_type(strct)
#define is_Method_type(method) _is_method_type(method)
#define is_Union_type(uni) _is_union_type(uni)
#define is_Array_type(array) _is_array_type(array)
#define is_Pointer_type(pointer) _is_pointer_type(pointer)
#define is_Primitive_type(primitive) _is_primitive_type(primitive)
#define is_atomic_type(tp) _is_atomic_type(tp)
#define get_method_n_params(method) _get_method_n_params(method)
#define get_method_n_ress(method) _get_method_n_ress(method)
#define get_method_additional_properties(method) _get_method_additional_properties(method)
#define set_method_additional_properties(method, mask) _set_method_additional_properties(method, mask)
#define add_method_additional_properties(method, flag) _add_method_additional_properties(method, flag)
#define get_method_calling_convention(method) _get_method_calling_convention(method)
#define set_method_calling_convention(method, cc_mask) _set_method_calling_convention(method, cc_mask)
#define get_master_type_visited() get_master_type_visited_()
#define get_type_link(tp) get_type_link_(tp)
#define set_type_link(tp, l) set_type_link_(tp, l)
#define get_type_tpop(tp) get_type_tpop_(tp)
#define get_type_tpop_nameid(tp) get_type_tpop_nameid_(tp)
#define get_type_tpop_code(tp) get_type_tpop_code_(tp)
#define get_type_mode(tp) get_type_mode_(tp)
#define get_type_size_bytes(tp) get_type_size_bytes_(tp)
#define get_type_state(tp) get_type_state_(tp)
#define get_type_visited(tp) get_type_visited_(tp)
#define set_type_visited(tp, num) set_type_visited_(tp, num)
#define mark_type_visited(tp) mark_type_visited_(tp)
#define type_visited(tp) type_visited_(tp)
#define get_type_dbg_info(tp) get_type_dbg_info_(tp)
#define set_type_dbg_info(tp, db) set_type_dbg_info_(tp, db)
#define is_type(thing) is_type_(thing)
#define is_Class_type(clss) is_class_type_(clss)
#define get_class_n_members(clss) get_class_n_members_(clss)
#define get_class_member(clss, pos) get_class_member_(clss, pos)
#define is_Struct_type(strct) is_struct_type_(strct)
#define is_Method_type(method) is_method_type_(method)
#define is_Union_type(uni) is_union_type_(uni)
#define is_Array_type(array) is_array_type_(array)
#define is_Pointer_type(pointer) is_pointer_type_(pointer)
#define is_Primitive_type(primitive) is_primitive_type_(primitive)
#define is_atomic_type(tp) is_atomic_type_(tp)
#define get_method_n_params(method) get_method_n_params_(method)
#define get_method_n_ress(method) get_method_n_ress_(method)
#define get_method_additional_properties(method) get_method_additional_properties_(method)
#define set_method_additional_properties(method, mask) set_method_additional_properties_(method, mask)
#define add_method_additional_properties(method, flag) add_method_additional_properties_(method, flag)
#define get_method_calling_convention(method) get_method_calling_convention_(method)
#define set_method_calling_convention(method, cc_mask) set_method_calling_convention_(method, cc_mask)
/** Compound type attributes. */
typedef struct {
......@@ -196,7 +196,7 @@ ir_type *clone_type_method(ir_type *tp);
extern ir_visited_t firm_type_visited;
static inline ir_visited_t _get_master_type_visited(void)
static inline ir_visited_t get_master_type_visited_(void)
{
return firm_type_visited;
}
......@@ -217,187 +217,187 @@ static inline void set_higher_type(ir_type *tp, ir_type *higher_type)
tp->higher_type = higher_type;
}
static inline void *_get_type_link(const ir_type *tp)
static inline void *get_type_link_(const ir_type *tp)
{
assert(tp->kind == k_type);
return(tp -> link);
}
static inline void _set_type_link(ir_type *tp, void *l)
static inline void set_type_link_(ir_type *tp, void *l)
{
assert(tp->kind == k_type);
tp -> link = l;
}
static inline const tp_op *_get_type_tpop(const ir_type *tp)
static inline const tp_op *get_type_tpop_(const ir_type *tp)
{
assert(tp->kind == k_type);
return tp->type_op;
}
static inline ident *_get_type_tpop_nameid(const ir_type *tp)
static inline ident *get_type_tpop_nameid_(const ir_type *tp)
{
assert(tp->kind == k_type);
return get_tpop_ident(tp->type_op);
}
static inline tp_opcode _get_type_tpop_code(const ir_type *tp)
static inline tp_opcode get_type_tpop_code_(const ir_type *tp)
{
assert(tp->kind == k_type);
return get_tpop_code(tp->type_op);
}
static inline ir_mode *_get_type_mode(const ir_type *tp)
static inline ir_mode *get_type_mode_(const ir_type *tp)
{
assert(tp->kind == k_type);
return tp->mode;
}
static inline unsigned _get_type_size_bytes(const ir_type *tp)
static inline unsigned get_type_size_bytes_(const ir_type *tp)
{
assert(tp->kind == k_type);
return tp->size;
}
static inline ir_type_state _get_type_state(const ir_type *tp)
static inline ir_type_state get_type_state_(const ir_type *tp)
{
assert(tp->kind == k_type);
return tp->flags & tf_layout_fixed ? layout_fixed : layout_undefined;
}
static inline ir_visited_t _get_type_visited(const ir_type *tp)
static inline ir_visited_t get_type_visited_(const ir_type *tp)
{
assert(tp->kind == k_type);
return tp->visit;
}
static inline void _set_type_visited(ir_type *tp, ir_visited_t num)
static inline void set_type_visited_(ir_type *tp, ir_visited_t num)
{
assert(tp->kind == k_type);
tp->visit = num;
}
static inline void _mark_type_visited(ir_type *tp)
static inline void mark_type_visited_(ir_type *tp)
{
assert(tp->kind == k_type);
assert(tp->visit < firm_type_visited);
tp->visit = firm_type_visited;
}
static inline int _type_visited(const ir_type *tp)
static inline int type_visited_(const ir_type *tp)
{
assert(tp->kind == k_type);
return tp->visit >= firm_type_visited;
}
static inline type_dbg_info *_get_type_dbg_info(const ir_type *tp)
static inline type_dbg_info *get_type_dbg_info_(const ir_type *tp)
{
return tp->dbi;
}
static inline void _set_type_dbg_info(ir_type *tp, type_dbg_info *db)
static inline void set_type_dbg_info_(ir_type *tp, type_dbg_info *db)
{
tp->dbi = db;
}
static inline int _is_type(const void *thing)
static inline int is_type_(const void *thing)
{
return get_kind(thing) == k_type;
}
static inline int _is_class_type(const ir_type *clss)
static inline int is_class_type_(const ir_type *clss)
{
return clss->type_op == type_class;
}
static inline size_t _get_class_n_members(const ir_type *clss)
static inline size_t get_class_n_members_(const ir_type *clss)
{
assert(clss->type_op == type_class);
return ARR_LEN(clss->attr.ca.members);
}
static inline ir_entity *_get_class_member(const ir_type *clss, size_t pos)
static inline ir_entity *get_class_member_(const ir_type *clss, size_t pos)
{
assert(clss->type_op == type_class);
assert(pos < _get_class_n_members(clss));
assert(pos < get_class_n_members_(clss));
return clss->attr.ca.members[pos];
}
static inline int _is_struct_type(const ir_type *strct)
static inline int is_struct_type_(const ir_type *strct)
{
return (strct->type_op == type_struct);
}
static inline int _is_method_type(const ir_type *method)
static inline int is_method_type_(const ir_type *method)
{
return (method->type_op == type_method);
}
static inline int _is_union_type(const ir_type *uni)
static inline int is_union_type_(const ir_type *uni)
{
return (uni->type_op == type_union);
}
static inline int _is_array_type(const ir_type *array)
static inline int is_array_type_(const ir_type *array)
{
return (array->type_op == type_array);
}
static inline int _is_pointer_type(const ir_type *pointer)
static inline int is_pointer_type_(const ir_type *pointer)
{
return (pointer->type_op == type_pointer);
}
/** Returns true if a type is a primitive type. */
static inline int _is_primitive_type(const ir_type *primitive)
static inline int is_primitive_type_(const ir_type *primitive)
{
assert(primitive->kind == k_type);
return (primitive->type_op == type_primitive);
}
static inline int _is_atomic_type(const ir_type *tp)
static inline int is_atomic_type_(const ir_type *tp)
{
assert(tp->kind == k_type);
return _is_primitive_type(tp) || _is_pointer_type(tp);
return is_Primitive_type(tp) || is_Pointer_type(tp);
}
static inline size_t _get_method_n_params(const ir_type *method)
static inline size_t get_method_n_params_(const ir_type *method)
{
assert(method->type_op == type_method);
return method->attr.ma.n_params;
}
static inline size_t _get_method_n_ress(const ir_type *method)
static inline size_t get_method_n_ress_(const ir_type *method)
{
assert(method->type_op == type_method);
return method->attr.ma.n_res;
}
static inline mtp_additional_properties _get_method_additional_properties(const ir_type *method)
static inline mtp_additional_properties get_method_additional_properties_(const ir_type *method)
{
assert(method->type_op == type_method);
return method->attr.ma.properties;
}
static inline void _set_method_additional_properties(ir_type *method, mtp_additional_properties properties)
static inline void set_method_additional_properties_(ir_type *method, mtp_additional_properties properties)
{
assert(method->type_op == type_method);
method->attr.ma.properties = properties;
}
static inline void _add_method_additional_properties(ir_type *method, mtp_additional_properties properties)
static inline void add_method_additional_properties_(ir_type *method, mtp_additional_properties properties)
{
assert(method->type_op == type_method);
method->attr.ma.properties |= properties;
}
static inline unsigned _get_method_calling_convention(const ir_type *method)
static inline unsigned get_method_calling_convention_(const ir_type *method)
{
assert(method->type_op == type_method);
return method->attr.ma.irg_calling_conv;
}
static inline void _set_method_calling_convention(ir_type *method, unsigned cc_mask)
static inline void set_method_calling_convention_(ir_type *method, unsigned cc_mask)
{
assert(method->type_op == type_method);
method->attr.ma.irg_calling_conv = cc_mask;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment