AbstractExprEvaluator
Evaluates expressions with a JSR 223 script engine.
Expressions run in the host JVM. checkCode rejects common literal JVM-termination calls on a best-effort basis (see ScriptGuards), but this is not a security sandbox: do not evaluate untrusted input in-process.
The engine keeps state across evaluations, such as the Kotlin engine's REPL history, which grows with every expression until resetContext is called. AbstractExprEvaluatorPool resets an evaluator once it has been returned resetEvery times.
Parameters
extension
the file extension used to look up the script engine (e.g., "kts", "py")