[Deprecated] AviatorScript 5.0.0-RC1
killme2008
released this
12 Apr 03:56
·
401 commits
to master
since this release
Main changes since 5.0.0-beta2:
- Release Programming AviatorScript 5.0 doc in chinese.
Options. MAX_LOOP_COUNT
to control max loop count in for/while/sequence-iterate loop, default zero means no limitation.- Fixed
__MODULE__.exports
can't be assigned. - Use absolute file path as module caching key.
- Fixed number overflow parsing error #219, thanks to @H123R
seq.get
supportsjava.util.Set
, return the element itself if it is in set, otherwise returns nil.- Reset classloader when calling
AviatorEvaluatorInstance#clearExpressionCache()
. - Adds new method to set classloader
AviatorEvaluatorInstance#setAviatorClassLoader(classloader)
- Adds LRU cache for expression caching, enable it by
AviatorEvaluatorInstance#useLRUExpressionCache(capacity)
. - Make parser token and avaitor objects implements
Serializable
interface #209 - Remove global lock in
BeanUtilsBean.getInstance
by a bean cache. #222 - Impl java scripting SPI #198 , supports
Invocable
and refactor script engine, see the programming doc. - New option
Options.FEATURE_SET
to set engine's syntax feature, valid features are listed in Feature enum.Default set is full feature set. - New functions:
seq.entry(key, value)
to create aMap.Entry
.into(to_coll, from_coll)
to add all elements infrom_coll
intoto_coll
byseq.add(to_coll, element)
.bigint(x)
to cast a value into bigint type.decimal(x)
to cast a value into decimal type.
- Breaking changes:
- Remove
Options.ALWAYS_USE_DOUBLE_AS_DECIMAL
, already replaced byOptions. ALWAYS_USE_DECIMAL_AS_FLOATING_POINT_NUMBER
. - Remove
Options.TRACE
, not supported any more. - Remove
Options.DISABLE_ASSIGNMENT
, please use feature API. - Default syntax feature set is full-featured, if you want to be compatible with old versions(before 5.0.0), please
setOption(Options.FEATURE_SET, Feature.getCompatibleFeatures())
, then the engine only supports assignment, lambda and internal variables,if/for/while/let
etc. features are disabled.
- Remove