ASM Bytecode Generation to unwrap Expressions of adv-expr API #94

Merged
CommanderTvis merged 44 commits from adv-expr into adv-expr 2020-06-13 21:07:15 +03:00
5 changed files with 42 additions and 19 deletions
Showing only changes of commit af410dde70 - Show all commits

View File

@ -18,9 +18,10 @@ internal fun buildName(expression: AsmExpression<*>, collision: Int = 0): String
return buildName(expression, collision + 1)
}
inline fun <reified T> AsmExpression<T>.compile(algebra: Algebra<T>): Expression<T> {
@PublishedApi
internal inline fun <reified T> AsmExpression<T>.compile(algebra: Algebra<T>): Expression<T> {
val ctx = AsmGenerationContext(T::class.java, algebra, buildName(this))
invoke(ctx)
compile(ctx)
return ctx.generate()
}

View File

@ -1,14 +1,31 @@
altavir commented 2020-06-13 19:27:11 +03:00 (Migrated from github.com)
Review

Add documentation since the interface is public.

Add documentation since the interface is public.
altavir commented 2020-06-13 19:27:11 +03:00 (Migrated from github.com)
Review

Add documentation since the interface is public.

Add documentation since the interface is public.
altavir commented 2020-06-13 20:02:04 +03:00 (Migrated from github.com)
Review

does it make sense to do invoke without operator? It seems that it should be renamed to compile. Those method need to be documented as well.

does it make sense to do invoke without `operator`? It seems that it should be renamed to `compile`. Those method need to be documented as well.
altavir commented 2020-06-13 20:02:04 +03:00 (Migrated from github.com)
Review

does it make sense to do invoke without operator? It seems that it should be renamed to compile. Those method need to be documented as well.

does it make sense to do invoke without `operator`? It seems that it should be renamed to `compile`. Those method need to be documented as well.
CommanderTvis commented 2020-06-13 20:03:12 +03:00 (Migrated from github.com)
Review

OK

OK
CommanderTvis commented 2020-06-13 20:03:12 +03:00 (Migrated from github.com)
Review

OK

OK
CommanderTvis commented 2020-06-13 20:03:14 +03:00 (Migrated from github.com)
Review

OK

OK
CommanderTvis commented 2020-06-13 20:03:14 +03:00 (Migrated from github.com)
Review

OK

OK
altavir commented 2020-06-13 20:05:35 +03:00 (Migrated from github.com)
Review

It seems like compile is a better name.

It seems like `compile` is a better name.
altavir commented 2020-06-13 20:05:35 +03:00 (Migrated from github.com)
Review

It seems like compile is a better name.

It seems like `compile` is a better name.
package scientifik.kmath.asm
import scientifik.kmath.asm.internal.hasSpecific
altavir commented 2020-06-13 19:27:11 +03:00 (Migrated from github.com)
Review

Add documentation since the interface is public.

Add documentation since the interface is public.
altavir commented 2020-06-13 20:02:04 +03:00 (Migrated from github.com)
Review

does it make sense to do invoke without operator? It seems that it should be renamed to compile. Those method need to be documented as well.

does it make sense to do invoke without `operator`? It seems that it should be renamed to `compile`. Those method need to be documented as well.
CommanderTvis commented 2020-06-13 20:03:12 +03:00 (Migrated from github.com)
Review

OK

OK
CommanderTvis commented 2020-06-13 20:03:14 +03:00 (Migrated from github.com)
Review

OK

OK
altavir commented 2020-06-13 20:05:35 +03:00 (Migrated from github.com)
Review

It seems like compile is a better name.

It seems like `compile` is a better name.
import scientifik.kmath.asm.internal.optimize
altavir commented 2020-06-13 19:27:11 +03:00 (Migrated from github.com)
Review

Add documentation since the interface is public.

Add documentation since the interface is public.
altavir commented 2020-06-13 20:02:04 +03:00 (Migrated from github.com)
Review

does it make sense to do invoke without operator? It seems that it should be renamed to compile. Those method need to be documented as well.

does it make sense to do invoke without `operator`? It seems that it should be renamed to `compile`. Those method need to be documented as well.
CommanderTvis commented 2020-06-13 20:03:12 +03:00 (Migrated from github.com)
Review

OK

OK
CommanderTvis commented 2020-06-13 20:03:14 +03:00 (Migrated from github.com)
Review

OK

OK
altavir commented 2020-06-13 20:05:35 +03:00 (Migrated from github.com)
Review

It seems like compile is a better name.

It seems like `compile` is a better name.
import scientifik.kmath.asm.internal.tryInvokeSpecific
altavir commented 2020-06-13 19:27:11 +03:00 (Migrated from github.com)
Review

Add documentation since the interface is public.

Add documentation since the interface is public.
altavir commented 2020-06-13 20:02:04 +03:00 (Migrated from github.com)
Review

does it make sense to do invoke without operator? It seems that it should be renamed to compile. Those method need to be documented as well.

does it make sense to do invoke without `operator`? It seems that it should be renamed to `compile`. Those method need to be documented as well.
CommanderTvis commented 2020-06-13 20:03:12 +03:00 (Migrated from github.com)
Review

OK

OK
CommanderTvis commented 2020-06-13 20:03:14 +03:00 (Migrated from github.com)
Review

OK

OK
altavir commented 2020-06-13 20:05:35 +03:00 (Migrated from github.com)
Review

It seems like compile is a better name.

It seems like `compile` is a better name.
import scientifik.kmath.expressions.Expression
import scientifik.kmath.expressions.ExpressionAlgebra
import scientifik.kmath.operations.*
import kotlin.reflect.full.memberFunctions
altavir commented 2020-06-13 19:27:11 +03:00 (Migrated from github.com)
Review

Add documentation since the interface is public.

Add documentation since the interface is public.
altavir commented 2020-06-13 20:02:04 +03:00 (Migrated from github.com)
Review

does it make sense to do invoke without operator? It seems that it should be renamed to compile. Those method need to be documented as well.

does it make sense to do invoke without `operator`? It seems that it should be renamed to `compile`. Those method need to be documented as well.
CommanderTvis commented 2020-06-13 20:03:12 +03:00 (Migrated from github.com)
Review

OK

OK
CommanderTvis commented 2020-06-13 20:03:14 +03:00 (Migrated from github.com)
Review

OK

OK
altavir commented 2020-06-13 20:05:35 +03:00 (Migrated from github.com)
Review

It seems like compile is a better name.

It seems like `compile` is a better name.
import kotlin.reflect.jvm.jvmName
altavir commented 2020-06-13 19:27:11 +03:00 (Migrated from github.com)
Review

Add documentation since the interface is public.

Add documentation since the interface is public.
altavir commented 2020-06-13 20:02:04 +03:00 (Migrated from github.com)
Review

does it make sense to do invoke without operator? It seems that it should be renamed to compile. Those method need to be documented as well.

does it make sense to do invoke without `operator`? It seems that it should be renamed to `compile`. Those method need to be documented as well.
CommanderTvis commented 2020-06-13 20:03:12 +03:00 (Migrated from github.com)
Review

OK

OK
CommanderTvis commented 2020-06-13 20:03:14 +03:00 (Migrated from github.com)
Review

OK

OK
altavir commented 2020-06-13 20:05:35 +03:00 (Migrated from github.com)
Review

It seems like compile is a better name.

It seems like `compile` is a better name.
/**
altavir commented 2020-06-13 19:27:11 +03:00 (Migrated from github.com)
Review

Add documentation since the interface is public.

Add documentation since the interface is public.
altavir commented 2020-06-13 20:02:04 +03:00 (Migrated from github.com)
Review

does it make sense to do invoke without operator? It seems that it should be renamed to compile. Those method need to be documented as well.

does it make sense to do invoke without `operator`? It seems that it should be renamed to `compile`. Those method need to be documented as well.
CommanderTvis commented 2020-06-13 20:03:12 +03:00 (Migrated from github.com)
Review

OK

OK
CommanderTvis commented 2020-06-13 20:03:14 +03:00 (Migrated from github.com)
Review

OK

OK
altavir commented 2020-06-13 20:05:35 +03:00 (Migrated from github.com)
Review

It seems like compile is a better name.

It seems like `compile` is a better name.
* A function declaration that could be compiled to [AsmGenerationContext].
altavir commented 2020-06-13 19:27:11 +03:00 (Migrated from github.com)
Review

Add documentation since the interface is public.

Add documentation since the interface is public.
altavir commented 2020-06-13 20:02:04 +03:00 (Migrated from github.com)
Review

does it make sense to do invoke without operator? It seems that it should be renamed to compile. Those method need to be documented as well.

does it make sense to do invoke without `operator`? It seems that it should be renamed to `compile`. Those method need to be documented as well.
CommanderTvis commented 2020-06-13 20:03:12 +03:00 (Migrated from github.com)
Review

OK

OK
CommanderTvis commented 2020-06-13 20:03:14 +03:00 (Migrated from github.com)
Review

OK

OK
altavir commented 2020-06-13 20:05:35 +03:00 (Migrated from github.com)
Review

It seems like compile is a better name.

It seems like `compile` is a better name.
*
altavir commented 2020-06-13 19:27:11 +03:00 (Migrated from github.com)
Review

Add documentation since the interface is public.

Add documentation since the interface is public.
altavir commented 2020-06-13 20:02:04 +03:00 (Migrated from github.com)
Review

does it make sense to do invoke without operator? It seems that it should be renamed to compile. Those method need to be documented as well.

does it make sense to do invoke without `operator`? It seems that it should be renamed to `compile`. Those method need to be documented as well.
CommanderTvis commented 2020-06-13 20:03:12 +03:00 (Migrated from github.com)
Review

OK

OK
CommanderTvis commented 2020-06-13 20:03:14 +03:00 (Migrated from github.com)
Review

OK

OK
altavir commented 2020-06-13 20:05:35 +03:00 (Migrated from github.com)
Review

It seems like compile is a better name.

It seems like `compile` is a better name.
* @param T the type the stored function returns.
altavir commented 2020-06-13 19:27:11 +03:00 (Migrated from github.com)
Review

Add documentation since the interface is public.

Add documentation since the interface is public.
altavir commented 2020-06-13 20:02:04 +03:00 (Migrated from github.com)
Review

does it make sense to do invoke without operator? It seems that it should be renamed to compile. Those method need to be documented as well.

does it make sense to do invoke without `operator`? It seems that it should be renamed to `compile`. Those method need to be documented as well.
CommanderTvis commented 2020-06-13 20:03:12 +03:00 (Migrated from github.com)
Review

OK

OK
CommanderTvis commented 2020-06-13 20:03:14 +03:00 (Migrated from github.com)
Review

OK

OK
altavir commented 2020-06-13 20:05:35 +03:00 (Migrated from github.com)
Review

It seems like compile is a better name.

It seems like `compile` is a better name.
*/
altavir commented 2020-06-13 19:27:11 +03:00 (Migrated from github.com)
Review

Add documentation since the interface is public.

Add documentation since the interface is public.
altavir commented 2020-06-13 20:02:04 +03:00 (Migrated from github.com)
Review

does it make sense to do invoke without operator? It seems that it should be renamed to compile. Those method need to be documented as well.

does it make sense to do invoke without `operator`? It seems that it should be renamed to `compile`. Those method need to be documented as well.
CommanderTvis commented 2020-06-13 20:03:12 +03:00 (Migrated from github.com)
Review

OK

OK
CommanderTvis commented 2020-06-13 20:03:14 +03:00 (Migrated from github.com)
Review

OK

OK
altavir commented 2020-06-13 20:05:35 +03:00 (Migrated from github.com)
Review

It seems like compile is a better name.

It seems like `compile` is a better name.
interface AsmExpression<T> {
/**
altavir commented 2020-06-13 19:27:11 +03:00 (Migrated from github.com)
Review

Add documentation since the interface is public.

Add documentation since the interface is public.
altavir commented 2020-06-13 20:02:04 +03:00 (Migrated from github.com)
Review

does it make sense to do invoke without operator? It seems that it should be renamed to compile. Those method need to be documented as well.

does it make sense to do invoke without `operator`? It seems that it should be renamed to `compile`. Those method need to be documented as well.
CommanderTvis commented 2020-06-13 20:03:12 +03:00 (Migrated from github.com)
Review

OK

OK
CommanderTvis commented 2020-06-13 20:03:14 +03:00 (Migrated from github.com)
Review

OK

OK
altavir commented 2020-06-13 20:05:35 +03:00 (Migrated from github.com)
Review

It seems like compile is a better name.

It seems like `compile` is a better name.
* Tries to evaluate this function without its variables. This method is intended for optimization.
altavir commented 2020-06-13 19:27:11 +03:00 (Migrated from github.com)
Review

Add documentation since the interface is public.

Add documentation since the interface is public.
altavir commented 2020-06-13 20:02:04 +03:00 (Migrated from github.com)
Review

does it make sense to do invoke without operator? It seems that it should be renamed to compile. Those method need to be documented as well.

does it make sense to do invoke without `operator`? It seems that it should be renamed to `compile`. Those method need to be documented as well.
CommanderTvis commented 2020-06-13 20:03:12 +03:00 (Migrated from github.com)
Review

OK

OK
CommanderTvis commented 2020-06-13 20:03:14 +03:00 (Migrated from github.com)
Review

OK

OK
altavir commented 2020-06-13 20:05:35 +03:00 (Migrated from github.com)
Review

It seems like compile is a better name.

It seems like `compile` is a better name.
*
altavir commented 2020-06-13 19:27:11 +03:00 (Migrated from github.com)
Review

Add documentation since the interface is public.

Add documentation since the interface is public.
altavir commented 2020-06-13 20:02:04 +03:00 (Migrated from github.com)
Review

does it make sense to do invoke without operator? It seems that it should be renamed to compile. Those method need to be documented as well.

does it make sense to do invoke without `operator`? It seems that it should be renamed to `compile`. Those method need to be documented as well.
CommanderTvis commented 2020-06-13 20:03:12 +03:00 (Migrated from github.com)
Review

OK

OK
CommanderTvis commented 2020-06-13 20:03:14 +03:00 (Migrated from github.com)
Review

OK

OK
altavir commented 2020-06-13 20:05:35 +03:00 (Migrated from github.com)
Review

It seems like compile is a better name.

It seems like `compile` is a better name.
* @return `null` if the function depends on its variables, the value if the function is a constant.
altavir commented 2020-06-13 19:27:11 +03:00 (Migrated from github.com)
Review

Add documentation since the interface is public.

Add documentation since the interface is public.
altavir commented 2020-06-13 20:02:04 +03:00 (Migrated from github.com)
Review

does it make sense to do invoke without operator? It seems that it should be renamed to compile. Those method need to be documented as well.

does it make sense to do invoke without `operator`? It seems that it should be renamed to `compile`. Those method need to be documented as well.
CommanderTvis commented 2020-06-13 20:03:12 +03:00 (Migrated from github.com)
Review

OK

OK
CommanderTvis commented 2020-06-13 20:03:14 +03:00 (Migrated from github.com)
Review

OK

OK
altavir commented 2020-06-13 20:05:35 +03:00 (Migrated from github.com)
Review

It seems like compile is a better name.

It seems like `compile` is a better name.
*/
altavir commented 2020-06-13 19:27:11 +03:00 (Migrated from github.com)
Review

Add documentation since the interface is public.

Add documentation since the interface is public.
altavir commented 2020-06-13 20:02:04 +03:00 (Migrated from github.com)
Review

does it make sense to do invoke without operator? It seems that it should be renamed to compile. Those method need to be documented as well.

does it make sense to do invoke without `operator`? It seems that it should be renamed to `compile`. Those method need to be documented as well.
CommanderTvis commented 2020-06-13 20:03:12 +03:00 (Migrated from github.com)
Review

OK

OK
CommanderTvis commented 2020-06-13 20:03:14 +03:00 (Migrated from github.com)
Review

OK

OK
altavir commented 2020-06-13 20:05:35 +03:00 (Migrated from github.com)
Review

It seems like compile is a better name.

It seems like `compile` is a better name.
fun tryEvaluate(): T? = null
fun invoke(gen: AsmGenerationContext<T>)
altavir commented 2020-06-13 19:27:11 +03:00 (Migrated from github.com)
Review

Add documentation since the interface is public.

Add documentation since the interface is public.
altavir commented 2020-06-13 20:02:04 +03:00 (Migrated from github.com)
Review

does it make sense to do invoke without operator? It seems that it should be renamed to compile. Those method need to be documented as well.

does it make sense to do invoke without `operator`? It seems that it should be renamed to `compile`. Those method need to be documented as well.
CommanderTvis commented 2020-06-13 20:03:12 +03:00 (Migrated from github.com)
Review

OK

OK
CommanderTvis commented 2020-06-13 20:03:14 +03:00 (Migrated from github.com)
Review

OK

OK
altavir commented 2020-06-13 20:05:35 +03:00 (Migrated from github.com)
Review

It seems like compile is a better name.

It seems like `compile` is a better name.
altavir commented 2020-06-13 19:27:11 +03:00 (Migrated from github.com)
Review

Add documentation since the interface is public.

Add documentation since the interface is public.
altavir commented 2020-06-13 20:02:04 +03:00 (Migrated from github.com)
Review

does it make sense to do invoke without operator? It seems that it should be renamed to compile. Those method need to be documented as well.

does it make sense to do invoke without `operator`? It seems that it should be renamed to `compile`. Those method need to be documented as well.
CommanderTvis commented 2020-06-13 20:03:12 +03:00 (Migrated from github.com)
Review

OK

OK
CommanderTvis commented 2020-06-13 20:03:14 +03:00 (Migrated from github.com)
Review

OK

OK
altavir commented 2020-06-13 20:05:35 +03:00 (Migrated from github.com)
Review

It seems like compile is a better name.

It seems like `compile` is a better name.
/**
altavir commented 2020-06-13 19:27:11 +03:00 (Migrated from github.com)
Review

Add documentation since the interface is public.

Add documentation since the interface is public.
altavir commented 2020-06-13 20:02:04 +03:00 (Migrated from github.com)
Review

does it make sense to do invoke without operator? It seems that it should be renamed to compile. Those method need to be documented as well.

does it make sense to do invoke without `operator`? It seems that it should be renamed to `compile`. Those method need to be documented as well.
CommanderTvis commented 2020-06-13 20:03:12 +03:00 (Migrated from github.com)
Review

OK

OK
CommanderTvis commented 2020-06-13 20:03:14 +03:00 (Migrated from github.com)
Review

OK

OK
altavir commented 2020-06-13 20:05:35 +03:00 (Migrated from github.com)
Review

It seems like compile is a better name.

It seems like `compile` is a better name.
* Compiles this declaration.
altavir commented 2020-06-13 19:27:11 +03:00 (Migrated from github.com)
Review

Add documentation since the interface is public.

Add documentation since the interface is public.
altavir commented 2020-06-13 20:02:04 +03:00 (Migrated from github.com)
Review

does it make sense to do invoke without operator? It seems that it should be renamed to compile. Those method need to be documented as well.

does it make sense to do invoke without `operator`? It seems that it should be renamed to `compile`. Those method need to be documented as well.
CommanderTvis commented 2020-06-13 20:03:12 +03:00 (Migrated from github.com)
Review

OK

OK
CommanderTvis commented 2020-06-13 20:03:14 +03:00 (Migrated from github.com)
Review

OK

OK
altavir commented 2020-06-13 20:05:35 +03:00 (Migrated from github.com)
Review

It seems like compile is a better name.

It seems like `compile` is a better name.
*
altavir commented 2020-06-13 19:27:11 +03:00 (Migrated from github.com)
Review

Add documentation since the interface is public.

Add documentation since the interface is public.
altavir commented 2020-06-13 20:02:04 +03:00 (Migrated from github.com)
Review

does it make sense to do invoke without operator? It seems that it should be renamed to compile. Those method need to be documented as well.

does it make sense to do invoke without `operator`? It seems that it should be renamed to `compile`. Those method need to be documented as well.
CommanderTvis commented 2020-06-13 20:03:12 +03:00 (Migrated from github.com)
Review

OK

OK
CommanderTvis commented 2020-06-13 20:03:14 +03:00 (Migrated from github.com)
Review

OK

OK
altavir commented 2020-06-13 20:05:35 +03:00 (Migrated from github.com)
Review

It seems like compile is a better name.

It seems like `compile` is a better name.
* @param gen the target [AsmGenerationContext].
altavir commented 2020-06-13 19:27:11 +03:00 (Migrated from github.com)
Review

Add documentation since the interface is public.

Add documentation since the interface is public.
altavir commented 2020-06-13 20:02:04 +03:00 (Migrated from github.com)
Review

does it make sense to do invoke without operator? It seems that it should be renamed to compile. Those method need to be documented as well.

does it make sense to do invoke without `operator`? It seems that it should be renamed to `compile`. Those method need to be documented as well.
CommanderTvis commented 2020-06-13 20:03:12 +03:00 (Migrated from github.com)
Review

OK

OK
CommanderTvis commented 2020-06-13 20:03:14 +03:00 (Migrated from github.com)
Review

OK

OK
altavir commented 2020-06-13 20:05:35 +03:00 (Migrated from github.com)
Review

It seems like compile is a better name.

It seems like `compile` is a better name.
*/
altavir commented 2020-06-13 19:27:11 +03:00 (Migrated from github.com)
Review

Add documentation since the interface is public.

Add documentation since the interface is public.
altavir commented 2020-06-13 20:02:04 +03:00 (Migrated from github.com)
Review

does it make sense to do invoke without operator? It seems that it should be renamed to compile. Those method need to be documented as well.

does it make sense to do invoke without `operator`? It seems that it should be renamed to `compile`. Those method need to be documented as well.
CommanderTvis commented 2020-06-13 20:03:12 +03:00 (Migrated from github.com)
Review

OK

OK
CommanderTvis commented 2020-06-13 20:03:14 +03:00 (Migrated from github.com)
Review

OK

OK
altavir commented 2020-06-13 20:05:35 +03:00 (Migrated from github.com)
Review

It seems like compile is a better name.

It seems like `compile` is a better name.
fun compile(gen: AsmGenerationContext<T>)
altavir commented 2020-06-13 19:27:11 +03:00 (Migrated from github.com)
Review

Add documentation since the interface is public.

Add documentation since the interface is public.
altavir commented 2020-06-13 20:02:04 +03:00 (Migrated from github.com)
Review

does it make sense to do invoke without operator? It seems that it should be renamed to compile. Those method need to be documented as well.

does it make sense to do invoke without `operator`? It seems that it should be renamed to `compile`. Those method need to be documented as well.
CommanderTvis commented 2020-06-13 20:03:12 +03:00 (Migrated from github.com)
Review

OK

OK
CommanderTvis commented 2020-06-13 20:03:14 +03:00 (Migrated from github.com)
Review

OK

OK
altavir commented 2020-06-13 20:05:35 +03:00 (Migrated from github.com)
Review

It seems like compile is a better name.

It seems like `compile` is a better name.
}
internal class AsmUnaryOperation<T>(private val context: Algebra<T>, private val name: String, expr: AsmExpression<T>) :
@ -16,13 +33,13 @@ internal class AsmUnaryOperation<T>(private val context: Algebra<T>, private val
altavir commented 2020-06-13 19:27:11 +03:00 (Migrated from github.com)
Review

Add documentation since the interface is public.

Add documentation since the interface is public.
altavir commented 2020-06-13 19:27:11 +03:00 (Migrated from github.com)
Review

Add documentation since the interface is public.

Add documentation since the interface is public.
altavir commented 2020-06-13 20:02:04 +03:00 (Migrated from github.com)
Review

does it make sense to do invoke without operator? It seems that it should be renamed to compile. Those method need to be documented as well.

does it make sense to do invoke without `operator`? It seems that it should be renamed to `compile`. Those method need to be documented as well.
altavir commented 2020-06-13 20:02:04 +03:00 (Migrated from github.com)
Review

does it make sense to do invoke without operator? It seems that it should be renamed to compile. Those method need to be documented as well.

does it make sense to do invoke without `operator`? It seems that it should be renamed to `compile`. Those method need to be documented as well.
CommanderTvis commented 2020-06-13 20:03:12 +03:00 (Migrated from github.com)
Review

OK

OK
CommanderTvis commented 2020-06-13 20:03:12 +03:00 (Migrated from github.com)
Review

OK

OK
CommanderTvis commented 2020-06-13 20:03:14 +03:00 (Migrated from github.com)
Review

OK

OK
CommanderTvis commented 2020-06-13 20:03:14 +03:00 (Migrated from github.com)
Review

OK

OK
altavir commented 2020-06-13 20:05:35 +03:00 (Migrated from github.com)
Review

It seems like compile is a better name.

It seems like `compile` is a better name.
altavir commented 2020-06-13 20:05:35 +03:00 (Migrated from github.com)
Review

It seems like compile is a better name.

It seems like `compile` is a better name.
private val expr: AsmExpression<T> = expr.optimize()
override fun tryEvaluate(): T? = context { unaryOperation(name, expr.tryEvaluate() ?: return@context null) }
override fun invoke(gen: AsmGenerationContext<T>) {
altavir commented 2020-06-13 19:27:11 +03:00 (Migrated from github.com)
Review

Add documentation since the interface is public.

Add documentation since the interface is public.
altavir commented 2020-06-13 20:02:04 +03:00 (Migrated from github.com)
Review

does it make sense to do invoke without operator? It seems that it should be renamed to compile. Those method need to be documented as well.

does it make sense to do invoke without `operator`? It seems that it should be renamed to `compile`. Those method need to be documented as well.
CommanderTvis commented 2020-06-13 20:03:12 +03:00 (Migrated from github.com)
Review

OK

OK
CommanderTvis commented 2020-06-13 20:03:14 +03:00 (Migrated from github.com)
Review

OK

OK
altavir commented 2020-06-13 20:05:35 +03:00 (Migrated from github.com)
Review

It seems like compile is a better name.

It seems like `compile` is a better name.
override fun compile(gen: AsmGenerationContext<T>) {
altavir commented 2020-06-13 19:27:11 +03:00 (Migrated from github.com)
Review

Add documentation since the interface is public.

Add documentation since the interface is public.
altavir commented 2020-06-13 20:02:04 +03:00 (Migrated from github.com)
Review

does it make sense to do invoke without operator? It seems that it should be renamed to compile. Those method need to be documented as well.

does it make sense to do invoke without `operator`? It seems that it should be renamed to `compile`. Those method need to be documented as well.
CommanderTvis commented 2020-06-13 20:03:12 +03:00 (Migrated from github.com)
Review

OK

OK
CommanderTvis commented 2020-06-13 20:03:14 +03:00 (Migrated from github.com)
Review

OK

OK
altavir commented 2020-06-13 20:05:35 +03:00 (Migrated from github.com)
Review

It seems like compile is a better name.

It seems like `compile` is a better name.
gen.visitLoadAlgebra()
if (!hasSpecific(context, name, 1))
gen.visitStringConstant(name)
expr.invoke(gen)
altavir commented 2020-06-13 19:27:11 +03:00 (Migrated from github.com)
Review

Add documentation since the interface is public.

Add documentation since the interface is public.
altavir commented 2020-06-13 20:02:04 +03:00 (Migrated from github.com)
Review

does it make sense to do invoke without operator? It seems that it should be renamed to compile. Those method need to be documented as well.

does it make sense to do invoke without `operator`? It seems that it should be renamed to `compile`. Those method need to be documented as well.
CommanderTvis commented 2020-06-13 20:03:12 +03:00 (Migrated from github.com)
Review

OK

OK
CommanderTvis commented 2020-06-13 20:03:14 +03:00 (Migrated from github.com)
Review

OK

OK
altavir commented 2020-06-13 20:05:35 +03:00 (Migrated from github.com)
Review

It seems like compile is a better name.

It seems like `compile` is a better name.
expr.compile(gen)
altavir commented 2020-06-13 19:27:11 +03:00 (Migrated from github.com)
Review

Add documentation since the interface is public.

Add documentation since the interface is public.
altavir commented 2020-06-13 20:02:04 +03:00 (Migrated from github.com)
Review

does it make sense to do invoke without operator? It seems that it should be renamed to compile. Those method need to be documented as well.

does it make sense to do invoke without `operator`? It seems that it should be renamed to `compile`. Those method need to be documented as well.
CommanderTvis commented 2020-06-13 20:03:12 +03:00 (Migrated from github.com)
Review

OK

OK
CommanderTvis commented 2020-06-13 20:03:14 +03:00 (Migrated from github.com)
Review

OK

OK
altavir commented 2020-06-13 20:05:35 +03:00 (Migrated from github.com)
Review

It seems like compile is a better name.

It seems like `compile` is a better name.
if (gen.tryInvokeSpecific(context, name, 1))
return
@ -54,14 +71,14 @@ internal class AsmBinaryOperation<T>(
altavir commented 2020-06-13 19:27:11 +03:00 (Migrated from github.com)
Review

Add documentation since the interface is public.

Add documentation since the interface is public.
altavir commented 2020-06-13 19:27:11 +03:00 (Migrated from github.com)
Review

Add documentation since the interface is public.

Add documentation since the interface is public.
altavir commented 2020-06-13 20:02:04 +03:00 (Migrated from github.com)
Review

does it make sense to do invoke without operator? It seems that it should be renamed to compile. Those method need to be documented as well.

does it make sense to do invoke without `operator`? It seems that it should be renamed to `compile`. Those method need to be documented as well.
altavir commented 2020-06-13 20:02:04 +03:00 (Migrated from github.com)
Review

does it make sense to do invoke without operator? It seems that it should be renamed to compile. Those method need to be documented as well.

does it make sense to do invoke without `operator`? It seems that it should be renamed to `compile`. Those method need to be documented as well.
CommanderTvis commented 2020-06-13 20:03:12 +03:00 (Migrated from github.com)
Review

OK

OK
CommanderTvis commented 2020-06-13 20:03:12 +03:00 (Migrated from github.com)
Review

OK

OK
CommanderTvis commented 2020-06-13 20:03:14 +03:00 (Migrated from github.com)
Review

OK

OK
CommanderTvis commented 2020-06-13 20:03:14 +03:00 (Migrated from github.com)
Review

OK

OK
altavir commented 2020-06-13 20:05:35 +03:00 (Migrated from github.com)
Review

It seems like compile is a better name.

It seems like `compile` is a better name.
altavir commented 2020-06-13 20:05:35 +03:00 (Migrated from github.com)
Review

It seems like compile is a better name.

It seems like `compile` is a better name.
)
}
override fun invoke(gen: AsmGenerationContext<T>) {
altavir commented 2020-06-13 19:27:11 +03:00 (Migrated from github.com)
Review

Add documentation since the interface is public.

Add documentation since the interface is public.
altavir commented 2020-06-13 20:02:04 +03:00 (Migrated from github.com)
Review

does it make sense to do invoke without operator? It seems that it should be renamed to compile. Those method need to be documented as well.

does it make sense to do invoke without `operator`? It seems that it should be renamed to `compile`. Those method need to be documented as well.
CommanderTvis commented 2020-06-13 20:03:12 +03:00 (Migrated from github.com)
Review

OK

OK
CommanderTvis commented 2020-06-13 20:03:14 +03:00 (Migrated from github.com)
Review

OK

OK
altavir commented 2020-06-13 20:05:35 +03:00 (Migrated from github.com)
Review

It seems like compile is a better name.

It seems like `compile` is a better name.
override fun compile(gen: AsmGenerationContext<T>) {
altavir commented 2020-06-13 19:27:11 +03:00 (Migrated from github.com)
Review

Add documentation since the interface is public.

Add documentation since the interface is public.
altavir commented 2020-06-13 20:02:04 +03:00 (Migrated from github.com)
Review

does it make sense to do invoke without operator? It seems that it should be renamed to compile. Those method need to be documented as well.

does it make sense to do invoke without `operator`? It seems that it should be renamed to `compile`. Those method need to be documented as well.
CommanderTvis commented 2020-06-13 20:03:12 +03:00 (Migrated from github.com)
Review

OK

OK
CommanderTvis commented 2020-06-13 20:03:14 +03:00 (Migrated from github.com)
Review

OK

OK
altavir commented 2020-06-13 20:05:35 +03:00 (Migrated from github.com)
Review

It seems like compile is a better name.

It seems like `compile` is a better name.
gen.visitLoadAlgebra()
if (!hasSpecific(context, name, 2))
gen.visitStringConstant(name)
first.invoke(gen)
altavir commented 2020-06-13 19:27:11 +03:00 (Migrated from github.com)
Review

Add documentation since the interface is public.

Add documentation since the interface is public.
altavir commented 2020-06-13 20:02:04 +03:00 (Migrated from github.com)
Review

does it make sense to do invoke without operator? It seems that it should be renamed to compile. Those method need to be documented as well.

does it make sense to do invoke without `operator`? It seems that it should be renamed to `compile`. Those method need to be documented as well.
CommanderTvis commented 2020-06-13 20:03:12 +03:00 (Migrated from github.com)
Review

OK

OK
CommanderTvis commented 2020-06-13 20:03:14 +03:00 (Migrated from github.com)
Review

OK

OK
altavir commented 2020-06-13 20:05:35 +03:00 (Migrated from github.com)
Review

It seems like compile is a better name.

It seems like `compile` is a better name.
second.invoke(gen)
altavir commented 2020-06-13 19:27:11 +03:00 (Migrated from github.com)
Review

Add documentation since the interface is public.

Add documentation since the interface is public.
altavir commented 2020-06-13 20:02:04 +03:00 (Migrated from github.com)
Review

does it make sense to do invoke without operator? It seems that it should be renamed to compile. Those method need to be documented as well.

does it make sense to do invoke without `operator`? It seems that it should be renamed to `compile`. Those method need to be documented as well.
CommanderTvis commented 2020-06-13 20:03:12 +03:00 (Migrated from github.com)
Review

OK

OK
CommanderTvis commented 2020-06-13 20:03:14 +03:00 (Migrated from github.com)
Review

OK

OK
altavir commented 2020-06-13 20:05:35 +03:00 (Migrated from github.com)
Review

It seems like compile is a better name.

It seems like `compile` is a better name.
first.compile(gen)
altavir commented 2020-06-13 19:27:11 +03:00 (Migrated from github.com)
Review

Add documentation since the interface is public.

Add documentation since the interface is public.
altavir commented 2020-06-13 20:02:04 +03:00 (Migrated from github.com)
Review

does it make sense to do invoke without operator? It seems that it should be renamed to compile. Those method need to be documented as well.

does it make sense to do invoke without `operator`? It seems that it should be renamed to `compile`. Those method need to be documented as well.
CommanderTvis commented 2020-06-13 20:03:12 +03:00 (Migrated from github.com)
Review

OK

OK
CommanderTvis commented 2020-06-13 20:03:14 +03:00 (Migrated from github.com)
Review

OK

OK
altavir commented 2020-06-13 20:05:35 +03:00 (Migrated from github.com)
Review

It seems like compile is a better name.

It seems like `compile` is a better name.
second.compile(gen)
altavir commented 2020-06-13 19:27:11 +03:00 (Migrated from github.com)
Review

Add documentation since the interface is public.

Add documentation since the interface is public.
altavir commented 2020-06-13 20:02:04 +03:00 (Migrated from github.com)
Review

does it make sense to do invoke without operator? It seems that it should be renamed to compile. Those method need to be documented as well.

does it make sense to do invoke without `operator`? It seems that it should be renamed to `compile`. Those method need to be documented as well.
CommanderTvis commented 2020-06-13 20:03:12 +03:00 (Migrated from github.com)
Review

OK

OK
CommanderTvis commented 2020-06-13 20:03:14 +03:00 (Migrated from github.com)
Review

OK

OK
altavir commented 2020-06-13 20:05:35 +03:00 (Migrated from github.com)
Review

It seems like compile is a better name.

It seems like `compile` is a better name.
if (gen.tryInvokeSpecific(context, name, 2))
return
@ -79,13 +96,13 @@ internal class AsmBinaryOperation<T>(
altavir commented 2020-06-13 19:27:11 +03:00 (Migrated from github.com)
Review

Add documentation since the interface is public.

Add documentation since the interface is public.
altavir commented 2020-06-13 19:27:11 +03:00 (Migrated from github.com)
Review

Add documentation since the interface is public.

Add documentation since the interface is public.
altavir commented 2020-06-13 20:02:04 +03:00 (Migrated from github.com)
Review

does it make sense to do invoke without operator? It seems that it should be renamed to compile. Those method need to be documented as well.

does it make sense to do invoke without `operator`? It seems that it should be renamed to `compile`. Those method need to be documented as well.
altavir commented 2020-06-13 20:02:04 +03:00 (Migrated from github.com)
Review

does it make sense to do invoke without operator? It seems that it should be renamed to compile. Those method need to be documented as well.

does it make sense to do invoke without `operator`? It seems that it should be renamed to `compile`. Those method need to be documented as well.
CommanderTvis commented 2020-06-13 20:03:12 +03:00 (Migrated from github.com)
Review

OK

OK
CommanderTvis commented 2020-06-13 20:03:12 +03:00 (Migrated from github.com)
Review

OK

OK
CommanderTvis commented 2020-06-13 20:03:14 +03:00 (Migrated from github.com)
Review

OK

OK
CommanderTvis commented 2020-06-13 20:03:14 +03:00 (Migrated from github.com)
Review

OK

OK
altavir commented 2020-06-13 20:05:35 +03:00 (Migrated from github.com)
Review

It seems like compile is a better name.

It seems like `compile` is a better name.
altavir commented 2020-06-13 20:05:35 +03:00 (Migrated from github.com)
Review

It seems like compile is a better name.

It seems like `compile` is a better name.
internal class AsmVariableExpression<T>(private val name: String, private val default: T? = null) :
AsmExpression<T> {
override fun invoke(gen: AsmGenerationContext<T>): Unit = gen.visitLoadFromVariables(name, default)
altavir commented 2020-06-13 19:27:11 +03:00 (Migrated from github.com)
Review

Add documentation since the interface is public.

Add documentation since the interface is public.
altavir commented 2020-06-13 20:02:04 +03:00 (Migrated from github.com)
Review

does it make sense to do invoke without operator? It seems that it should be renamed to compile. Those method need to be documented as well.

does it make sense to do invoke without `operator`? It seems that it should be renamed to `compile`. Those method need to be documented as well.
CommanderTvis commented 2020-06-13 20:03:12 +03:00 (Migrated from github.com)
Review

OK

OK
CommanderTvis commented 2020-06-13 20:03:14 +03:00 (Migrated from github.com)
Review

OK

OK
altavir commented 2020-06-13 20:05:35 +03:00 (Migrated from github.com)
Review

It seems like compile is a better name.

It seems like `compile` is a better name.
override fun compile(gen: AsmGenerationContext<T>): Unit = gen.visitLoadFromVariables(name, default)
altavir commented 2020-06-13 19:27:11 +03:00 (Migrated from github.com)
Review

Add documentation since the interface is public.

Add documentation since the interface is public.
altavir commented 2020-06-13 20:02:04 +03:00 (Migrated from github.com)
Review

does it make sense to do invoke without operator? It seems that it should be renamed to compile. Those method need to be documented as well.

does it make sense to do invoke without `operator`? It seems that it should be renamed to `compile`. Those method need to be documented as well.
CommanderTvis commented 2020-06-13 20:03:12 +03:00 (Migrated from github.com)
Review

OK

OK
CommanderTvis commented 2020-06-13 20:03:14 +03:00 (Migrated from github.com)
Review

OK

OK
altavir commented 2020-06-13 20:05:35 +03:00 (Migrated from github.com)
Review

It seems like compile is a better name.

It seems like `compile` is a better name.
}
internal class AsmConstantExpression<T>(private val value: T) :
AsmExpression<T> {
override fun tryEvaluate(): T = value
override fun invoke(gen: AsmGenerationContext<T>): Unit = gen.visitLoadFromConstants(value)
altavir commented 2020-06-13 19:27:11 +03:00 (Migrated from github.com)
Review

Add documentation since the interface is public.

Add documentation since the interface is public.
altavir commented 2020-06-13 20:02:04 +03:00 (Migrated from github.com)
Review

does it make sense to do invoke without operator? It seems that it should be renamed to compile. Those method need to be documented as well.

does it make sense to do invoke without `operator`? It seems that it should be renamed to `compile`. Those method need to be documented as well.
CommanderTvis commented 2020-06-13 20:03:12 +03:00 (Migrated from github.com)
Review

OK

OK
CommanderTvis commented 2020-06-13 20:03:14 +03:00 (Migrated from github.com)
Review

OK

OK
altavir commented 2020-06-13 20:05:35 +03:00 (Migrated from github.com)
Review

It seems like compile is a better name.

It seems like `compile` is a better name.
override fun compile(gen: AsmGenerationContext<T>): Unit = gen.visitLoadFromConstants(value)
altavir commented 2020-06-13 19:27:11 +03:00 (Migrated from github.com)
Review

Add documentation since the interface is public.

Add documentation since the interface is public.
altavir commented 2020-06-13 20:02:04 +03:00 (Migrated from github.com)
Review

does it make sense to do invoke without operator? It seems that it should be renamed to compile. Those method need to be documented as well.

does it make sense to do invoke without `operator`? It seems that it should be renamed to `compile`. Those method need to be documented as well.
CommanderTvis commented 2020-06-13 20:03:12 +03:00 (Migrated from github.com)
Review

OK

OK
CommanderTvis commented 2020-06-13 20:03:14 +03:00 (Migrated from github.com)
Review

OK

OK
altavir commented 2020-06-13 20:05:35 +03:00 (Migrated from github.com)
Review

It seems like compile is a better name.

It seems like `compile` is a better name.
}
internal class AsmConstProductExpression<T>(
@ -98,10 +115,10 @@ internal class AsmConstProductExpression<T>(
altavir commented 2020-06-13 19:27:11 +03:00 (Migrated from github.com)
Review

Add documentation since the interface is public.

Add documentation since the interface is public.
altavir commented 2020-06-13 19:27:11 +03:00 (Migrated from github.com)
Review

Add documentation since the interface is public.

Add documentation since the interface is public.
altavir commented 2020-06-13 20:02:04 +03:00 (Migrated from github.com)
Review

does it make sense to do invoke without operator? It seems that it should be renamed to compile. Those method need to be documented as well.

does it make sense to do invoke without `operator`? It seems that it should be renamed to `compile`. Those method need to be documented as well.
altavir commented 2020-06-13 20:02:04 +03:00 (Migrated from github.com)
Review

does it make sense to do invoke without operator? It seems that it should be renamed to compile. Those method need to be documented as well.

does it make sense to do invoke without `operator`? It seems that it should be renamed to `compile`. Those method need to be documented as well.
CommanderTvis commented 2020-06-13 20:03:12 +03:00 (Migrated from github.com)
Review

OK

OK
CommanderTvis commented 2020-06-13 20:03:12 +03:00 (Migrated from github.com)
Review

OK

OK
CommanderTvis commented 2020-06-13 20:03:14 +03:00 (Migrated from github.com)
Review

OK

OK
CommanderTvis commented 2020-06-13 20:03:14 +03:00 (Migrated from github.com)
Review

OK

OK
altavir commented 2020-06-13 20:05:35 +03:00 (Migrated from github.com)
Review

It seems like compile is a better name.

It seems like `compile` is a better name.
altavir commented 2020-06-13 20:05:35 +03:00 (Migrated from github.com)
Review

It seems like compile is a better name.

It seems like `compile` is a better name.
override fun tryEvaluate(): T? = context { (expr.tryEvaluate() ?: return@context null) * const }
override fun invoke(gen: AsmGenerationContext<T>) {
altavir commented 2020-06-13 19:27:11 +03:00 (Migrated from github.com)
Review

Add documentation since the interface is public.

Add documentation since the interface is public.
altavir commented 2020-06-13 20:02:04 +03:00 (Migrated from github.com)
Review

does it make sense to do invoke without operator? It seems that it should be renamed to compile. Those method need to be documented as well.

does it make sense to do invoke without `operator`? It seems that it should be renamed to `compile`. Those method need to be documented as well.
CommanderTvis commented 2020-06-13 20:03:12 +03:00 (Migrated from github.com)
Review

OK

OK
CommanderTvis commented 2020-06-13 20:03:14 +03:00 (Migrated from github.com)
Review

OK

OK
altavir commented 2020-06-13 20:05:35 +03:00 (Migrated from github.com)
Review

It seems like compile is a better name.

It seems like `compile` is a better name.
override fun compile(gen: AsmGenerationContext<T>) {
altavir commented 2020-06-13 19:27:11 +03:00 (Migrated from github.com)
Review

Add documentation since the interface is public.

Add documentation since the interface is public.
altavir commented 2020-06-13 20:02:04 +03:00 (Migrated from github.com)
Review

does it make sense to do invoke without operator? It seems that it should be renamed to compile. Those method need to be documented as well.

does it make sense to do invoke without `operator`? It seems that it should be renamed to `compile`. Those method need to be documented as well.
CommanderTvis commented 2020-06-13 20:03:12 +03:00 (Migrated from github.com)
Review

OK

OK
CommanderTvis commented 2020-06-13 20:03:14 +03:00 (Migrated from github.com)
Review

OK

OK
altavir commented 2020-06-13 20:05:35 +03:00 (Migrated from github.com)
Review

It seems like compile is a better name.

It seems like `compile` is a better name.
gen.visitLoadAlgebra()
gen.visitNumberConstant(const)
expr.invoke(gen)
altavir commented 2020-06-13 19:27:11 +03:00 (Migrated from github.com)
Review

Add documentation since the interface is public.

Add documentation since the interface is public.
altavir commented 2020-06-13 20:02:04 +03:00 (Migrated from github.com)
Review

does it make sense to do invoke without operator? It seems that it should be renamed to compile. Those method need to be documented as well.

does it make sense to do invoke without `operator`? It seems that it should be renamed to `compile`. Those method need to be documented as well.
CommanderTvis commented 2020-06-13 20:03:12 +03:00 (Migrated from github.com)
Review

OK

OK
CommanderTvis commented 2020-06-13 20:03:14 +03:00 (Migrated from github.com)
Review

OK

OK
altavir commented 2020-06-13 20:05:35 +03:00 (Migrated from github.com)
Review

It seems like compile is a better name.

It seems like `compile` is a better name.
expr.compile(gen)
altavir commented 2020-06-13 19:27:11 +03:00 (Migrated from github.com)
Review

Add documentation since the interface is public.

Add documentation since the interface is public.
altavir commented 2020-06-13 20:02:04 +03:00 (Migrated from github.com)
Review

does it make sense to do invoke without operator? It seems that it should be renamed to compile. Those method need to be documented as well.

does it make sense to do invoke without `operator`? It seems that it should be renamed to `compile`. Those method need to be documented as well.
CommanderTvis commented 2020-06-13 20:03:12 +03:00 (Migrated from github.com)
Review

OK

OK
CommanderTvis commented 2020-06-13 20:03:14 +03:00 (Migrated from github.com)
Review

OK

OK
altavir commented 2020-06-13 20:05:35 +03:00 (Migrated from github.com)
Review

It seems like compile is a better name.

It seems like `compile` is a better name.
gen.visitAlgebraOperation(
owner = AsmGenerationContext.SPACE_OPERATIONS_CLASS,
@ -117,7 +134,7 @@ internal class AsmNumberExpression<T>(private val context: NumericAlgebra<T>, pr
altavir commented 2020-06-13 19:27:11 +03:00 (Migrated from github.com)
Review

Add documentation since the interface is public.

Add documentation since the interface is public.
altavir commented 2020-06-13 19:27:11 +03:00 (Migrated from github.com)
Review

Add documentation since the interface is public.

Add documentation since the interface is public.
altavir commented 2020-06-13 20:02:04 +03:00 (Migrated from github.com)
Review

does it make sense to do invoke without operator? It seems that it should be renamed to compile. Those method need to be documented as well.

does it make sense to do invoke without `operator`? It seems that it should be renamed to `compile`. Those method need to be documented as well.
altavir commented 2020-06-13 20:02:04 +03:00 (Migrated from github.com)
Review

does it make sense to do invoke without operator? It seems that it should be renamed to compile. Those method need to be documented as well.

does it make sense to do invoke without `operator`? It seems that it should be renamed to `compile`. Those method need to be documented as well.
CommanderTvis commented 2020-06-13 20:03:12 +03:00 (Migrated from github.com)
Review

OK

OK
CommanderTvis commented 2020-06-13 20:03:12 +03:00 (Migrated from github.com)
Review

OK

OK
CommanderTvis commented 2020-06-13 20:03:14 +03:00 (Migrated from github.com)
Review

OK

OK
CommanderTvis commented 2020-06-13 20:03:14 +03:00 (Migrated from github.com)
Review

OK

OK
altavir commented 2020-06-13 20:05:35 +03:00 (Migrated from github.com)
Review

It seems like compile is a better name.

It seems like `compile` is a better name.
altavir commented 2020-06-13 20:05:35 +03:00 (Migrated from github.com)
Review

It seems like compile is a better name.

It seems like `compile` is a better name.
AsmExpression<T> {
override fun tryEvaluate(): T? = context.number(value)
override fun invoke(gen: AsmGenerationContext<T>): Unit = gen.visitNumberConstant(value)
altavir commented 2020-06-13 19:27:11 +03:00 (Migrated from github.com)
Review

Add documentation since the interface is public.

Add documentation since the interface is public.
altavir commented 2020-06-13 20:02:04 +03:00 (Migrated from github.com)
Review

does it make sense to do invoke without operator? It seems that it should be renamed to compile. Those method need to be documented as well.

does it make sense to do invoke without `operator`? It seems that it should be renamed to `compile`. Those method need to be documented as well.
CommanderTvis commented 2020-06-13 20:03:12 +03:00 (Migrated from github.com)
Review

OK

OK
CommanderTvis commented 2020-06-13 20:03:14 +03:00 (Migrated from github.com)
Review

OK

OK
altavir commented 2020-06-13 20:05:35 +03:00 (Migrated from github.com)
Review

It seems like compile is a better name.

It seems like `compile` is a better name.
override fun compile(gen: AsmGenerationContext<T>): Unit = gen.visitNumberConstant(value)
altavir commented 2020-06-13 19:27:11 +03:00 (Migrated from github.com)
Review

Add documentation since the interface is public.

Add documentation since the interface is public.
altavir commented 2020-06-13 20:02:04 +03:00 (Migrated from github.com)
Review

does it make sense to do invoke without operator? It seems that it should be renamed to compile. Those method need to be documented as well.

does it make sense to do invoke without `operator`? It seems that it should be renamed to `compile`. Those method need to be documented as well.
CommanderTvis commented 2020-06-13 20:03:12 +03:00 (Migrated from github.com)
Review

OK

OK
CommanderTvis commented 2020-06-13 20:03:14 +03:00 (Migrated from github.com)
Review

OK

OK
altavir commented 2020-06-13 20:05:35 +03:00 (Migrated from github.com)
Review

It seems like compile is a better name.

It seems like `compile` is a better name.
}
internal abstract class FunctionalCompiledExpression<T> internal constructor(

altavir commented 2020-06-13 19:27:11 +03:00 (Migrated from github.com)
Review

Add documentation since the interface is public.

Add documentation since the interface is public.
altavir commented 2020-06-13 19:27:11 +03:00 (Migrated from github.com)
Review

Add documentation since the interface is public.

Add documentation since the interface is public.
altavir commented 2020-06-13 20:02:04 +03:00 (Migrated from github.com)
Review

does it make sense to do invoke without operator? It seems that it should be renamed to compile. Those method need to be documented as well.

does it make sense to do invoke without `operator`? It seems that it should be renamed to `compile`. Those method need to be documented as well.
altavir commented 2020-06-13 20:02:04 +03:00 (Migrated from github.com)
Review

does it make sense to do invoke without operator? It seems that it should be renamed to compile. Those method need to be documented as well.

does it make sense to do invoke without `operator`? It seems that it should be renamed to `compile`. Those method need to be documented as well.
CommanderTvis commented 2020-06-13 20:03:12 +03:00 (Migrated from github.com)
Review

OK

OK
CommanderTvis commented 2020-06-13 20:03:12 +03:00 (Migrated from github.com)
Review

OK

OK
CommanderTvis commented 2020-06-13 20:03:14 +03:00 (Migrated from github.com)
Review

OK

OK
CommanderTvis commented 2020-06-13 20:03:14 +03:00 (Migrated from github.com)
Review

OK

OK
altavir commented 2020-06-13 20:05:35 +03:00 (Migrated from github.com)
Review

It seems like compile is a better name.

It seems like `compile` is a better name.
altavir commented 2020-06-13 20:05:35 +03:00 (Migrated from github.com)
Review

It seems like compile is a better name.

It seems like `compile` is a better name.

View File

@ -5,6 +5,9 @@ import org.objectweb.asm.Label
altavir commented 2020-06-13 20:06:32 +03:00 (Migrated from github.com)
Review

Could the constructor be made internal?

Could the constructor be made internal?
altavir commented 2020-06-13 20:06:32 +03:00 (Migrated from github.com)
Review

Could the constructor be made internal?

Could the constructor be made internal?
CommanderTvis commented 2020-06-13 20:06:59 +03:00 (Migrated from github.com)
Review

I'll check

I'll check
CommanderTvis commented 2020-06-13 20:06:59 +03:00 (Migrated from github.com)
Review

I'll check

I'll check
CommanderTvis commented 2020-06-13 20:11:34 +03:00 (Migrated from github.com)
Review

It can.

It can.
CommanderTvis commented 2020-06-13 20:11:34 +03:00 (Migrated from github.com)
Review

It can.

It can.
import org.objectweb.asm.MethodVisitor
import org.objectweb.asm.Opcodes
import scientifik.kmath.asm.AsmGenerationContext.ClassLoader
import scientifik.kmath.asm.internal.visitLdcOrDConstInsn
altavir commented 2020-06-13 20:06:32 +03:00 (Migrated from github.com)
Review

Could the constructor be made internal?

Could the constructor be made internal?
CommanderTvis commented 2020-06-13 20:06:59 +03:00 (Migrated from github.com)
Review

I'll check

I'll check
CommanderTvis commented 2020-06-13 20:11:34 +03:00 (Migrated from github.com)
Review

It can.

It can.
import scientifik.kmath.asm.internal.visitLdcOrFConstInsn
altavir commented 2020-06-13 20:06:32 +03:00 (Migrated from github.com)
Review

Could the constructor be made internal?

Could the constructor be made internal?
CommanderTvis commented 2020-06-13 20:06:59 +03:00 (Migrated from github.com)
Review

I'll check

I'll check
CommanderTvis commented 2020-06-13 20:11:34 +03:00 (Migrated from github.com)
Review

It can.

It can.
import scientifik.kmath.asm.internal.visitLdcOrIConstInsn
altavir commented 2020-06-13 20:06:32 +03:00 (Migrated from github.com)
Review

Could the constructor be made internal?

Could the constructor be made internal?
CommanderTvis commented 2020-06-13 20:06:59 +03:00 (Migrated from github.com)
Review

I'll check

I'll check
CommanderTvis commented 2020-06-13 20:11:34 +03:00 (Migrated from github.com)
Review

It can.

It can.
import scientifik.kmath.operations.Algebra
/**
@ -16,7 +19,7 @@ import scientifik.kmath.operations.Algebra
altavir commented 2020-06-13 20:06:32 +03:00 (Migrated from github.com)
Review

Could the constructor be made internal?

Could the constructor be made internal?
altavir commented 2020-06-13 20:06:32 +03:00 (Migrated from github.com)
Review

Could the constructor be made internal?

Could the constructor be made internal?
CommanderTvis commented 2020-06-13 20:06:59 +03:00 (Migrated from github.com)
Review

I'll check

I'll check
CommanderTvis commented 2020-06-13 20:06:59 +03:00 (Migrated from github.com)
Review

I'll check

I'll check
CommanderTvis commented 2020-06-13 20:11:34 +03:00 (Migrated from github.com)
Review

It can.

It can.
CommanderTvis commented 2020-06-13 20:11:34 +03:00 (Migrated from github.com)
Review

It can.

It can.
* @param algebra the algebra the applied AsmExpressions use.
* @param className the unique class name of new loaded class.
*/
class AsmGenerationContext<T>(
altavir commented 2020-06-13 20:06:32 +03:00 (Migrated from github.com)
Review

Could the constructor be made internal?

Could the constructor be made internal?
CommanderTvis commented 2020-06-13 20:06:59 +03:00 (Migrated from github.com)
Review

I'll check

I'll check
CommanderTvis commented 2020-06-13 20:11:34 +03:00 (Migrated from github.com)
Review

It can.

It can.
class AsmGenerationContext<T> @PublishedApi internal constructor(
altavir commented 2020-06-13 20:06:32 +03:00 (Migrated from github.com)
Review

Could the constructor be made internal?

Could the constructor be made internal?
CommanderTvis commented 2020-06-13 20:06:59 +03:00 (Migrated from github.com)
Review

I'll check

I'll check
CommanderTvis commented 2020-06-13 20:11:34 +03:00 (Migrated from github.com)
Review

It can.

It can.
private val classOfT: Class<*>,
private val algebra: Algebra<T>,
private val className: String

altavir commented 2020-06-13 20:06:32 +03:00 (Migrated from github.com)
Review

Could the constructor be made internal?

Could the constructor be made internal?
altavir commented 2020-06-13 20:06:32 +03:00 (Migrated from github.com)
Review

Could the constructor be made internal?

Could the constructor be made internal?
CommanderTvis commented 2020-06-13 20:06:59 +03:00 (Migrated from github.com)
Review

I'll check

I'll check
CommanderTvis commented 2020-06-13 20:06:59 +03:00 (Migrated from github.com)
Review

I'll check

I'll check
CommanderTvis commented 2020-06-13 20:11:34 +03:00 (Migrated from github.com)
Review

It can.

It can.
CommanderTvis commented 2020-06-13 20:11:34 +03:00 (Migrated from github.com)
Review

It can.

It can.

View File

@ -1,4 +1,4 @@
package scientifik.kmath.asm
package scientifik.kmath.asm.internal
import org.objectweb.asm.MethodVisitor
import org.objectweb.asm.Opcodes.*

View File

@ -1,8 +1,10 @@
package scientifik.kmath.asm
package scientifik.kmath.asm.internal
import org.objectweb.asm.Opcodes
import scientifik.kmath.asm.AsmConstantExpression
import scientifik.kmath.asm.AsmExpression
import scientifik.kmath.asm.AsmGenerationContext
import scientifik.kmath.operations.Algebra
import scientifik.kmath.operations.ByteRing
private val methodNameAdapters: Map<String, String> = mapOf("+" to "add", "*" to "multiply", "/" to "divide")