summaryrefslogtreecommitdiff
path: root/Binaries
diff options
context:
space:
mode:
authorGravatar chrishaw <unknown>2014-12-11 09:45:08 -0800
committerGravatar chrishaw <unknown>2014-12-11 09:45:08 -0800
commit53d80ae6818f9fede9acd1eaac42f8129709d412 (patch)
tree946f74a0bae51265871b4c861c54367733cd96c0 /Binaries
parent62a3e97eb61cbee0d523297ccad1f2d3bcf871c3 (diff)
Optimization to nativeType: have EuclideanModulus_sbyte and EuclideanModulus_short call EuclideanModulus_int, not the BigInteger EuclideanModulus. (Same for EuclideanDivision.)
Diffstat (limited to 'Binaries')
-rw-r--r--Binaries/DafnyRuntime.cs4
1 files changed, 2 insertions, 2 deletions
diff --git a/Binaries/DafnyRuntime.cs b/Binaries/DafnyRuntime.cs
index 83e0563b..dbeb6d0f 100644
--- a/Binaries/DafnyRuntime.cs
+++ b/Binaries/DafnyRuntime.cs
@@ -703,10 +703,10 @@ namespace Dafny
// pre: b != 0
// post: result == a%b, as defined by Euclidean Division (http://en.wikipedia.org/wiki/Modulo_operation)
public static sbyte EuclideanModulus_sbyte(sbyte a, sbyte b) {
- return (sbyte)EuclideanModulus(a, b);
+ return (sbyte)EuclideanModulus_int(a, b);
}
public static short EuclideanModulus_short(short a, short b) {
- return (short)EuclideanModulus(a, b);
+ return (short)EuclideanModulus_int(a, b);
}
public static int EuclideanModulus_int(int a, int b) {
uint bp = (0 <= b) ? (uint)b : (uint)(unchecked(-b));