diff options
| author | Michael Williamson <mike@zwobble.org> | 2025-02-02 19:30:12 +0000 |
|---|---|---|
| committer | Michael Williamson <mike@zwobble.org> | 2025-02-02 19:53:22 +0000 |
| commit | f303731ca75c91af2584690fb9f1cd3e2c6217c8 (patch) | |
| tree | 8618703c7898f837e6c9d937f64030d2d93123e7 /src/main/java | |
| parent | 6ead9f417fabd55cc26a93c6d54bdde1110fccd4 (diff) | |
Clarify relational int instructions
Diffstat (limited to 'src/main/java')
4 files changed, 14 insertions, 12 deletions
diff --git a/src/main/java/org/shedlang/compiler/shid/instructions/ShidIntGreaterThan.java b/src/main/java/org/shedlang/compiler/shid/instructions/ShidIntGreaterThan.java index 9d33319f..9a86688c 100644 --- a/src/main/java/org/shedlang/compiler/shid/instructions/ShidIntGreaterThan.java +++ b/src/main/java/org/shedlang/compiler/shid/instructions/ShidIntGreaterThan.java @@ -3,9 +3,9 @@ package org.shedlang.compiler.shid.instructions; import org.shedlang.compiler.sources.Source; /** - * Pop two values from the temporary value stack, compare them as Ints, and push - * a Bool onto the temporary value stack: true if the first is greater than the - * second, false otherwise. + * Pop the right operand from the temporary value stack, then the left operand + * from the temporary value stack, calculate whether the left operand is greater + * than the right operand, then push the result onto the temporary value stack. */ public record ShidIntGreaterThan(Source source) implements ShidInstruction { @Override diff --git a/src/main/java/org/shedlang/compiler/shid/instructions/ShidIntGreaterThanOrEqual.java b/src/main/java/org/shedlang/compiler/shid/instructions/ShidIntGreaterThanOrEqual.java index d0517181..ed27be97 100644 --- a/src/main/java/org/shedlang/compiler/shid/instructions/ShidIntGreaterThanOrEqual.java +++ b/src/main/java/org/shedlang/compiler/shid/instructions/ShidIntGreaterThanOrEqual.java @@ -3,9 +3,10 @@ package org.shedlang.compiler.shid.instructions; import org.shedlang.compiler.sources.Source; /** - * Pop two values from the temporary value stack, compare them as Ints, and push - * a Bool onto the temporary value stack: true if the first is greater than or - * equal to the second, false otherwise. + * Pop the right operand from the temporary value stack, then the left operand + * from the temporary value stack, calculate whether the left operand is greater + * than or equal to the right operand, then push the result onto the temporary + * value stack. */ public record ShidIntGreaterThanOrEqual(Source source) implements ShidInstruction { @Override diff --git a/src/main/java/org/shedlang/compiler/shid/instructions/ShidIntLessThan.java b/src/main/java/org/shedlang/compiler/shid/instructions/ShidIntLessThan.java index b16e032a..60dc9b75 100644 --- a/src/main/java/org/shedlang/compiler/shid/instructions/ShidIntLessThan.java +++ b/src/main/java/org/shedlang/compiler/shid/instructions/ShidIntLessThan.java @@ -3,9 +3,9 @@ package org.shedlang.compiler.shid.instructions; import org.shedlang.compiler.sources.Source; /** - * Pop two values from the temporary value stack, compare them as Ints, and push - * a Bool onto the temporary value stack: true if the first is less than the - * second, false otherwise. + * Pop the right operand from the temporary value stack, then the left operand + * from the temporary value stack, calculate whether the left operand is less + * than the right operand, then push the result onto the temporary value stack. */ public record ShidIntLessThan(Source source) implements ShidInstruction { @Override diff --git a/src/main/java/org/shedlang/compiler/shid/instructions/ShidIntLessThanOrEqual.java b/src/main/java/org/shedlang/compiler/shid/instructions/ShidIntLessThanOrEqual.java index 1d8a16a3..b96ca155 100644 --- a/src/main/java/org/shedlang/compiler/shid/instructions/ShidIntLessThanOrEqual.java +++ b/src/main/java/org/shedlang/compiler/shid/instructions/ShidIntLessThanOrEqual.java @@ -3,9 +3,10 @@ package org.shedlang.compiler.shid.instructions; import org.shedlang.compiler.sources.Source; /** - * Pop two values from the temporary value stack, compare them as Ints, and push - * a Bool onto the temporary value stack: true if the first is less than or - * equal to the second, false otherwise. + * Pop the right operand from the temporary value stack, then the left operand + * from the temporary value stack, calculate whether the left operand is less + * than or equal to the right operand, then push the result onto the temporary + * value stack. */ public record ShidIntLessThanOrEqual(Source source) implements ShidInstruction { @Override |
