Skip to content

Commit e9cc737

Browse files
committed
Use JvmSynthetic instead of cryptic names
1 parent 71f37d0 commit e9cc737

File tree

3 files changed

+40
-40
lines changed

3 files changed

+40
-40
lines changed

core/api/kotlinx-io-core.api

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,4 @@
11
public final class kotlinx/io/Buffer : kotlinx/io/Sink, kotlinx/io/Source {
2-
public final fun #int#getHead ()Lkotlinx/io/Segment;
3-
public final fun #int#getSize ()J
4-
public final fun #int#getTail ()Lkotlinx/io/Segment;
5-
public final fun #int#recycleTail ()V
6-
public final fun #int#setHead (Lkotlinx/io/Segment;)V
7-
public final fun #int#setSize (J)V
8-
public final fun #int#setTail (Lkotlinx/io/Segment;)V
9-
public final fun #int#writableSegment (I)Lkotlinx/io/Segment;
102
public fun <init> ()V
113
public final fun clear ()V
124
public fun close ()V
@@ -18,7 +10,10 @@ public final class kotlinx/io/Buffer : kotlinx/io/Sink, kotlinx/io/Source {
1810
public fun flush ()V
1911
public final fun get (J)B
2012
public fun getBuffer ()Lkotlinx/io/Buffer;
13+
public final synthetic fun getHead ()Lkotlinx/io/Segment;
2114
public final fun getSize ()J
15+
public final synthetic fun getSizeMut ()J
16+
public final synthetic fun getTail ()Lkotlinx/io/Segment;
2217
public fun hintEmit ()V
2318
public fun peek ()Lkotlinx/io/Source;
2419
public fun readAtMostTo (Lkotlinx/io/Buffer;J)J
@@ -28,12 +23,17 @@ public final class kotlinx/io/Buffer : kotlinx/io/Sink, kotlinx/io/Source {
2823
public fun readLong ()J
2924
public fun readShort ()S
3025
public fun readTo (Lkotlinx/io/RawSink;J)V
26+
public final synthetic fun recycleTail ()V
3127
public fun request (J)Z
3228
public fun require (J)V
29+
public final synthetic fun setHead (Lkotlinx/io/Segment;)V
30+
public final synthetic fun setSizeMut (J)V
31+
public final synthetic fun setTail (Lkotlinx/io/Segment;)V
3332
public fun skip (J)V
3433
public fun toString ()Ljava/lang/String;
3534
public fun transferFrom (Lkotlinx/io/RawSource;)J
3635
public fun transferTo (Lkotlinx/io/RawSink;)J
36+
public final synthetic fun writableSegment (I)Lkotlinx/io/Segment;
3737
public fun write (Lkotlinx/io/Buffer;J)V
3838
public fun write (Lkotlinx/io/RawSource;J)V
3939
public fun write ([BII)V
@@ -101,17 +101,17 @@ public abstract interface class kotlinx/io/RawSource : java/lang/AutoCloseable {
101101
}
102102

103103
public final class kotlinx/io/Segment {
104-
public final fun #int#dataAsByteArray (Z)[B
105-
public final fun #int#dataWriteBack ([BI)V
106-
public final fun #int#getLimit ()I
107-
public final fun #int#getNext ()Lkotlinx/io/Segment;
108-
public final fun #int#getPos ()I
109-
public final fun #int#remainingCapacity ()I
110-
public final fun #int#setLimit (I)V
111-
public final fun #int#setNext (Lkotlinx/io/Segment;)V
112-
public final fun #int#setPos (I)V
113-
public final fun #int#size ()I
114104
public synthetic fun <init> ([BIIZZLkotlin/jvm/internal/DefaultConstructorMarker;)V
105+
public final synthetic fun dataAsByteArray (Z)[B
106+
public final synthetic fun getLimit ()I
107+
public final synthetic fun getNext ()Lkotlinx/io/Segment;
108+
public final synthetic fun getPos ()I
109+
public final synthetic fun getRemainingCapacity ()I
110+
public final synthetic fun getSize ()I
111+
public final synthetic fun setLimit (I)V
112+
public final synthetic fun setNext (Lkotlinx/io/Segment;)V
113+
public final synthetic fun setPos (I)V
114+
public final synthetic fun writeBackData ([BI)V
115115
}
116116

117117
public final class kotlinx/io/SegmentKt {

core/common/src/Buffer.kt

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
*/
2121
package kotlinx.io
2222

23-
import kotlin.jvm.JvmName
23+
import kotlin.jvm.JvmSynthetic
2424

2525
/**
2626
* A collection of bytes in memory.
@@ -40,13 +40,13 @@ import kotlin.jvm.JvmName
4040
*/
4141
public class Buffer : Source, Sink {
4242
@PublishedApi
43-
@get:JvmName("#int#getHead")
44-
@set:JvmName("#int#setHead")
43+
@get:JvmSynthetic
44+
@set:JvmSynthetic
4545
internal var head: Segment? = null
4646

4747
@PublishedApi
48-
@get:JvmName("#int#getTail")
49-
@set:JvmName("#int#setTail")
48+
@get:JvmSynthetic
49+
@set:JvmSynthetic
5050
internal var tail: Segment? = null
5151

5252
/**
@@ -56,8 +56,8 @@ public class Buffer : Source, Sink {
5656
get() = sizeMut
5757

5858
@PublishedApi
59-
@get:JvmName("#int#getSize")
60-
@set:JvmName("#int#setSize")
59+
@get:JvmSynthetic
60+
@set:JvmSynthetic
6161
internal var sizeMut: Long = 0L
6262

6363
/**
@@ -380,7 +380,7 @@ public class Buffer : Source, Sink {
380380
* bytes to, creating it if necessary.
381381
*/
382382
@PublishedApi
383-
@JvmName("#int#writableSegment")
383+
@JvmSynthetic
384384
internal fun writableSegment(minimumCapacity: Int): Segment {
385385
require(minimumCapacity >= 1 && minimumCapacity <= Segment.SIZE) { "unexpected capacity" }
386386

@@ -690,7 +690,7 @@ public class Buffer : Source, Sink {
690690
* It's up to a caller to ensure that the tail exists.
691691
*/
692692
@PublishedApi
693-
@JvmName("#int#recycleTail")
693+
@JvmSynthetic
694694
internal fun recycleTail() {
695695
val oldTail = tail!!
696696
val newTail = oldTail.prev

core/common/src/Segment.kt

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
package kotlinx.io
2222

2323
import kotlin.jvm.JvmField
24-
import kotlin.jvm.JvmName
24+
import kotlin.jvm.JvmSynthetic
2525

2626
/**
2727
* A segment of a buffer.
@@ -43,8 +43,8 @@ public class Segment {
4343

4444
/** The next byte of application data byte to read in this segment. */
4545
@PublishedApi
46-
@get:JvmName("#int#getPos")
47-
@set:JvmName("#int#setPos")
46+
@get:JvmSynthetic
47+
@set:JvmSynthetic
4848
internal var pos: Int = 0
4949

5050
/**
@@ -54,8 +54,8 @@ public class Segment {
5454
* byte count of this and next segments.
5555
*/
5656
@PublishedApi
57-
@get:JvmName("#int#getLimit")
58-
@set:JvmName("#int#setLimit")
57+
@get:JvmSynthetic
58+
@set:JvmSynthetic
5959
internal var limit: Int = 0
6060

6161
/** True if other segments or byte strings use the same byte array. */
@@ -68,8 +68,8 @@ public class Segment {
6868

6969
/** Next segment in a list, or null. */
7070
@PublishedApi
71-
@get:JvmName("#int#getNext")
72-
@set:JvmName("#int#setNext")
71+
@get:JvmSynthetic
72+
@set:JvmSynthetic
7373
internal var next: Segment? = null
7474

7575
/** Previous segment in the list, or null. */
@@ -204,12 +204,12 @@ public class Segment {
204204
}
205205

206206
@PublishedApi
207-
@get:JvmName("#int#size")
207+
@get:JvmSynthetic
208208
internal val size: Int
209209
get() = limit - pos
210210

211211
@PublishedApi
212-
@get:JvmName("#int#remainingCapacity")
212+
@get:JvmSynthetic
213213
internal val remainingCapacity: Int
214214
get() = data.size - limit
215215

@@ -224,7 +224,7 @@ public class Segment {
224224
* container eventually changes from ByteArray to something else.
225225
*/
226226
@PublishedApi
227-
@JvmName("#int#dataAsByteArray")
227+
@JvmSynthetic
228228
@Suppress("UNUSED_PARAMETER")
229229
internal fun dataAsByteArray(readOnly: Boolean): ByteArray = data
230230

@@ -235,7 +235,7 @@ public class Segment {
235235
* container eventually changes from ByteArray to something else.
236236
*/
237237
@PublishedApi
238-
@JvmName("#int#dataWriteBack")
238+
@JvmSynthetic
239239
@Suppress("UNUSED_PARAMETER")
240240
internal fun writeBackData(data: ByteArray, bytesToCommit: Int): Unit = Unit
241241

@@ -246,10 +246,10 @@ public class Segment {
246246
/** Segments will be shared when doing so avoids `arraycopy()` of this many bytes. */
247247
internal const val SHARE_MINIMUM = 1024
248248

249-
@JvmName("#int#newSegment")
249+
@JvmSynthetic
250250
internal fun new(): Segment = Segment()
251251

252-
@JvmName("#int#newSegment")
252+
@JvmSynthetic
253253
internal fun new(data: ByteArray, pos: Int, limit: Int, shared: Boolean, owner: Boolean): Segment
254254
= Segment(data, pos, limit, shared, owner)
255255
}

0 commit comments

Comments
 (0)