MstExpression

class MstExpression<T, out A : Algebra<T>>(algebra: A, mst: MST) : Expression<T>

The expression evaluates MST on-flight. Should be much faster than functional expression, but slower than ASM-generated expressions.

Author

Alexander Nozik

Constructors

MstExpression
Link copied to clipboard
common
fun <out A : Algebra<T>> MstExpression(algebra: A, mst: MST)

Functions

equals
Link copied to clipboard
common
open operator fun equals(other: Any?): Boolean
hashCode
Link copied to clipboard
common
open fun hashCode(): Int
invoke
Link copied to clipboard
common
open operator override fun invoke(arguments: Map<Symbol, T>): T
toString
Link copied to clipboard
common
open fun toString(): String

Properties

algebra
Link copied to clipboard
common
val algebra: A
the algebra that provides operations.
mst
Link copied to clipboard
common
val mst: MST
the MST node.

Extensions

compile
Link copied to clipboard
inline fun <T : Any> MstExpression<T, Algebra<T>>.compile(): Expression<T>
Optimizes performance of an MstExpression using ASM codegen.
js
fun <T : Any> MstExpression<T, <ERROR CLASS><T>>.compile(): <ERROR CLASS><T>
Optimizes performance of an MstExpression by compiling it into ESTree generated expression.