From 7e3d270e09b5e313ba8d4bd518a1ed96fac89758 Mon Sep 17 00:00:00 2001 From: Michael Williamson Date: Fri, 15 Dec 2023 09:58:18 +0000 Subject: Remove unnecessary parameter --- src/main/java/org/shedlang/compiler/patio/PatioCodeGen.java | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'src/main/java') diff --git a/src/main/java/org/shedlang/compiler/patio/PatioCodeGen.java b/src/main/java/org/shedlang/compiler/patio/PatioCodeGen.java index a059b723..a6f9c975 100644 --- a/src/main/java/org/shedlang/compiler/patio/PatioCodeGen.java +++ b/src/main/java/org/shedlang/compiler/patio/PatioCodeGen.java @@ -381,11 +381,11 @@ public class PatioCodeGen { targets.add(target); } - var trueBodyResult = generateBlock(if_.resultCount(), if_.trueBody(), if_.source(), context); + var trueBodyResult = generateBlock(if_.resultCount(), if_.trueBody(), context); var trueBody = trueBodyResult.value(); context = trueBodyResult.context(); - var falseBodyResult = generateBlock(if_.resultCount(), if_.falseBody(), if_.source(), context); + var falseBodyResult = generateBlock(if_.resultCount(), if_.falseBody(), context); var falseBody = falseBodyResult.value(); context = falseBodyResult.context(); @@ -627,7 +627,6 @@ public class PatioCodeGen { var bodyResult = generateBlock( 1, shidCase.body(), - shidCase.source(), context ); var body = bodyResult.value(); @@ -682,7 +681,7 @@ public class PatioCodeGen { try_.handledEffect(), handlerMethodsByName, bodyContext -> - generateBlock(1, try_.body(), try_.source(), bodyContext), + generateBlock(1, try_.body(), bodyContext), try_.source(), context ); @@ -850,7 +849,6 @@ public class PatioCodeGen { private static PatioCodeGenResult generateBlock( int resultCount, ShidBlock shidBlock, - Source source, PatioCodeGenContext context ) { context = context.enterBlock(); @@ -873,7 +871,7 @@ public class PatioCodeGen { return context.toResult(new PatioBlock( instructions, targets, - source + shidBlock.source() )); } -- cgit v1.2.3