From b4b8f30b2ae7ab2f24341ad6532af2fb227dcf98 Mon Sep 17 00:00:00 2001 From: Alexander Nozik Date: Tue, 24 Dec 2024 12:51:15 +0300 Subject: [PATCH] Remove hardcoded reference to SymbolIndexer in asm --- .../space/kscience/kmath/asm/internal/PrimitiveAsmBuilder.kt | 4 ++-- .../kotlin/space/kscience/kmath/expressions/SymbolIndexer.kt | 2 -- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/kmath-ast/src/jvmMain/kotlin/space/kscience/kmath/asm/internal/PrimitiveAsmBuilder.kt b/kmath-ast/src/jvmMain/kotlin/space/kscience/kmath/asm/internal/PrimitiveAsmBuilder.kt index 277251433..3bdfbed32 100644 --- a/kmath-ast/src/jvmMain/kotlin/space/kscience/kmath/asm/internal/PrimitiveAsmBuilder.kt +++ b/kmath-ast/src/jvmMain/kotlin/space/kscience/kmath/asm/internal/PrimitiveAsmBuilder.kt @@ -372,12 +372,12 @@ internal sealed class PrimitiveAsmBuilder>( /** * ASM type for [java.lang.Number]. */ - val NUMBER_TYPE: Type = getObjectType("java/lang/Number") + val NUMBER_TYPE: Type = getType(Number::class.java) /** * ASM type for [SymbolIndexer]. */ - val SYMBOL_INDEXER_TYPE: Type = getObjectType("space/kscience/kmath/expressions/SymbolIndexer") + val SYMBOL_INDEXER_TYPE: Type = getType(SymbolIndexer::class.java) } } diff --git a/kmath-core/src/commonMain/kotlin/space/kscience/kmath/expressions/SymbolIndexer.kt b/kmath-core/src/commonMain/kotlin/space/kscience/kmath/expressions/SymbolIndexer.kt index 983a3435a..b09cdf6d0 100644 --- a/kmath-core/src/commonMain/kotlin/space/kscience/kmath/expressions/SymbolIndexer.kt +++ b/kmath-core/src/commonMain/kotlin/space/kscience/kmath/expressions/SymbolIndexer.kt @@ -14,8 +14,6 @@ import kotlin.contracts.InvocationKind import kotlin.contracts.contract import kotlin.jvm.JvmInline -//DO NOT MOVE THIS CLASS if you do not want ASM module to break - /** * An environment to easy transform indexed variables to symbols and back. * TODO requires multi-receivers to be beautiful