ASM Bytecode Generation to unwrap Expressions of adv-expr API #94
@ -178,9 +178,9 @@ class AsmGenerationContext<T>(classOfT: Class<*>, private val algebra: Algebra<T
|
||||
|
||||
.newInstance(algebra, constants) as AsmCompiled<T>
|
||||
}
|
||||
|
||||
fun visitLoadFromConstants(value: T) = visitLoadAnyFromConstants(value as Any)
|
||||
Add suppress for unused parameters and documentation. Add suppress for unused parameters and documentation.
Space is not actually used. Space is not actually used.
Not used Not used
|
||||
fun visitLoadFromConstants(value: T) = visitLoadAnyFromConstants(value as Any, T_CLASS)
|
||||
Add suppress for unused parameters and documentation. Add suppress for unused parameters and documentation.
Space is not actually used. Space is not actually used.
Not used Not used
|
||||
|
||||
fun visitLoadAnyFromConstants(value: Any) {
|
||||
Add suppress for unused parameters and documentation. Add suppress for unused parameters and documentation.
Space is not actually used. Space is not actually used.
Not used Not used
|
||||
fun visitLoadAnyFromConstants(value: Any, type: String) {
|
||||
Add suppress for unused parameters and documentation. Add suppress for unused parameters and documentation.
Space is not actually used. Space is not actually used.
Not used Not used
|
||||
val idx = if (value in constants) constants.indexOf(value) else constants.apply { add(value) }.lastIndex
|
||||
maxStack++
|
||||
|
||||
@ -189,7 +189,7 @@ class AsmGenerationContext<T>(classOfT: Class<*>, private val algebra: Algebra<T
|
||||
Add suppress for unused parameters and documentation. Add suppress for unused parameters and documentation.
Add suppress for unused parameters and documentation. Add suppress for unused parameters and documentation.
Space is not actually used. Space is not actually used.
Space is not actually used. Space is not actually used.
Not used Not used
Not used Not used
|
||||
visitFieldInsn(GETFIELD, slashesClassName, "constants", "L$LIST_CLASS;")
|
||||
visitLdcOrIConstInsn(idx)
|
||||
visitMethodInsn(INVOKEINTERFACE, LIST_CLASS, "get", "(I)L$OBJECT_CLASS;", true)
|
||||
visitCastToT()
|
||||
Add suppress for unused parameters and documentation. Add suppress for unused parameters and documentation.
Space is not actually used. Space is not actually used.
Not used Not used
|
||||
evaluateMethodVisitor.visitTypeInsn(CHECKCAST, type)
|
||||
Add suppress for unused parameters and documentation. Add suppress for unused parameters and documentation.
Space is not actually used. Space is not actually used.
Not used Not used
|
||||
}
|
||||
}
|
||||
|
||||
@ -214,7 +214,7 @@ class AsmGenerationContext<T>(classOfT: Class<*>, private val algebra: Algebra<T
|
||||
Add suppress for unused parameters and documentation. Add suppress for unused parameters and documentation.
Add suppress for unused parameters and documentation. Add suppress for unused parameters and documentation.
Space is not actually used. Space is not actually used.
Space is not actually used. Space is not actually used.
Not used Not used
Not used Not used
|
||||
return
|
||||
}
|
||||
|
||||
visitLoadAnyFromConstants(value)
|
||||
Add suppress for unused parameters and documentation. Add suppress for unused parameters and documentation.
Space is not actually used. Space is not actually used.
Not used Not used
|
||||
visitLoadAnyFromConstants(value, c)
|
||||
Add suppress for unused parameters and documentation. Add suppress for unused parameters and documentation.
Space is not actually used. Space is not actually used.
Not used Not used
|
||||
}
|
||||
|
||||
fun visitLoadFromVariables(name: String, defaultValue: T? = null) = evaluateMethodVisitor.run {
|
||||
|
||||
Add suppress for unused parameters and documentation. Add suppress for unused parameters and documentation.
Add suppress for unused parameters and documentation. Add suppress for unused parameters and documentation.
Space is not actually used. Space is not actually used.
Space is not actually used. Space is not actually used.
Not used Not used
Not used Not used
|
Add suppress for unused parameters and documentation.
Add suppress for unused parameters and documentation.
Space is not actually used.
Space is not actually used.
Not used
Not used