Skip to main content

Announcing Jactl 2.9.0

· 2 min read
James Crawford
Jactl Creator

Jactl 2.9.0 is a new release with a focus on performance improvements and bug fixes.

The biggest enhancement in Jactl 2.9.0 is support for the JVM InvokeDynamic instruction which makes invocation of methods on untyped objects almost as fast as invoking methods on typed objects.

Enhancements

#121 Performance Optimisations

Many performance optimisations were done to improve the runtime performance of the compiled code. In particular, support for InvokeDynamic was added which significantly improves the speed when invoking methods or functions where the method/function is not known at compile time (e.g. when invoking methods on untyped variables).

Other significant improvements come from inlining collection method pipelines such as list.map{ ... }.filter{ ... }.sum(). The compiler is able to turn these into the equivalent of a for-loop which can have significant performance benefits.

Bug Fixes

#122 Async call in the middle of string concatenation leads to IllegalArgumentException

#123 Class with array field after 64 or more non-array fields fails with verification error during compilation

#124 Switch expression with multiple strings with the same hashCode on the same case causes UnsupportedOperationException

#125 Even though Jactl supports non-String keys for Maps, the parser still rejects Map literals with non-String keys in some instances

#127 NullPointerException when compiling switch list pattern with '*' that covers subsequent list pattern

#128 IndexOutOfBoundsException using switch expression pattern matching a class constructor with too many arguments

#129 IndexOutOfBounds exception during compilation for class with async default values

#130 Checkpoint of a transpose iterator generates a ClassCastException during restore

#131 sprintf('%d',b) prints byte values over 127 as signed values when they should be unsigned

#132 JSON encoding does not correctly encode some UTF-8 characters and some invalid double values

#133 VerifyError for some uses of += operator

#134 Global variable name/type declarations leak across eval() calls sharing a JactlContext

#135 Threading issue with JactlScriptEngine.eval()