Skip to content

Version 0.1.6: Optimizations and improvements

Compare
Choose a tag to compare
@larsga larsga released this 28 Jan 14:14
· 187 commits to master since this release

Some language improvements:

  • it used to be impossible to declare global variables in modules and then refer to them from functions. This now works.
  • JSLT now forbids object literals that contain the same key twice.
  • JSLT now depends on Jackson 2.9.8.

One function has been added:

  • mod(a, b) to compute a modulo b. (Thank you to @ecerulm for work on this!)

This version has been optimized in several ways:

  • variables that are used only once, or that have constant values, are now optimized away completely
  • operations involving two literals are now performed at compile-time,
  • the internal representation of variables is now much faster, and
  • if b in contains(a, b) is a large array literal, the optimizer now replaces this with a hashset lookup, instead of doing a linear search.