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
2 changed files with 35 additions and 31 deletions
Showing only changes of commit 834d1e1397 - Show all commits

View File

@ -11,37 +11,6 @@ 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 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.
fun invoke(gen: AsmGenerationContext<T>)
}
private val methodNameAdapters: Map<String, String> = mapOf("+" to "add", "*" to "multiply", "/" to "divide")
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.
internal fun <T> hasSpecific(context: Algebra<T>, name: String, arity: Int): Boolean {
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.
val aName = methodNameAdapters[name] ?: 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.
context::class.memberFunctions.find { it.name == aName && it.parameters.size == arity }
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 false
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 true
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.
internal fun <T> AsmGenerationContext<T>.tryInvokeSpecific(context: Algebra<T>, name: String, arity: Int): Boolean {
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.
val aName = methodNameAdapters[name] ?: 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.
context::class.memberFunctions.find { it.name == aName && it.parameters.size == arity }
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 false
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.
val owner = context::class.jvmName.replace('.', '/')
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.
val sig = buildString {
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.
append('(')
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.
repeat(arity) { append("L${AsmGenerationContext.OBJECT_CLASS};") }
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.
append(')')
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.
append("L${AsmGenerationContext.OBJECT_CLASS};")
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.
visitAlgebraOperation(owner = owner, method = aName, descriptor = sig)
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 true
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.
internal class AsmUnaryOperation<T>(private val context: Algebra<T>, private val name: String, expr: AsmExpression<T>) :
AsmExpression<T> {
private val expr: AsmExpression<T> = expr.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 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

@ -1,5 +1,40 @@
altavir commented 2020-06-13 20:12:51 +03:00 (Migrated from github.com)
Review

I suggest to bundle all misc methodsin one file or create internal directory for them to limit their visibility.

I suggest to bundle all misc methodsin one file or create `internal` directory for them to limit their visibility.
altavir commented 2020-06-13 20:12:51 +03:00 (Migrated from github.com)
Review

I suggest to bundle all misc methodsin one file or create internal directory for them to limit their visibility.

I suggest to bundle all misc methodsin one file or create `internal` directory for them to limit their visibility.
CommanderTvis commented 2020-06-13 20:18:20 +03:00 (Migrated from github.com)
Review

OK

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

OK

OK
package scientifik.kmath.asm
import scientifik.kmath.operations.Algebra
altavir commented 2020-06-13 20:12:51 +03:00 (Migrated from github.com)
Review

I suggest to bundle all misc methodsin one file or create internal directory for them to limit their visibility.

I suggest to bundle all misc methodsin one file or create `internal` directory for them to limit their visibility.
CommanderTvis commented 2020-06-13 20:18:20 +03:00 (Migrated from github.com)
Review

OK

OK
import kotlin.reflect.full.memberFunctions
altavir commented 2020-06-13 20:12:51 +03:00 (Migrated from github.com)
Review

I suggest to bundle all misc methodsin one file or create internal directory for them to limit their visibility.

I suggest to bundle all misc methodsin one file or create `internal` directory for them to limit their visibility.
CommanderTvis commented 2020-06-13 20:18:20 +03:00 (Migrated from github.com)
Review

OK

OK
import kotlin.reflect.jvm.jvmName
altavir commented 2020-06-13 20:12:51 +03:00 (Migrated from github.com)
Review

I suggest to bundle all misc methodsin one file or create internal directory for them to limit their visibility.

I suggest to bundle all misc methodsin one file or create `internal` directory for them to limit their visibility.
CommanderTvis commented 2020-06-13 20:18:20 +03:00 (Migrated from github.com)
Review

OK

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

I suggest to bundle all misc methodsin one file or create internal directory for them to limit their visibility.

I suggest to bundle all misc methodsin one file or create `internal` directory for them to limit their visibility.
CommanderTvis commented 2020-06-13 20:18:20 +03:00 (Migrated from github.com)
Review

OK

OK
private val methodNameAdapters: Map<String, String> = mapOf("+" to "add", "*" to "multiply", "/" to "divide")
altavir commented 2020-06-13 20:12:51 +03:00 (Migrated from github.com)
Review

I suggest to bundle all misc methodsin one file or create internal directory for them to limit their visibility.

I suggest to bundle all misc methodsin one file or create `internal` directory for them to limit their visibility.
CommanderTvis commented 2020-06-13 20:18:20 +03:00 (Migrated from github.com)
Review

OK

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

I suggest to bundle all misc methodsin one file or create internal directory for them to limit their visibility.

I suggest to bundle all misc methodsin one file or create `internal` directory for them to limit their visibility.
CommanderTvis commented 2020-06-13 20:18:20 +03:00 (Migrated from github.com)
Review

OK

OK
internal fun <T> hasSpecific(context: Algebra<T>, name: String, arity: Int): Boolean {
altavir commented 2020-06-13 20:12:51 +03:00 (Migrated from github.com)
Review

I suggest to bundle all misc methodsin one file or create internal directory for them to limit their visibility.

I suggest to bundle all misc methodsin one file or create `internal` directory for them to limit their visibility.
CommanderTvis commented 2020-06-13 20:18:20 +03:00 (Migrated from github.com)
Review

OK

OK
val aName = methodNameAdapters[name] ?: name
altavir commented 2020-06-13 20:12:51 +03:00 (Migrated from github.com)
Review

I suggest to bundle all misc methodsin one file or create internal directory for them to limit their visibility.

I suggest to bundle all misc methodsin one file or create `internal` directory for them to limit their visibility.
CommanderTvis commented 2020-06-13 20:18:20 +03:00 (Migrated from github.com)
Review

OK

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

I suggest to bundle all misc methodsin one file or create internal directory for them to limit their visibility.

I suggest to bundle all misc methodsin one file or create `internal` directory for them to limit their visibility.
CommanderTvis commented 2020-06-13 20:18:20 +03:00 (Migrated from github.com)
Review

OK

OK
context::class.memberFunctions.find { it.name == aName && it.parameters.size == arity }
altavir commented 2020-06-13 20:12:51 +03:00 (Migrated from github.com)
Review

I suggest to bundle all misc methodsin one file or create internal directory for them to limit their visibility.

I suggest to bundle all misc methodsin one file or create `internal` directory for them to limit their visibility.
CommanderTvis commented 2020-06-13 20:18:20 +03:00 (Migrated from github.com)
Review

OK

OK
?: return false
altavir commented 2020-06-13 20:12:51 +03:00 (Migrated from github.com)
Review

I suggest to bundle all misc methodsin one file or create internal directory for them to limit their visibility.

I suggest to bundle all misc methodsin one file or create `internal` directory for them to limit their visibility.
CommanderTvis commented 2020-06-13 20:18:20 +03:00 (Migrated from github.com)
Review

OK

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

I suggest to bundle all misc methodsin one file or create internal directory for them to limit their visibility.

I suggest to bundle all misc methodsin one file or create `internal` directory for them to limit their visibility.
CommanderTvis commented 2020-06-13 20:18:20 +03:00 (Migrated from github.com)
Review

OK

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

I suggest to bundle all misc methodsin one file or create internal directory for them to limit their visibility.

I suggest to bundle all misc methodsin one file or create `internal` directory for them to limit their visibility.
CommanderTvis commented 2020-06-13 20:18:20 +03:00 (Migrated from github.com)
Review

OK

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

I suggest to bundle all misc methodsin one file or create internal directory for them to limit their visibility.

I suggest to bundle all misc methodsin one file or create `internal` directory for them to limit their visibility.
CommanderTvis commented 2020-06-13 20:18:20 +03:00 (Migrated from github.com)
Review

OK

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

I suggest to bundle all misc methodsin one file or create internal directory for them to limit their visibility.

I suggest to bundle all misc methodsin one file or create `internal` directory for them to limit their visibility.
CommanderTvis commented 2020-06-13 20:18:20 +03:00 (Migrated from github.com)
Review

OK

OK
internal fun <T> AsmGenerationContext<T>.tryInvokeSpecific(context: Algebra<T>, name: String, arity: Int): Boolean {
altavir commented 2020-06-13 20:12:51 +03:00 (Migrated from github.com)
Review

I suggest to bundle all misc methodsin one file or create internal directory for them to limit their visibility.

I suggest to bundle all misc methodsin one file or create `internal` directory for them to limit their visibility.
CommanderTvis commented 2020-06-13 20:18:20 +03:00 (Migrated from github.com)
Review

OK

OK
val aName = methodNameAdapters[name] ?: name
altavir commented 2020-06-13 20:12:51 +03:00 (Migrated from github.com)
Review

I suggest to bundle all misc methodsin one file or create internal directory for them to limit their visibility.

I suggest to bundle all misc methodsin one file or create `internal` directory for them to limit their visibility.
CommanderTvis commented 2020-06-13 20:18:20 +03:00 (Migrated from github.com)
Review

OK

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

I suggest to bundle all misc methodsin one file or create internal directory for them to limit their visibility.

I suggest to bundle all misc methodsin one file or create `internal` directory for them to limit their visibility.
CommanderTvis commented 2020-06-13 20:18:20 +03:00 (Migrated from github.com)
Review

OK

OK
context::class.memberFunctions.find { it.name == aName && it.parameters.size == arity }
altavir commented 2020-06-13 20:12:51 +03:00 (Migrated from github.com)
Review

I suggest to bundle all misc methodsin one file or create internal directory for them to limit their visibility.

I suggest to bundle all misc methodsin one file or create `internal` directory for them to limit their visibility.
CommanderTvis commented 2020-06-13 20:18:20 +03:00 (Migrated from github.com)
Review

OK

OK
?: return false
altavir commented 2020-06-13 20:12:51 +03:00 (Migrated from github.com)
Review

I suggest to bundle all misc methodsin one file or create internal directory for them to limit their visibility.

I suggest to bundle all misc methodsin one file or create `internal` directory for them to limit their visibility.
CommanderTvis commented 2020-06-13 20:18:20 +03:00 (Migrated from github.com)
Review

OK

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

I suggest to bundle all misc methodsin one file or create internal directory for them to limit their visibility.

I suggest to bundle all misc methodsin one file or create `internal` directory for them to limit their visibility.
CommanderTvis commented 2020-06-13 20:18:20 +03:00 (Migrated from github.com)
Review

OK

OK
val owner = context::class.jvmName.replace('.', '/')
altavir commented 2020-06-13 20:12:51 +03:00 (Migrated from github.com)
Review

I suggest to bundle all misc methodsin one file or create internal directory for them to limit their visibility.

I suggest to bundle all misc methodsin one file or create `internal` directory for them to limit their visibility.
CommanderTvis commented 2020-06-13 20:18:20 +03:00 (Migrated from github.com)
Review

OK

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

I suggest to bundle all misc methodsin one file or create internal directory for them to limit their visibility.

I suggest to bundle all misc methodsin one file or create `internal` directory for them to limit their visibility.
CommanderTvis commented 2020-06-13 20:18:20 +03:00 (Migrated from github.com)
Review

OK

OK
val sig = buildString {
altavir commented 2020-06-13 20:12:51 +03:00 (Migrated from github.com)
Review

I suggest to bundle all misc methodsin one file or create internal directory for them to limit their visibility.

I suggest to bundle all misc methodsin one file or create `internal` directory for them to limit their visibility.
CommanderTvis commented 2020-06-13 20:18:20 +03:00 (Migrated from github.com)
Review

OK

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

I suggest to bundle all misc methodsin one file or create internal directory for them to limit their visibility.

I suggest to bundle all misc methodsin one file or create `internal` directory for them to limit their visibility.
CommanderTvis commented 2020-06-13 20:18:20 +03:00 (Migrated from github.com)
Review

OK

OK
repeat(arity) { append("L${AsmGenerationContext.OBJECT_CLASS};") }
altavir commented 2020-06-13 20:12:51 +03:00 (Migrated from github.com)
Review

I suggest to bundle all misc methodsin one file or create internal directory for them to limit their visibility.

I suggest to bundle all misc methodsin one file or create `internal` directory for them to limit their visibility.
CommanderTvis commented 2020-06-13 20:18:20 +03:00 (Migrated from github.com)
Review

OK

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

I suggest to bundle all misc methodsin one file or create internal directory for them to limit their visibility.

I suggest to bundle all misc methodsin one file or create `internal` directory for them to limit their visibility.
CommanderTvis commented 2020-06-13 20:18:20 +03:00 (Migrated from github.com)
Review

OK

OK
append("L${AsmGenerationContext.OBJECT_CLASS};")
altavir commented 2020-06-13 20:12:51 +03:00 (Migrated from github.com)
Review

I suggest to bundle all misc methodsin one file or create internal directory for them to limit their visibility.

I suggest to bundle all misc methodsin one file or create `internal` directory for them to limit their visibility.
CommanderTvis commented 2020-06-13 20:18:20 +03:00 (Migrated from github.com)
Review

OK

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

I suggest to bundle all misc methodsin one file or create internal directory for them to limit their visibility.

I suggest to bundle all misc methodsin one file or create `internal` directory for them to limit their visibility.
CommanderTvis commented 2020-06-13 20:18:20 +03:00 (Migrated from github.com)
Review

OK

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

I suggest to bundle all misc methodsin one file or create internal directory for them to limit their visibility.

I suggest to bundle all misc methodsin one file or create `internal` directory for them to limit their visibility.
CommanderTvis commented 2020-06-13 20:18:20 +03:00 (Migrated from github.com)
Review

OK

OK
visitAlgebraOperation(owner = owner, method = aName, descriptor = sig)
altavir commented 2020-06-13 20:12:51 +03:00 (Migrated from github.com)
Review

I suggest to bundle all misc methodsin one file or create internal directory for them to limit their visibility.

I suggest to bundle all misc methodsin one file or create `internal` directory for them to limit their visibility.
CommanderTvis commented 2020-06-13 20:18:20 +03:00 (Migrated from github.com)
Review

OK

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

I suggest to bundle all misc methodsin one file or create internal directory for them to limit their visibility.

I suggest to bundle all misc methodsin one file or create `internal` directory for them to limit their visibility.
CommanderTvis commented 2020-06-13 20:18:20 +03:00 (Migrated from github.com)
Review

OK

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

I suggest to bundle all misc methodsin one file or create internal directory for them to limit their visibility.

I suggest to bundle all misc methodsin one file or create `internal` directory for them to limit their visibility.
CommanderTvis commented 2020-06-13 20:18:20 +03:00 (Migrated from github.com)
Review

OK

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

I suggest to bundle all misc methodsin one file or create internal directory for them to limit their visibility.

I suggest to bundle all misc methodsin one file or create `internal` directory for them to limit their visibility.
CommanderTvis commented 2020-06-13 20:18:20 +03:00 (Migrated from github.com)
Review

OK

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

I suggest to bundle all misc methodsin one file or create internal directory for them to limit their visibility.

I suggest to bundle all misc methodsin one file or create `internal` directory for them to limit their visibility.
CommanderTvis commented 2020-06-13 20:18:20 +03:00 (Migrated from github.com)
Review

OK

OK
@PublishedApi
internal fun <T> AsmExpression<T>.optimize(): AsmExpression<T> {
val a = tryEvaluate()

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

I suggest to bundle all misc methodsin one file or create internal directory for them to limit their visibility.

I suggest to bundle all misc methodsin one file or create `internal` directory for them to limit their visibility.
altavir commented 2020-06-13 20:12:51 +03:00 (Migrated from github.com)
Review

I suggest to bundle all misc methodsin one file or create internal directory for them to limit their visibility.

I suggest to bundle all misc methodsin one file or create `internal` directory for them to limit their visibility.
CommanderTvis commented 2020-06-13 20:18:20 +03:00 (Migrated from github.com)
Review

OK

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

OK

OK