-
Notifications
You must be signed in to change notification settings - Fork 449
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(deps): update all dependencies (#3368)
Co-authored-by: Alejandro Serrano <trupill@gmail.com>
- Loading branch information
1 parent
08f1540
commit a616f26
Showing
47 changed files
with
214 additions
and
210 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
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
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
25 changes: 25 additions & 0 deletions
25
arrow-libs/core/arrow-atomic/src/wasmJsMain/kotlin/arrow/atomic/Atomic.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,25 @@ | ||
package arrow.atomic | ||
|
||
public actual class Atomic<V> actual constructor(initialValue: V) { | ||
private var internalValue: V = initialValue | ||
|
||
public actual fun get(): V = internalValue | ||
|
||
public actual fun set(value: V) { | ||
internalValue = value | ||
} | ||
|
||
public actual fun compareAndSet(expected: V, new: V): Boolean = | ||
if (expected === internalValue) { | ||
internalValue = new | ||
true | ||
} else { | ||
false | ||
} | ||
|
||
public actual fun getAndSet(value: V): V { | ||
val old = internalValue | ||
internalValue = value | ||
return old | ||
} | ||
} |
34 changes: 34 additions & 0 deletions
34
arrow-libs/core/arrow-atomic/src/wasmJsMain/kotlin/arrow/atomic/AtomicInt.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,34 @@ | ||
package arrow.atomic | ||
|
||
public actual class AtomicInt actual constructor(initialValue: Int) { | ||
private var internalValue: Int = initialValue | ||
|
||
public actual fun get(): Int = internalValue | ||
|
||
public actual fun set(newValue: Int) { | ||
internalValue = newValue | ||
} | ||
|
||
public actual fun addAndGet(delta: Int): Int { | ||
internalValue += delta | ||
return internalValue | ||
} | ||
|
||
public actual fun incrementAndGet(): Int = addAndGet(1) | ||
|
||
public actual fun decrementAndGet(): Int = addAndGet(-1) | ||
|
||
public actual fun compareAndSet(expected: Int, new: Int): Boolean = | ||
if (expected == internalValue) { | ||
internalValue = new | ||
true | ||
} else { | ||
false | ||
} | ||
|
||
public actual fun getAndSet(value: Int): Int { | ||
val current = internalValue | ||
internalValue = value | ||
return current | ||
} | ||
} |
34 changes: 34 additions & 0 deletions
34
arrow-libs/core/arrow-atomic/src/wasmJsMain/kotlin/arrow/atomic/AtomicLong.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,34 @@ | ||
package arrow.atomic | ||
|
||
public actual class AtomicLong actual constructor(initialValue: Long) { | ||
private var internalValue: Long = initialValue | ||
|
||
public actual fun get(): Long = internalValue | ||
|
||
public actual fun set(newValue: Long) { | ||
internalValue = newValue | ||
} | ||
|
||
public actual fun addAndGet(delta: Long): Long { | ||
internalValue += delta | ||
return internalValue | ||
} | ||
|
||
public actual fun incrementAndGet(): Long = addAndGet(1) | ||
|
||
public actual fun decrementAndGet(): Long = addAndGet(-1) | ||
|
||
public actual fun compareAndSet(expected: Long, new: Long): Boolean = | ||
if (expected == internalValue) { | ||
internalValue = new | ||
true | ||
} else { | ||
false | ||
} | ||
|
||
public actual fun getAndSet(value: Long): Long { | ||
val current = internalValue | ||
internalValue = value | ||
return current | ||
} | ||
} |
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
4 changes: 0 additions & 4 deletions
4
arrow-libs/core/arrow-autoclose/src/nativeMain/kotlin/arrow/throwIfFatal.kt
This file was deleted.
Oops, something went wrong.
File renamed without changes.
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
31 changes: 31 additions & 0 deletions
31
...s/core/arrow-continuations/src/wasmJsMain/kotlin/arrow/continuations/generic/AtomicRef.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,31 @@ | ||
package arrow.continuations.generic | ||
|
||
@Deprecated(deprecateArrowContinuation) | ||
public actual class AtomicRef<V> actual constructor(initialValue: V) { | ||
private var internalValue: V = initialValue | ||
|
||
/** | ||
* Compare current value with expected and set to new if they're the same. Note, 'compare' is checking | ||
* the actual object id, not 'equals'. | ||
*/ | ||
public actual fun compareAndSet(expected: V, new: V): Boolean { | ||
return if (expected === internalValue) { | ||
internalValue = new | ||
true | ||
} else { | ||
false | ||
} | ||
} | ||
|
||
public actual fun getAndSet(value: V): V { | ||
val oldValue = internalValue | ||
internalValue = value | ||
return oldValue | ||
} | ||
|
||
public actual fun get(): V = internalValue | ||
|
||
public actual fun set(value: V) { | ||
internalValue = value | ||
} | ||
} |
10 changes: 10 additions & 0 deletions
10
...arrow-continuations/src/wasmJsMain/kotlin/arrow/continuations/generic/ControlThrowable.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,10 @@ | ||
package arrow.continuations.generic | ||
|
||
/** | ||
* A [Throwable] class intended for control flow. | ||
* Instance of [ControlThrowable] should **not** be caught, | ||
* and `arrow.core.NonFatal` does not catch this [Throwable]. | ||
* By extension, `Either.catch` and `Raise.catch` also don't catch [ControlThrowable]. | ||
*/ | ||
@Deprecated(deprecateArrowContinuation) | ||
public actual open class ControlThrowable : Throwable() |
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
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
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
7 changes: 0 additions & 7 deletions
7
arrow-libs/core/arrow-core/src/nativeMain/kotlin/arrow/core/ArrowCoreInternalException.kt
This file was deleted.
Oops, something went wrong.
10 changes: 0 additions & 10 deletions
10
arrow-libs/core/arrow-core/src/nativeMain/kotlin/arrow/core/NonFatal.kt
This file was deleted.
Oops, something went wrong.
13 changes: 0 additions & 13 deletions
13
arrow-libs/core/arrow-core/src/nativeMain/kotlin/arrow/core/composition-native.kt
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.