Cache computed values of custom functions when evaluating the script.
Cache computed values of custom functions when evaluating the script.
* Split out parsing AddFunction statements into its own function.
* Functions declared using AddFunction compile into a new node type. The
new node type "customfunction" has a single child node that points to
the master node for the function.
* Give the script an age depending on how many times it has been
evaluated. Cache the computed values of custom function so that
subsequent calls to the same function within the same script pull from
the cached values instead of re-computing from scratch.
This fixes ticket 271 in the right way.
git-svn-id: svn://svn.curseforge.net/wow/ovale/mainline/trunk@977 d5049fe3-3747-40f7-a4b5-f36d6801af5f