Menu

#1263 More support for constant functions

closed-accepted
nobody
None
5
2013-02-08
2013-02-07
No

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).

1 Attachments

Discussion

  • Martin Whitaker

    Martin Whitaker - 2013-02-07

    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.

     
  • Martin Whitaker

    Martin Whitaker - 2013-02-07

    This patch just factors out some common code. As before, if you don't like it, just throw it away.

     
  • Martin Whitaker

    Martin Whitaker - 2013-02-07

    A regression test for the first patch.

     
  • Martin Whitaker

    Martin Whitaker - 2013-02-07

    A regression test for the second patch.

     
  • Cary R.

    Cary R. - 2013-02-08
    • status: open --> closed-accepted
     
  • Cary R.

    Cary R. - 2013-02-08

    I have pushed these patches and added the tests to the test suite.

     

Log in to post a comment.