Martin Whitaker
5929a00845
Handle uninitialised variables in constant user functions.
2013-03-24 14:40:44 -07:00
Martin Whitaker
5d7558b5e0
Fix assigned vector size in constant user functions.
...
When assigning to a bit/logic variable, the RHS expression value
must be trimmed to match the size of the variable.
2013-03-24 14:40:10 -07:00
Martin Whitaker
e8d4039175
Fix implicit casts in assignments (part 4).
...
This patch fixes a few issues/bugs that showed up when testing the
fixes for implicit casts:
1. Make the compile-time implementation of $abs, $min, and $max match
the run-time behaviour (system functions can't be polymorphic).
2. Correctly set the type (signed/unsigned) of the result of an
assignment inside a constant user function (the LHS should not
inherit the type of the RHS).
3. Fix a bug in the verinum(double) constructor (insufficient bits
were allocated in the case where the double value rounded up to
the next power of two).
2013-03-24 13:50:59 -07:00
Martin Whitaker
8b70fefa59
Refactor eval_tree debug code.
...
This just pulls the eval_tree debug message generation into one place.
2013-02-08 11:22:49 -08:00
Martin Whitaker
af91920a17
Add support for system function calls in constant functions.
2013-02-08 11:19:26 -08:00
Martin Whitaker
89244e0f70
Add support for concatenation operations in constant functions.
...
Also fix a compiler crash when attempting to evaluate a function
which has no valid statement(s) (due to earlier compilation errors).
2013-02-08 11:19:17 -08:00
Cary R
5830e65829
Fix space issues.
2013-02-04 12:17:41 -08:00
Martin Whitaker
f3a51fdfd1
Factor out some common eval_tree code.
...
The eval_tree() function is identical in most of the NetEBinary and
NetEUnary sub-classes.
2013-02-04 12:17:29 -08:00
Martin Whitaker
afd23d13d5
Add support for unary operators in constant user functions.
...
This patch implements the evaluate_function method for the NetEUnary
and NetEUReduce classes.
2013-02-04 12:17:05 -08:00
Martin Whitaker
11f479e028
Add support for all binary operators in constant user functions.
...
This patch implements the evaluate_function method for the NetEBBits,
NetEBDiv, NetEBLogic, NetEBMinMax, and NetEBPow classes. It also
factors out some common code into the NetEBinary class.
2013-02-04 12:16:51 -08:00
Arun Persaud
f5aafc32f9
updated FSF-address
2012-08-29 10:12:10 -07:00
Larry Doolittle
befff82655
Spelling fixes
...
Comments and debug messages.
2012-07-27 18:25:32 -07:00
Martin Whitaker
3354d83391
Support if statements and function calls in constant functions.
2012-06-06 19:34:08 -07:00
Stephen Williams
62b67c1843
More expression types supported during constant function evaluation.
2012-05-29 17:59:29 -07:00
Stephen Williams
a5a7050120
More expression types work in constant functions.
2012-05-29 13:56:16 -07:00
Stephen Williams
def9d0ea1d
Basic infrastructure for compile-time function evaluation.
2012-05-29 10:02:10 -07:00