diff --git a/lynglib/src/androidMain/kotlin/net/sergeych/lyng/bytecode/CmdCallSiteCacheAndroid.kt b/lynglib/src/androidMain/kotlin/net/sergeych/lyng/bytecode/CmdCallSiteCacheAndroid.kt deleted file mode 100644 index 897335d..0000000 --- a/lynglib/src/androidMain/kotlin/net/sergeych/lyng/bytecode/CmdCallSiteCacheAndroid.kt +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Copyright 2026 Sergey S. Chernov - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package net.sergeych.lyng.bytecode - -import java.util.IdentityHashMap - -internal actual object CmdCallSiteCache { - private val cache = ThreadLocal.withInitial { - IdentityHashMap>() - } - - actual fun methodCallSites(fn: CmdFunction): MutableMap { - val map = cache.get() - return map.getOrPut(fn) { mutableMapOf() } - } -} diff --git a/lynglib/src/commonMain/kotlin/net/sergeych/lyng/Compiler.kt b/lynglib/src/commonMain/kotlin/net/sergeych/lyng/Compiler.kt index a2bc48d..85e6ff7 100644 --- a/lynglib/src/commonMain/kotlin/net/sergeych/lyng/Compiler.kt +++ b/lynglib/src/commonMain/kotlin/net/sergeych/lyng/Compiler.kt @@ -1079,7 +1079,9 @@ class Compiler( block, "