diff options
| author | Michael Williamson <mike@zwobble.org> | 2023-12-16 22:14:06 +0000 |
|---|---|---|
| committer | Michael Williamson <mike@zwobble.org> | 2023-12-16 22:15:34 +0000 |
| commit | 660f8ae4a3869129ed0a35b83a8a87ef2c042fdf (patch) | |
| tree | 68e61527726508d3feba1edc38febe32ab568182 /src/test/java | |
| parent | c8dd5dc5b3c11bf1822c960a8ad1e7260957b3f9 (diff) | |
Garbage collect on function exit
Diffstat (limited to 'src/test/java')
| -rw-r--r-- | src/test/java/org/shedlang/compiler/patio/PatioCodeGenResumeTests.java | 3 | ||||
| -rw-r--r-- | src/test/java/org/shedlang/compiler/patio/PatioCodeGenReturnTests.java | 3 |
2 files changed, 4 insertions, 2 deletions
diff --git a/src/test/java/org/shedlang/compiler/patio/PatioCodeGenResumeTests.java b/src/test/java/org/shedlang/compiler/patio/PatioCodeGenResumeTests.java index b0a97f31..6ac0e4f7 100644 --- a/src/test/java/org/shedlang/compiler/patio/PatioCodeGenResumeTests.java +++ b/src/test/java/org/shedlang/compiler/patio/PatioCodeGenResumeTests.java @@ -19,7 +19,8 @@ public class PatioCodeGenResumeTests { var context = PatioCodeGenContext.EMPTY .temporaryPush(new PatioLocalRef("a")) .temporaryPush(new PatioLocalRef("b")) - .stashEffectHandler(new PatioLocalRef("effect_handler")); + .stashEffectHandler(new PatioLocalRef("effect_handler")) + .stashGcRootStackIndex(new PatioLocalRef("gc_root_stack_index")); var result = PatioCodeGen.generateInstruction(shid, context); diff --git a/src/test/java/org/shedlang/compiler/patio/PatioCodeGenReturnTests.java b/src/test/java/org/shedlang/compiler/patio/PatioCodeGenReturnTests.java index 9a7166c5..f2bf807e 100644 --- a/src/test/java/org/shedlang/compiler/patio/PatioCodeGenReturnTests.java +++ b/src/test/java/org/shedlang/compiler/patio/PatioCodeGenReturnTests.java @@ -18,7 +18,8 @@ public class PatioCodeGenReturnTests { var shid = Shid.return_(); var context = PatioCodeGenContext.EMPTY .temporaryPush(new PatioLocalRef("a")) - .temporaryPush(new PatioLocalRef("b")); + .temporaryPush(new PatioLocalRef("b")) + .stashGcRootStackIndex(new PatioLocalRef("gc_root_stack_index"));; var result = PatioCodeGen.generateInstruction(shid, context); |
