Named return values but do not affect other declarations

This commit is contained in:
Ginger Bill
2017-02-18 12:02:11 +00:00
parent d2f9d20833
commit 9ff474f387
4 changed files with 177 additions and 124 deletions
+5 -3
View File
@@ -5600,12 +5600,14 @@ void ir_begin_procedure_body(irProcedure *proc) {
TypeTuple *params = &proc->type->Proc.params->Tuple;
for (isize i = 0; i < params->variable_count; i++) {
GB_ASSERT(pt->params.e[0]->kind == AstNode_Field);
if (q_index == pt->params.e[param_index]->Field.names.count) {
ast_node(fl, FieldList, pt->params);
GB_ASSERT(fl->list.count > 0);
GB_ASSERT(fl->list.e[0]->kind == AstNode_Field);
if (q_index == fl->list.e[param_index]->Field.names.count) {
q_index = 0;
param_index++;
}
ast_node(field, Field, pt->params.e[param_index]);
ast_node(field, Field, fl->list.e[param_index]);
AstNode *name = field->names.e[q_index++];
Entity *e = params->variables[i];