-
Notifications
You must be signed in to change notification settings - Fork 47
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
b7a54cb
commit 8dd5d45
Showing
5 changed files
with
9 additions
and
8 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
4 changes: 2 additions & 2 deletions
4
...n-runtime/src/jsAndWasmSharedMain/kotlin/com/strumenta/antlrkotlin/runtime/WeakHashMap.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 |
---|---|---|
@@ -1,8 +1,8 @@ | ||
// Copyright 2017-present Strumenta and contributors, licensed under Apache 2.0. | ||
// Copyright 2024-present Strumenta and contributors, licensed under BSD 3-Clause. | ||
|
||
package com.strumenta.antlrkotlin.runtime | ||
|
||
// Note(Edoardo): this is implemented as an HashMap in the JS target, | ||
// so let's keep it as it is | ||
public actual typealias WeakHashMap<K, V> = HashMap<K, V> | ||
@Suppress("ACTUAL_WITHOUT_EXPECT") | ||
internal actual typealias WeakHashMap<K, V> = HashMap<K, V> |
4 changes: 2 additions & 2 deletions
4
antlr-kotlin-runtime/src/jvmMain/kotlin/com/strumenta/antlrkotlin/runtime/WeakHashMap.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 |
---|---|---|
@@ -1,8 +1,8 @@ | ||
// Copyright 2017-present Strumenta and contributors, licensed under Apache 2.0. | ||
// Copyright 2024-present Strumenta and contributors, licensed under BSD 3-Clause. | ||
|
||
package com.strumenta.antlrkotlin.runtime | ||
|
||
import java.util.WeakHashMap as JavaWeakHashMap | ||
|
||
public actual typealias WeakHashMap<K, V> = JavaWeakHashMap<K, V> | ||
@Suppress("ACTUAL_WITHOUT_EXPECT") | ||
internal actual typealias WeakHashMap<K, V> = JavaWeakHashMap<K, V> |
4 changes: 2 additions & 2 deletions
4
antlr-kotlin-runtime/src/nativeMain/kotlin/com/strumenta/antlrkotlin/runtime/WeakHashMap.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 |
---|---|---|
@@ -1,9 +1,9 @@ | ||
// Copyright 2017-present Strumenta and contributors, licensed under Apache 2.0. | ||
// Copyright 2024-present Strumenta and contributors, licensed under BSD 3-Clause. | ||
|
||
package com.strumenta.antlrkotlin.runtime | ||
|
||
// TODO(Edoardo): implement real weak keys. | ||
// See kotlinlang.org/api/latest/jvm/stdlib/kotlin.native.ref | ||
// for classes and functions useful for a possible implementation | ||
public actual typealias WeakHashMap<K, V> = HashMap<K, V> | ||
@Suppress("ACTUAL_WITHOUT_EXPECT") | ||
internal actual typealias WeakHashMap<K, V> = HashMap<K, V> |
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