The cache which stores MRU set of pre-compiled reducers.
Called when a cache item is removed.
Called when a cache item is removed.
Loader to be used on a cache miss.
Loader to be used on a cache miss. The loader creates a new ScriptReducer for the given CacheKey. The default loader creates an instance of PrecompiledScriptReducer which stores its own IRContext and compiles costF, calcF graphs.
Creates a new instance of IRContex to be used in reducers.
Creates a new instance of IRContex to be used in reducers. The default implementation can be overriden in derived classes.
Obtain hit counter for each predefined script.
Obtain hit counter for each predefined script. The order of counters corresponds to
the order of the scripts in settings
.
Looks up reducer for the given key using its 'ergoTreeBytes' property.
Looks up reducer for the given key using its 'ergoTreeBytes' property.
It first looks up for predefReducers, if not found it looks up in the cache.
If there is no cache entry, the cacheLoader
is used to load a new ScriptReducer
.
a script key to lookup pre-compiled reducer.
a reducer for the given script
May throw an exception if error happens and no soft-fork condition detected in key.vs
.
An overload version of the method which looks up reducer for the given ErgoTree using its 'bytes' property.
An overload version of the method which looks up reducer for the given ErgoTree
using its 'bytes' property. See also getReducer(key)
.
a tree to lookup pre-compiled reducer.
validation settings which are used to detect soft-fork condition
a reducer for the given tree
May throw an exception if error happens and no soft-fork condition detected in vs
.
Returns accumulated statistics info.
Called when the cache entry is evicted.
Called when the cache entry is evicted.
Called to report processor stats.
Called to report processor stats.
Holds for each ErgoTree bytes the corresponding pre-compiled reducer.
Holds for each ErgoTree bytes the corresponding pre-compiled reducer. Since AVHashMap is not thread-safe it should be immutable after it is constructed. However the counters will be updated on each increase.
Script processor which holds pre-compiled reducers for the given scripts. This class is thread-safe.