This patch adds support for concatenation operations in constant functions. It also fixes a compiler crash when attempting to evaluate a function which has no valid statement(s) (due to earlier compilation errors).
This patch adds support for system function calls in constant functions. It is a bit more invasive than the previous patches - the motivation for this was to maximise code sharing between the eval_tree and evaluate_function methods, but as a bonus it should make the code a bit more efficient.
The old code duplicated the argument expressions before evaluating them (and deleted the duplicates afterwards). I can't see any reason for doing this, and nothing seems to break without it, but if you can think of a good reason why this is needed, let me know, and I will put it back.
This patch adds support for system function calls in constant functions. It is a bit more invasive than the previous patches - the motivation for this was to maximise code sharing between the eval_tree and evaluate_function methods, but as a bonus it should make the code a bit more efficient.
The old code duplicated the argument expressions before evaluating them (and deleted the duplicates afterwards). I can't see any reason for doing this, and nothing seems to break without it, but if you can think of a good reason why this is needed, let me know, and I will put it back.
This patch just factors out some common code. As before, if you don't like it, just throw it away.
A regression test for the first patch.
A regression test for the second patch.
I have pushed these patches and added the tests to the test suite.