if (v->vtype == TYPE_VECTOR || v->vtype == TYPE_VARIANT)
alloc.sizes[a] = 3;
- self->values[i]->code.slot = a;
+ self->values[i]->code.local = a;
break;
}
if (a >= alloc.locals_count) {
- self->values[i]->code.slot = alloc.locals_count;
+ self->values[i]->code.local = alloc.locals_count;
if (!function_allocator_alloc(&alloc, v))
goto error;
}
goto error;
}
+ self->allocated_locals = pos + alloc.sizes[alloc.sizes_count-1];
+
/* Take over the actual slot positions */
for (i = 0; i < self->values_count; ++i)
- self->values[i]->code.slot = alloc.positions[self->values[i]->code.slot];
+ self->values[i]->code.local = alloc.positions[self->values[i]->code.local];
goto cleanup;
int32_t globaladdr;
int32_t name;
/* filled by the local-allocator */
- int32_t slot;
+ int32_t local;
} code;
/* For the temp allocator */
/* locally defined variables */
MEM_VECTOR_MAKE(ir_value*, locals);
+ size_t allocated_locals;
+
ir_block* first;
ir_block* last;