assert(addr && "constant entity without value");
if (get_irn_op(addr) == op_Const) {
- impl_meth = tarval_to_entity(get_Const_tarval(addr));
+ impl_meth = get_tarval_entity(get_Const_tarval(addr));
} else if ((get_irn_op(addr) == op_SymConst) &&
- (get_SymConst_kind(addr) == symconst_addr_ent)) {
+ (get_SymConst_kind(addr) == symconst_addr_ent)) {
impl_meth = get_SymConst_entity(addr);
} else {
assert(0 && "Complex constant values not supported -- address of method should be straight constant!");
case iro_Const: {
/* interne Methode */
- entity * ent = tarval_to_entity(get_Const_tarval(node));
+ entity * ent = get_tarval_entity(get_Const_tarval(node));
assert(ent && is_method_type(get_entity_type(ent)));
if (get_entity_visibility(ent) != visibility_external_allocated) {
if (!get_entity_irg(ent)) {
case iro_Const: {
tarval * val = get_Const_tarval(node);
if (tarval_is_entity(val)) { /* filter null pointer */
- entity * ent = tarval_to_entity(val);
+ entity * ent = get_tarval_entity(val);
if (is_method_type(get_entity_type(ent))) {
eset_insert(set, ent);
}
--- /dev/null
+/*
+ * Project: libFIRM
+ * File name: ir/ir/old_fctnames.h
+ * Purpose: Some makros supporting old function names.
+ * Author: Goetz Lindenmaier
+ * Modified by:
+ * Created:
+ * CVS-ID: $Id$
+ * Copyright: (c) 1998-2003 Universität Karlsruhe
+ * Licence: This file protected by GPL - GNU GENERAL PUBLIC LICENSE.
+ */
+
+
+#ifndef __OLD_FCTNAMES_H__
+#define __OLD_FCTNAMES_H__
+
+/* irgraph */
+#define get_irg_params get_irg_n_locs
+#define get_irg_n_loc get_irg_n_locs
+#define set_irg_params set_irg_n_loc
+
+/* irnode.h */
+#define get_Return_n_res get_Return_n_ress
+#define get_Sel_n_index get_Sel_n_indexs
+#define get_SymConst_ptrinfo get_SymConst_name
+#define set_SymConst_ptrinfo set_SymConst_name
+
+/* irmode.h */
+#define get_ident_of_mode get_mode_ident
+#define get_size_of_mode get_mode_size
+#define get_ld_align_of_mode get_mode_ld_align
+#define get_min_of_mode get_mode_min
+#define get_max_of_mode get_mode_max
+#define get_null_of_mode get_mode_null
+#define get_fsigned_of_mode get_mode_fsigned
+#define get_ffloat_of_mode get_mode_ffloat
+#define get_mode_size(X) { assert(get_mode_size_bytes(X) != -1); get_mode_size_bytes(X); }
+
+/* type.h */
+#define get_type_nameid(_t_) get_type_ident(_t_)
+#define set_type_nameid(_t_,_i_) set_type_ident(_t_,_i_)
+#define get_class_n_member get_class_n_members
+#define get_class_n_subtype get_class_n_subtypes
+#define get_class_n_supertype get_class_n_supertypes
+#define get_struct_n_member get_struct_n_members
+
+#define get_method_n_res(X) get_method_n_ress(X)
+
+/* tv.h */
+#define tarval_from_long(X, Y) new_tarval_from_long(Y, X)
+#define tarval_P_from_entity(X) new_tarval_from_entity(X, mode_P_mach)
+#define tarval_to_entity(X) get_tarval_entity(X)
+
+
+/* ident.h */
+#define id_to_strlen get_id_strlen
+#define id_to_str get_id_str
+
+#endif
*/
ident *new_id_from_str (const char *str);
-/**
- * Store a string and create an ident.
+/** Store a string and create an ident.
*
- * Stores a string in the ident module and returns a handle for the string.
- *
- * Copies the string. This version can take non-zero-terminated strings
+ * Stores a string in the ident module and returns a handle for the string.
+ * Copies the string. This version takes non-zero-terminated strings.
*
* @param str - the string (or whatever) which shall be stored
* @param len - the length of the data in bytes
*
* @return id - a handle for the generated ident
*
- * @see new_get_id_str(), get_id_strlen()
+ * @see new_id_from_str(), get_id_strlen()
*/
ident *id_from_str (const char *str, int len);
*
* @return cp - a string
*
- * @see new_get_id_str(), id_from_str(), get_id_strlen()
+ * @see new_id_from_str(), id_from_str(), get_id_strlen()
*/
const char *get_id_str (ident *id);
-#define id_to_str get_id_str
/**
* Returns the length of the string represented by an ident.
*
* @return len - the length of the string
*
- * @see new_get_id_str(), id_from_str(), get_id_str()
+ * @see new_id_from_str(), id_from_str(), get_id_str()
*/
int get_id_strlen(ident *id);
-#define id_to_strlen get_id_strlen
/**
* Returns true if prefix is a prefix of an ident.
*
* @param prefix - the prefix
* @param id - the ident
*
- * @see new_get_id_str(), id_from_str(), get_id_str(), id_is_prefix()
+ * @see new_id_from_str(), id_from_str(), get_id_str(), id_is_prefix()
*/
int id_is_prefix (ident *prefix, ident *id);
* @param suffix - the suffix
* @param id - the ident
*
- * @see new_get_id_str(), id_from_str(), get_id_str(), id_is_prefix()
+ * @see new_id_from_str(), id_from_str(), get_id_str(), id_is_prefix()
*/
int id_is_suffix (ident *suffix, ident *id);
* @param infix - the infix
* @param id - the ident to search in
*
- * @see new_get_id_str(), id_from_str(), get_id_str(), id_is_prefix()
+ * @see new_id_from_str(), id_from_str(), get_id_str(), id_is_prefix()
*/
/* int id_contains(ident *infix, ident *id); */
* @param id - the ident
* @param c - the character
*
- * @see new_get_id_str(), id_from_str(), get_id_str()
+ * @see new_id_from_str(), id_from_str(), get_id_str()
*/
int id_contains_char (ident *id, char c);
* @param id - The ident to be printed.
*
* @return
- * number of btes written
+ * number of bytes written
*
- * @see new_get_id_str(), id_from_str(), get_id_str(), id_is_prefix(), fprint_id()
+ * @see new_id_from_str(), id_from_str(), get_id_str(), id_is_prefix(), fprint_id()
*/
int print_id (ident *id);
* @return
* number of btes written
*
- * @see new_get_id_str(), id_from_str(), get_id_str(), id_is_prefix(), print_id()
+ * @see new_id_from_str(), id_from_str(), get_id_str(), id_is_prefix(), print_id()
*/
int fprint_id (FILE *F, ident *id);