@@ -546,6 +546,7 @@ final class JsonReader private[jsoniter_scala](
546
546
* @throws JsonReaderException in cases of reaching the end of input or dection of leading zero or
547
547
* illegal format of JSON value or exceeding capacity of `Byte`
548
548
*/
549
+ @ inline
549
550
def readByte (): Byte = readByte(isToken = true )
550
551
551
552
/**
@@ -569,6 +570,7 @@ final class JsonReader private[jsoniter_scala](
569
570
* @throws JsonReaderException in cases of reaching the end of input or detection of leading zero or
570
571
* illegal format of JSON value or exceeding capacity of `Short`
571
572
*/
573
+ @ inline
572
574
def readShort (): Short = readShort(isToken = true )
573
575
574
576
/**
@@ -578,6 +580,7 @@ final class JsonReader private[jsoniter_scala](
578
580
* @throws JsonReaderException in cases of reaching the end of input or detection of leading zero or
579
581
* illegal format of JSON value or exceeding capacity of `Int`
580
582
*/
583
+ @ inline
581
584
def readInt (): Int = readInt(isToken = true )
582
585
583
586
/**
@@ -587,6 +590,7 @@ final class JsonReader private[jsoniter_scala](
587
590
* @throws JsonReaderException in cases of reaching the end of input or detection of leading zero or
588
591
* illegal format of JSON value or exceeding capacity of `Long`
589
592
*/
593
+ @ inline
590
594
def readLong (): Long = readLong(isToken = true )
591
595
592
596
/**
@@ -596,6 +600,7 @@ final class JsonReader private[jsoniter_scala](
596
600
* @throws JsonReaderException in cases of reaching the end of input or detection of leading zero or
597
601
* illegal format of JSON value
598
602
*/
603
+ @ inline
599
604
def readDouble (): Double = readDouble(isToken = true )
600
605
601
606
/**
@@ -605,6 +610,7 @@ final class JsonReader private[jsoniter_scala](
605
610
* @throws JsonReaderException in cases of reaching the end of input or detection of leading zero or
606
611
* illegal format of JSON value
607
612
*/
613
+ @ inline
608
614
def readFloat (): Float = readFloat(isToken = true )
609
615
610
616
/**
@@ -2313,6 +2319,7 @@ final class JsonReader private[jsoniter_scala](
2313
2319
2314
2320
// Based on the 'Moderate Path' algorithm from the awesome library of Alexander Huszagh: https://github.com/Alexhuszagh/rust-lexical
2315
2321
// Here is his inspiring post: https://www.reddit.com/r/rust/comments/a6j5j1/making_rust_float_parsing_fast_and_correct
2322
+ @ inline
2316
2323
private [this ] def toDouble (m10 : Long , e10 : Int , from : Int , newMark : Int , pos : Int ): Double =
2317
2324
if (m10 == 0L || e10 < - 343 ) 0.0
2318
2325
else if (e10 >= 310 ) Double .PositiveInfinity
@@ -2457,6 +2464,7 @@ final class JsonReader private[jsoniter_scala](
2457
2464
2458
2465
// Based on the 'Moderate Path' algorithm from the awesome library of Alexander Huszagh: https://github.com/Alexhuszagh/rust-lexical
2459
2466
// Here is his inspiring post: https://www.reddit.com/r/rust/comments/a6j5j1/making_rust_float_parsing_fast_and_correct
2467
+ @ inline
2460
2468
private [this ] def toFloat (m10 : Long , e10 : Int , from : Int , newMark : Int , pos : Int ): Float =
2461
2469
if (m10 == 0L || e10 < - 64 ) 0.0f
2462
2470
else if (e10 >= 39 ) Float .PositiveInfinity
0 commit comments