Skip to content

Commit 3c672e0

Browse files
nicolasstuckiodersky
authored andcommitted
Remove branching in while loop
1 parent bbe3ceb commit 3c672e0

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

compiler/src/dotty/tools/dotc/core/tasty/TastyPickler.scala

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -89,10 +89,8 @@ class TastyPickler(val rootCls: ClassSymbol) {
8989
val d = data(i) & 0xFFL // Interpret byte as unsigned byte
9090
h = (h << 8) + d
9191
val high = h & 0xFF00000000000000L
92-
if (high != 0) {
93-
h ^= high >> 48L
94-
h &= ~high
95-
}
92+
h ^= high >> 48L
93+
h &= ~high
9694
i += 1
9795
}
9896
h

0 commit comments

Comments
 (0)