Skip to content

Commit

Permalink
Update ModuleCodegen.cs
Browse files Browse the repository at this point in the history
  • Loading branch information
LPeter1997 committed Dec 16, 2023
1 parent 3bb41d0 commit 213a498
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Draco.Compiler/Internal/OptimizingIr/ModuleCodegen.cs
Original file line number Diff line number Diff line change
Expand Up @@ -79,13 +79,13 @@ public override void VisitGlobal(GlobalSymbol globalSymbol)

public override void VisitFunction(FunctionSymbol functionSymbol)
{
if (functionSymbol is not SourceFunctionSymbol sourceFunction) return;
if (functionSymbol.Body is null) return;

// Add procedure
var procedure = this.module.DefineProcedure(functionSymbol);

// Create the body
var body = this.RewriteBody(sourceFunction.Body);
var body = this.RewriteBody(functionSymbol.Body);
// Yank out potential local functions and closures
var (bodyWithoutLocalFunctions, localFunctions) = ClosureRewriter.Rewrite(body);
// Compile it
Expand Down

0 comments on commit 213a498

Please sign in to comment.