}
fun.firstlocal = code_globals_elements;
- fun.locals = irfun->allocated_locals + irfun->locals_count;
local_var_end = fun.firstlocal;
for (i = 0; i < irfun->locals_count; ++i) {
code_globals_add(0);
}
+ fun.locals = code_globals_elements - fun.firstlocal;
+
if (irfun->builtin)
fun.entry = irfun->builtin;
else {
for (i = 0; i < f->locals_count; ++i) {
size_t l;
ir_value *v = f->locals[i];
- oprintf("%s\t%s: ", ind, v->name);
+ oprintf("%s\t%s: unique ", ind, v->name);
for (l = 0; l < v->life_count; ++l) {
oprintf("[%i,%i] ", v->life[l].start, v->life[l].end);
}
for (i = 0; i < f->values_count; ++i) {
size_t l;
ir_value *v = f->values[i];
- oprintf("%s\t%s: (%i)", ind, v->name, (int)v->life_count);
+ oprintf("%s\t%s: @%i ", ind, v->name, (int)v->code.local);
for (l = 0; l < v->life_count; ++l) {
oprintf("[%i,%i] ", v->life[l].start, v->life[l].end);
}