self->htfields = util_htnew(IR_HT_SIZE);
self->htfunctions = util_htnew(IR_HT_SIZE);
+ self->max_locals = 0;
+
self->str_immediate = 0;
self->name = NULL;
if (!ir_builder_set_name(self, modulename)) {
if (!ir_builder_gen_global(self, self->globals[i], false)) {
return false;
}
+ if (self->globals[i]->vtype == TYPE_FUNCTION) {
+ ir_function *func = self->globals[i]->constval.vfunc;
+ if (func && self->max_locals < func->allocated_locals)
+ self->max_locals = func->allocated_locals;
+ }
}
for (i = 0; i < vec_size(self->fields); ++i)