Skip to content

Commit cb03266

Browse files
mediremizth
authored andcommitted
Add migrations for remaining Int.Bitwise functions
1 parent 8fbc465 commit cb03266

File tree

4 files changed

+46
-2
lines changed

4 files changed

+46
-2
lines changed

runtime/Stdlib_Int.resi

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -477,13 +477,37 @@ module Bitwise = {
477477
migrate: Int.bitwiseAnd()
478478
})
479479
external land: (int, int) => int = "%andint"
480+
@deprecated({
481+
reason: "Use `Int.bitwiseOr` instead",
482+
migrate: Int.bitwiseOr()
483+
})
480484
external lor: (int, int) => int = "%orint"
485+
@deprecated({
486+
reason: "Use `Int.bitwiseXor` instead",
487+
migrate: Int.bitwiseXor()
488+
})
481489
external lxor: (int, int) => int = "%xorint"
482490

491+
@deprecated({
492+
reason: "Use `Int.shiftLeft` instead",
493+
migrate: Int.shiftLeft()
494+
})
483495
external lsl: (int, int) => int = "%lslint"
496+
@deprecated({
497+
reason: "Use `Int.shiftRightUnsigned` instead",
498+
migrate: Int.shiftRightUnsigned()
499+
})
484500
external lsr: (int, int) => int = "%lsrint"
501+
@deprecated({
502+
reason: "Use `Int.shiftRight` instead",
503+
migrate: Int.shiftRight()
504+
})
485505
external asr: (int, int) => int = "%asrint"
486506

507+
@deprecated({
508+
reason: "Use `Int.bitwiseNot` instead",
509+
migrate: Int.bitwiseNot()
510+
})
487511
let lnot: int => int
488512
}
489513

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,8 @@
1-
StdlibMigration_Int.res: File did not need migration
1+
let result = Int.bitwiseAnd(1, 2)
2+
let result = Int.bitwiseOr(1, 2)
3+
let result = Int.bitwiseXor(1, 2)
4+
let result = Int.shiftLeft(1, 2)
5+
let result = Int.shiftRightUnsigned(1, 2)
6+
let result = Int.shiftLeft(1, 2)
7+
let result = Int.bitwiseNot(0)
8+
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,7 @@
11
let result = Int.Bitwise.land(1, 2)
2+
let result = Int.Bitwise.lor(1, 2)
3+
let result = Int.Bitwise.lxor(1, 2)
4+
let result = Int.Bitwise.lsl(1, 2)
5+
let result = Int.Bitwise.lsr(1, 2)
6+
let result = Int.Bitwise.asr(1, 2)
7+
let result = Int.Bitwise.lnot(0)
Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,8 @@
1-
StdlibMigration_Int.res: File did not need migration
1+
let result = Int.bitwiseAnd(1, 2)
2+
let result = Int.bitwiseOr(1, 2)
3+
let result = Int.bitwiseXor(1, 2)
4+
let result = Int.shiftLeft(1, 2)
5+
let result = Int.shiftRightUnsigned(1, 2)
6+
let result = Int.shiftRight(1, 2)
7+
let result = Int.bitwiseNot(0)
8+

0 commit comments

Comments
 (0)