From 92f00e46821d40107b6376877e363ff7171dbbd1 Mon Sep 17 00:00:00 2001 From: Michael Williamson Date: Tue, 19 Dec 2023 13:40:53 +0000 Subject: Discard stashed effect handler and GC root index on block exit --- src/main/java/org/shedlang/compiler/patio/PatioCodeGenContext.java | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'src/main/java') diff --git a/src/main/java/org/shedlang/compiler/patio/PatioCodeGenContext.java b/src/main/java/org/shedlang/compiler/patio/PatioCodeGenContext.java index 40bdf823..9aaf2666 100644 --- a/src/main/java/org/shedlang/compiler/patio/PatioCodeGenContext.java +++ b/src/main/java/org/shedlang/compiler/patio/PatioCodeGenContext.java @@ -779,14 +779,13 @@ public record PatioCodeGenContext( this.compilationUnitContext, this.blockStack.minus(0), new FunctionContext( - // TODO: some of these fields should be popped this.blockStack.get(0).temporaryStack, this.blockStack.get(0).instructions, this.functionContext.localsByName, this.functionContext.shidNameToLocal, this.functionContext.waitingForShidLocal, - this.functionContext.stashedEffectHandler, - this.functionContext.stashedGcRootStackIndex, + this.blockStack.get(0).stashedEffectHandler, + this.blockStack.get(0).stashedGcRootStackIndex, this.blockStack.get(0).onReturn ) ).toResult(this.functionContext.instructions); -- cgit v1.2.3