Just finished converting my JDK 11 fork to use SpEL as an expression parser. I think it's safe to say that it's still pretty experimental, but if any devs are willing to do some testing on it I'd greatly appreciate it:
You must be registered to see the links
. I'm not going to say that the game runs fast, but it seemed to handle my heaviest save better than even the Nashorn JS engine does, and it's an outright speed demon compared to GraalJS.
There is one breaking change in the XML scripting. The original engine used #VAR/#ENDVAR tags in the XML files that would allow an author to declare in-scope variables using embedded JavaScript. Since the JS engine isn't being used anymore, I changed #VAR to only set a single variable (an expression terminated by a semicolon) that would be pushed into the script context. #VAR also works with the #IF/#ELSE conditionals as well, unlike the previous implementation that used the JS engine to handle conditionals (a necessity, since #VAR blocks were handled before the rest of the script).
It's still not great. There isn't anything stopping authors from overwriting item objects and such, but protecting the global namespace is on my to-do list, along with splitting up UtilText so that it doesn't take three years to compile (seriously, my PC can compile the Linux kernel in the time it takes to build UtilText).
There's still plenty of work to be done to clean this sucker up, but getting it running somewhat well on newer JDKs is a pretty good first step, methinks.