Skip to content

Commit

Permalink
Remove old memory model annotations
Browse files Browse the repository at this point in the history
  • Loading branch information
JakeWharton committed Nov 27, 2024
1 parent 15ce74b commit 69be55f
Show file tree
Hide file tree
Showing 5 changed files with 0 additions and 15 deletions.
3 changes: 0 additions & 3 deletions okio/src/commonMain/kotlin/okio/Base64.kt
Original file line number Diff line number Diff line change
Expand Up @@ -19,16 +19,13 @@
package okio

import kotlin.jvm.JvmName
import kotlin.native.concurrent.SharedImmutable
import okio.ByteString.Companion.encodeUtf8

/** @author Alexander Y. Kleymenov */

@SharedImmutable
internal val BASE64 =
"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".encodeUtf8().data

@SharedImmutable
internal val BASE64_URL_SAFE =
"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_".encodeUtf8().data

Expand Down
2 changes: 0 additions & 2 deletions okio/src/commonMain/kotlin/okio/Util.kt
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
package okio

import kotlin.jvm.JvmName
import kotlin.native.concurrent.SharedImmutable
import okio.internal.HEX_DIGIT_CHARS

internal fun checkOffsetAndCount(size: Long, offset: Long, byteCount: Long) {
Expand Down Expand Up @@ -167,7 +166,6 @@ internal fun Long.toHexString(): String {
// for them in the receiving function, then swap in the true default value.
// https://youtrack.jetbrains.com/issue/KT-45542

@SharedImmutable
internal val DEFAULT__new_UnsafeCursor = Buffer.UnsafeCursor()
internal fun resolveDefaultParameter(unsafeCursor: Buffer.UnsafeCursor): Buffer.UnsafeCursor {
if (unsafeCursor === DEFAULT__new_UnsafeCursor) return Buffer.UnsafeCursor()
Expand Down
2 changes: 0 additions & 2 deletions okio/src/commonMain/kotlin/okio/internal/Buffer.kt
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
package okio.internal

import kotlin.jvm.JvmName
import kotlin.native.concurrent.SharedImmutable
import okio.ArrayIndexOutOfBoundsException
import okio.Buffer
import okio.Buffer.UnsafeCursor
Expand All @@ -41,7 +40,6 @@ import okio.minOf
import okio.resolveDefaultParameter
import okio.toHexString

@SharedImmutable
internal val HEX_DIGIT_BYTES = "0123456789abcdef".asUtf8ToByteArray()

// Threshold determined empirically via ReadByteStringBenchmark
Expand Down
2 changes: 0 additions & 2 deletions okio/src/commonMain/kotlin/okio/internal/ByteString.kt
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
package okio.internal

import kotlin.jvm.JvmName
import kotlin.native.concurrent.SharedImmutable
import okio.BASE64_URL_SAFE
import okio.Buffer
import okio.ByteString
Expand Down Expand Up @@ -55,7 +54,6 @@ internal inline fun ByteString.commonBase64(): String = data.encodeBase64()
@Suppress("NOTHING_TO_INLINE")
internal inline fun ByteString.commonBase64Url() = data.encodeBase64(map = BASE64_URL_SAFE)

@SharedImmutable
internal val HEX_DIGIT_CHARS =
charArrayOf('0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'a', 'b', 'c', 'd', 'e', 'f')

Expand Down
6 changes: 0 additions & 6 deletions okio/src/commonMain/kotlin/okio/internal/Path.kt
Original file line number Diff line number Diff line change
Expand Up @@ -18,26 +18,20 @@
package okio.internal

import kotlin.jvm.JvmName
import kotlin.native.concurrent.SharedImmutable
import okio.Buffer
import okio.ByteString
import okio.ByteString.Companion.encodeUtf8
import okio.Path
import okio.Path.Companion.toPath

@SharedImmutable
private val SLASH = "/".encodeUtf8()

@SharedImmutable
private val BACKSLASH = "\\".encodeUtf8()

@SharedImmutable
private val ANY_SLASH = "/\\".encodeUtf8()

@SharedImmutable
private val DOT = ".".encodeUtf8()

@SharedImmutable
private val DOT_DOT = "..".encodeUtf8()

@Suppress("NOTHING_TO_INLINE")
Expand Down

0 comments on commit 69be55f

Please sign in to comment.