Skip to content

Commit

Permalink
Fix in one more place (#186)
Browse files Browse the repository at this point in the history
  • Loading branch information
vtereshkov committed Jul 14, 2022
1 parent 0b0996d commit 9d0f33b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion playground/umka.js

Large diffs are not rendered by default.

3 changes: 2 additions & 1 deletion src/umka_stmt.c
Original file line number Diff line number Diff line change
Expand Up @@ -85,14 +85,14 @@ void doResolveExtern(Compiler *comp)
genCallExtern(&comp->gen, fn);

doGarbageCollection(comp, blocksCurrent(&comp->blocks));
identWarnIfUnusedAll(&comp->idents, blocksCurrent(&comp->blocks));
identFree(&comp->idents, blocksCurrent(&comp->blocks));

int paramSlots = align(typeParamSizeTotal(&comp->types, &ident->type->sig), sizeof(Slot)) / sizeof(Slot);

genLeaveFrameFixup(&comp->gen, 0, paramSlots);
genReturn(&comp->gen, paramSlots);

identWarnIfUnusedAll(&comp->idents, blocksCurrent(&comp->blocks));
blocksLeave(&comp->blocks);
}

Expand Down Expand Up @@ -555,6 +555,7 @@ static void parseForHeader(Compiler *comp)

// Additional scope embracing simpleStmt
doGarbageCollection(comp, blocksCurrent(&comp->blocks));
identWarnIfUnusedAll(&comp->idents, blocksCurrent(&comp->blocks));
blocksLeave(&comp->blocks);
}

Expand Down

0 comments on commit 9d0f33b

Please sign in to comment.