Fix binaryen module creation

This commit is contained in:
Alexander Nozik 2022-06-12 15:30:10 +03:00
parent e1276b684f
commit fabad733f4
No known key found for this signature in database
GPG Key ID: F7FCF2DD25C71357

View File

@ -71,7 +71,7 @@ internal sealed class WasmBuilder<T : Number, out E : Expression<T>>(
protected open fun visitBinary(mst: TypedMst.Binary<T>): ExpressionRef =
error("Binary operation ${mst.operation} not defined in $this")
protected open fun createModule(): BinaryenModule = js("new \$module\$binaryen.Module()")
protected open fun createModule(): BinaryenModule = space.kscience.kmath.internal.binaryen.Module()
protected fun visit(node: TypedMst<T>): ExpressionRef = when (node) {
is TypedMst.Constant -> visitNumber(