This repository has been archived by the owner on Jul 8, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 37
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Simplify project structure so any source set has only one parent
- Loading branch information
1 parent
8a78882
commit d66797b
Showing
13 changed files
with
87 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
4 changes: 4 additions & 0 deletions
4
kds/src/jvmAndroidMain/kotlin/com/soywiz/kds/atomic/Frozen.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
package com.soywiz.kds.atomic | ||
|
||
actual fun <T> kdsFreeze(value: T): T = value | ||
actual fun <T> kdsIsFrozen(value: T): Boolean = false |
File renamed without changes.
File renamed without changes.
66 changes: 66 additions & 0 deletions
66
kmem/src/jvmAndroidMain/kotlin/com/soywiz/kmem/FastTransferNonNative.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
package com.soywiz.kmem | ||
|
||
@PublishedApi internal val EmptyByteArray = ByteArray(1) | ||
@PublishedApi internal val EmptyShortArray = ShortArray(1) | ||
@PublishedApi internal val EmptyIntArray = IntArray(1) | ||
@PublishedApi internal val EmptyFloatArray = FloatArray(1) | ||
|
||
public actual class FastByteTransfer actual constructor() { | ||
@PublishedApi internal var ptr: ByteArray = EmptyByteArray | ||
|
||
public actual inline operator fun get(index: Int): Byte = ptr[index] | ||
public actual inline operator fun set(index: Int, value: Byte) { ptr[index] = value } | ||
public actual inline fun use(array: ByteArray, block: (FastByteTransfer) -> Unit) { | ||
try { | ||
ptr = array | ||
block(this) | ||
} finally { | ||
ptr = EmptyByteArray | ||
} | ||
} | ||
} | ||
|
||
public actual class FastShortTransfer actual constructor() { | ||
@PublishedApi internal var ptr: ShortArray = EmptyShortArray | ||
|
||
public actual inline operator fun get(index: Int): Short = ptr[index] | ||
public actual inline operator fun set(index: Int, value: Short) { ptr[index] = value } | ||
public actual inline fun use(array: ShortArray, block: (FastShortTransfer) -> Unit) { | ||
try { | ||
ptr = array | ||
block(this) | ||
} finally { | ||
ptr = EmptyShortArray | ||
} | ||
} | ||
} | ||
|
||
public actual class FastIntTransfer actual constructor() { | ||
@PublishedApi internal var ptr: IntArray = EmptyIntArray | ||
|
||
public actual inline operator fun get(index: Int): Int = ptr[index] | ||
public actual inline operator fun set(index: Int, value: Int) { ptr[index] = value } | ||
public actual inline fun use(array: IntArray, block: (FastIntTransfer) -> Unit) { | ||
try { | ||
ptr = array | ||
block(this) | ||
} finally { | ||
ptr = EmptyIntArray | ||
} | ||
} | ||
} | ||
|
||
public actual class FastFloatTransfer actual constructor() { | ||
@PublishedApi internal var ptr: FloatArray = EmptyFloatArray | ||
|
||
public actual inline operator fun get(index: Int): Float = ptr[index] | ||
public actual inline operator fun set(index: Int, value: Float) { ptr[index] = value } | ||
public actual inline fun use(array: FloatArray, block: (FastFloatTransfer) -> Unit) { | ||
try { | ||
ptr = array | ||
block(this) | ||
} finally { | ||
ptr = EmptyFloatArray | ||
} | ||
} | ||
} |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
4 changes: 4 additions & 0 deletions
4
korio/src/nativeCommonMain/kotlin/com/soywiz/korio/lang/PropertiesNonJvm.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
package com.soywiz.korio.lang | ||
|
||
actual object SystemProperties : Properties() { | ||
} |
5 changes: 5 additions & 0 deletions
5
korio/src/nativeCommonMain/kotlin/com/soywiz/korio/net/ssl/SSLProcessorNoJvm.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
package com.soywiz.korio.net.ssl | ||
|
||
import com.soywiz.korio.util.* | ||
|
||
actual fun DefaultSSLProcessor(): SSLProcessor = TODO("DefaultSSLProcessor not implemented in ${OS.rawName}") |