We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 91b874b + 552dbcf commit 2b58780Copy full SHA for 2b58780
.jvmopts
@@ -1,3 +1,4 @@
1
-Xss1m
2
-Xms512m
3
-Xmx1200m
4
+-XX:MaxInlineLevel=35
compiler/src/dotty/tools/dotc/core/tasty/TastyBuffer.scala
@@ -8,8 +8,11 @@ import util.Util.dble
8
object TastyBuffer {
9
10
/** The number of digits of the natural number `nat`, written in base 128 format. */
11
- def natSize(nat: Int): Int =
12
- if (nat < 128) 1 else natSize(nat >>> 7) + 1
+ def natSize(nat: Int): Int = {
+ def loop(n: Int, acc: Int): Int =
13
+ if (n < 128) acc else loop(n >>> 7, acc + 1)
14
+ loop(nat, 1)
15
+ }
16
17
/** An address pointing to an index in a Tasty buffer's byte array */
18
case class Addr(index: Int) extends AnyVal {
0 commit comments