Use the field parameter type on the raw paramter type list for their sizes.

This commit is contained in:
Wolfgang (Blub) Bumiller 2012-11-30 20:33:40 +01:00
parent e0a7f8a484
commit b3a9c4e8d9

5
ast.c
View file

@ -1416,7 +1416,10 @@ bool ast_function_codegen(ast_function *self, ir_builder *ir)
ec = &self->vtype->expression;
for (i = 0; i < vec_size(ec->params); ++i)
{
vec_push(irf->params, ec->params[i]->expression.vtype);
if (ec->params[i]->expression.vtype == TYPE_FIELD)
vec_push(irf->params, ec->params[i]->expression.next->expression.vtype);
else
vec_push(irf->params, ec->params[i]->expression.vtype);
if (!self->builtin) {
if (!ast_local_codegen(ec->params[i], self->ir_func, true))
return false;