void *link; /**< holds temporary data - like in irnode_t.h */
struct dbg_info* dbi; /**< A pointer to information for debug support. */
+ /* ------------- fields for analyses ---------------*/
+ ir_node **allocations; /**< array of all Alloc nodes with this type
+ @@@ Should not be in here, hash table! */
+
#ifdef DEBUG_libfirm
int nr; /**< a unique node number for each node to make output
readable. */
static INLINE int
__get_type_size_bytes(type *tp) {
int size = __get_type_size_bits(tp);
+ if (size < 0)
+ return -1;
if ((size & 7) != 0) {
assert(0 && "cannot take byte size of this type");
return -1;
static INLINE int
__get_class_n_members (type *clss) {
assert(clss && (clss->type_op == type_class));
- return (ARR_LEN (clss->attr.ca.members))-1;
+ return (ARR_LEN (clss->attr.ca.members));
}
static INLINE entity *
__get_class_member (type *clss, int pos) {
assert(clss && (clss->type_op == type_class));
assert(pos >= 0 && pos < get_class_n_members(clss));
- return clss->attr.ca.members[pos+1];
+ return clss->attr.ca.members[pos];
}
static INLINE int