From f7048d47b57ff21e03fd10f7917d87b2fd6c2dbb Mon Sep 17 00:00:00 2001 From: Michael Williamson Date: Wed, 27 Dec 2023 16:11:21 +0000 Subject: Fix target type for int comparison operations --- ...quals(org.shedlang.compiler.testing.snapshots.Snapshotter)].expected | 2 +- ...Equal(org.shedlang.compiler.testing.snapshots.Snapshotter)].expected | 2 +- src/main/java/org/shedlang/compiler/shidtopatio/ShidToPatio.java | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/snapshots/[engine:junit-jupiter]/[class:org.shedlang.compiler.shidtopatio.ShidToPatioIntEqualsTests]/[method:canGenerateCodeForIntEquals(org.shedlang.compiler.testing.snapshots.Snapshotter)].expected b/snapshots/[engine:junit-jupiter]/[class:org.shedlang.compiler.shidtopatio.ShidToPatioIntEqualsTests]/[method:canGenerateCodeForIntEquals(org.shedlang.compiler.testing.snapshots.Snapshotter)].expected index 17417a37..5bbbded1 100644 --- a/snapshots/[engine:junit-jupiter]/[class:org.shedlang.compiler.shidtopatio.ShidToPatioIntEqualsTests]/[method:canGenerateCodeForIntEquals(org.shedlang.compiler.testing.snapshots.Snapshotter)].expected +++ b/snapshots/[engine:junit-jupiter]/[class:org.shedlang.compiler.shidtopatio.ShidToPatioIntEqualsTests]/[method:canGenerateCodeForIntEquals(org.shedlang.compiler.testing.snapshots.Snapshotter)].expected @@ -9,7 +9,7 @@ Compilation unit elements: Locals: * (val "binaryOpResult__0" int) - * (val "tmp__0" int) + * (val "tmp__0" bool) Instructions: diff --git a/snapshots/[engine:junit-jupiter]/[class:org.shedlang.compiler.shidtopatio.ShidToPatioIntNotEqualTests]/[method:canGenerateCodeForIntNotEqual(org.shedlang.compiler.testing.snapshots.Snapshotter)].expected b/snapshots/[engine:junit-jupiter]/[class:org.shedlang.compiler.shidtopatio.ShidToPatioIntNotEqualTests]/[method:canGenerateCodeForIntNotEqual(org.shedlang.compiler.testing.snapshots.Snapshotter)].expected index c9d0f655..6fa1e30b 100644 --- a/snapshots/[engine:junit-jupiter]/[class:org.shedlang.compiler.shidtopatio.ShidToPatioIntNotEqualTests]/[method:canGenerateCodeForIntNotEqual(org.shedlang.compiler.testing.snapshots.Snapshotter)].expected +++ b/snapshots/[engine:junit-jupiter]/[class:org.shedlang.compiler.shidtopatio.ShidToPatioIntNotEqualTests]/[method:canGenerateCodeForIntNotEqual(org.shedlang.compiler.testing.snapshots.Snapshotter)].expected @@ -9,7 +9,7 @@ Compilation unit elements: Locals: * (val "binaryOpResult__0" int) - * (val "tmp__0" int) + * (val "tmp__0" bool) Instructions: diff --git a/src/main/java/org/shedlang/compiler/shidtopatio/ShidToPatio.java b/src/main/java/org/shedlang/compiler/shidtopatio/ShidToPatio.java index 19af1806..6efa93e9 100644 --- a/src/main/java/org/shedlang/compiler/shidtopatio/ShidToPatio.java +++ b/src/main/java/org/shedlang/compiler/shidtopatio/ShidToPatio.java @@ -844,7 +844,7 @@ public class ShidToPatio { (target, left, right, operationContext) -> { var targetBoolResult = operationContext.allocateVal( ShidToPatioLocalSpace.TEMPORARY, - PatioTypes.INT + PatioTypes.BOOL ); var targetBool = targetBoolResult.value(); operationContext = targetBoolResult.context(); -- cgit v1.2.3