Dev #127

Merged
altavir merged 214 commits from dev into master 2020-08-11 08:33:21 +03:00
2 changed files with 4 additions and 1 deletions
Showing only changes of commit 2df97ca4c3 - Show all commits

View File

@ -24,6 +24,7 @@ For example, the following builder:
package scientifik.kmath.asm.generated; package scientifik.kmath.asm.generated;
import java.util.Map; import java.util.Map;
import scientifik.kmath.asm.internal.MapIntrinsics;
import scientifik.kmath.expressions.Expression; import scientifik.kmath.expressions.Expression;
import scientifik.kmath.operations.RealField; import scientifik.kmath.operations.RealField;
@ -37,9 +38,10 @@ public final class AsmCompiledExpression_1073786867_0 implements Expression<Doub
} }
public final Double invoke(Map<String, ? extends Double> arguments) { public final Double invoke(Map<String, ? extends Double> arguments) {
return (Double)this.algebra.add(((Double)arguments.get("x")).doubleValue(), 2.0D); return (Double)this.algebra.add(((Double)MapIntrinsics.getOrFail(arguments, "x", (Object)null)).doubleValue(), 2.0D);
} }
} }
``` ```
### Example Usage ### Example Usage

View File

@ -3,6 +3,7 @@ package scientifik.kmath.asm.internal
import org.objectweb.asm.ClassWriter import org.objectweb.asm.ClassWriter
import org.objectweb.asm.FieldVisitor import org.objectweb.asm.FieldVisitor
@Suppress("FunctionName")
internal inline fun ClassWriter(flags: Int, block: ClassWriter.() -> Unit): ClassWriter = internal inline fun ClassWriter(flags: Int, block: ClassWriter.() -> Unit): ClassWriter =
ClassWriter(flags).apply(block) ClassWriter(flags).apply(block)