aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Williamson <mike@zwobble.org>2023-11-19 15:14:27 +0000
committerMichael Williamson <mike@zwobble.org>2023-11-19 15:14:27 +0000
commit369f0a861ffe179f026d8131bbf8d1f1ef3d41f1 (patch)
treec28da1fcb1107316083e3252c3c691bc282b0c6c
parent62462ec9a30fb07882a4e489d63763deefc12098 (diff)
Don't use result of popping effect handler
-rw-r--r--snapshots/[engine:junit-jupiter]/[class:org.shedlang.compiler.patio.PatioCodeGenTryTests]/[method:canGenerateCodeForTry(org.shedlang.compiler.testing.snapshots.Snapshotter)].expected2
-rw-r--r--src/main/java/org/shedlang/compiler/patio/PatioCodeGenEffects.java2
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