double get_type_estimated_mem_consumption_bytes(type *tp) {
assert(0);
+ return 0.0;
}
int get_type_estimated_n_fields(type *tp) {
/* ------------------------------------------------------------------------- */
static void acc_temp (type *tp) {
- assert(is_Class_type(tp));
+ int i, n_subtypes, n_members;
+ double inst;
- int i, n_subtypes = get_class_n_subtypes(tp);
+ assert(is_Class_type(tp));
/* Recursive descend. */
+ n_subtypes = get_class_n_subtypes(tp);
for (i = 0; i < n_subtypes; ++i) {
type *stp = get_class_subtype(tp, i);
if (type_not_visited(stp)) {
}
/* Deal with entity numbers. */
- int n_members = get_class_n_members(tp);
+ n_members = get_class_n_members(tp);
for (i = 0; i < n_members; ++i) {
entity *mem = get_class_member(tp, i);
double acc_loads = get_entity_estimated_n_loads (mem);
}
/* Deal with type numbers. */
- double inst = get_type_estimated_n_instances(tp);
+ inst = get_type_estimated_n_instances(tp);
for (i = 0; i < n_subtypes; ++i) {
type *stp = get_class_subtype(tp, i);
inst += get_type_acc_estimated_n_instances(stp);
int j, n_subtypes = get_class_n_subtypes(tp);
int has_unmarked_subtype = false;
for (j = 0; j < n_subtypes && !has_unmarked_subtype; ++j) {
- type *stp = get_class_subtype(tp, j);
- if (type_not_visited(stp)) has_unmarked_subtype = true;
+ type *stp = get_class_subtype(tp, j);
+ if (type_not_visited(stp)) has_unmarked_subtype = true;
}
if (!has_unmarked_subtype)
- acc_temp(tp);
+ acc_temp(tp);
}
}