From 369f0a861ffe179f026d8131bbf8d1f1ef3d41f1 Mon Sep 17 00:00:00 2001 From: Michael Williamson Date: Sun, 19 Nov 2023 15:14:27 +0000 Subject: Don't use result of popping effect handler --- ...orTry(org.shedlang.compiler.testing.snapshots.Snapshotter)].expected | 2 +- src/main/java/org/shedlang/compiler/patio/PatioCodeGenEffects.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/snapshots/[engine:junit-jupiter]/[class:org.shedlang.compiler.patio.PatioCodeGenTryTests]/[method:canGenerateCodeForTry(org.shedlang.compiler.testing.snapshots.Snapshotter)].expected b/snapshots/[engine:junit-jupiter]/[class:org.shedlang.compiler.patio.PatioCodeGenTryTests]/[method:canGenerateCodeForTry(org.shedlang.compiler.testing.snapshots.Snapshotter)].expected index 71389f44..a70227a9 100644 --- a/snapshots/[engine:junit-jupiter]/[class:org.shedlang.compiler.patio.PatioCodeGenTryTests]/[method:canGenerateCodeForTry(org.shedlang.compiler.testing.snapshots.Snapshotter)].expected +++ b/snapshots/[engine:junit-jupiter]/[class:org.shedlang.compiler.patio.PatioCodeGenTryTests]/[method:canGenerateCodeForTry(org.shedlang.compiler.testing.snapshots.Snapshotter)].expected @@ -31,7 +31,7 @@ Instructions: (call _ "shed__runtime__effects_set_handler_method" ((local "effectHandler__0") (int 1) (local "handlerA"))) (call _ "shed__runtime__effects_set_handler_method" ((local "effectHandler__0") (int 2) (local "handlerB"))) (local-store (local "tmp__0") (int 42)) - (call (local "effectHandler__0") "shed__runtime__effects_pop_handler" ()) + (call _ "shed__runtime__effects_pop_handler" ()) ) Temporary stack: diff --git a/src/main/java/org/shedlang/compiler/patio/PatioCodeGenEffects.java b/src/main/java/org/shedlang/compiler/patio/PatioCodeGenEffects.java index b13165f6..ad5d64de 100644 --- a/src/main/java/org/shedlang/compiler/patio/PatioCodeGenEffects.java +++ b/src/main/java/org/shedlang/compiler/patio/PatioCodeGenEffects.java @@ -267,7 +267,7 @@ public class PatioCodeGenEffects { context = generateBody.apply(context); context = context.addInstruction(new PatioCall( - Optional.of(effectHandler), + Optional.empty(), POP_HANDLER_DECLARATION.name(), List.of(), source -- cgit v1.2.3