Package-level declarations

Types

Link copied to clipboard
class ConcreteNumberSet(var values: MutableSet<Long> = mutableSetOf()) : NumberSet
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

This ValueEvaluator can resolve multiple possible values of a node.

Link copied to clipboard
interface NumberSet
Link copied to clipboard

Simple evaluation of the size of an object. Right now, it can only support a statically given size of arrays and strings.

Link copied to clipboard
open class ValueEvaluator(val cannotEvaluate: (Node?, ValueEvaluator) -> Any? = { node: Node?, _: ValueEvaluator -> // end of the line, lets just keep the expression name if (node != null) { "{${node.name}}" } else { CouldNotResolve() } })

The value evaluator tries to evaluate the (constant) value of an Expression basically by following DFG edges until we reach a Literal. It also evaluates simple binary operations, such as arithmetic operations, as well as simple string concatenations.

Functions

Link copied to clipboard
fun <T : Number> Number.compareTo(other: T): Int

This function is a piece of pure magic. It is one of the missing pieces in the Kotlin language and compares an arbitrary Number with another Number using the dedicated compareTo functions for the individual implementations of Number, such as Int.compareTo.