Bill Currie
0542daacdf
Create more double related tests
...
Including catching warnings :) (yay -Werror)
2020-02-15 23:49:12 +09:00
Bill Currie
13b608f40c
Don't truncat float % float
...
This allows full usage, eg, x % pi, but otherwise maintains
compatibility with integer %
2020-02-15 23:49:12 +09:00
Bill Currie
197f856a30
Fix incorrect scalar/quaternion division
...
It's just not possible.
2020-02-15 23:49:12 +09:00
Bill Currie
83fb588727
Support vector/quaternion division by float
...
Implemented via v*(1/f) or q*(1/f) to give CSE a chance to optimize the
division if necessary as otherwise the engine would have to divide every
time.
2019-06-10 08:44:36 +09:00
Bill Currie
ef4ad52239
Make binary_expr fold constants
...
This is where constant folding should have happened all along. While
unary_expr should fold constants too, it seems to already try to do so
and it's a bit much of a mess to clean up right now.
2019-06-10 00:36:13 +09:00
Bill Currie
439cd15620
Do type promotion for short
...
fold_constants used to do this when it was overly aggressive. Fixes the
ICE when accessing an array in a struct via a pointer.
2019-06-09 22:27:53 +09:00
Bill Currie
d00a2ef82d
Convert constant vector expressions in binary expressions
...
Fixes not being able to compare with eg [1, 2, 3]
2019-06-06 06:44:19 +09:00
Bill Currie
db460155e9
Fix multiple function calls in expressions.
2013-09-27 23:15:57 +09:00
Bill Currie
4bc40b3917
Rewrite binary_expr().
...
It is now in its own file and uses table lookups to check for valid type
and operator combinations, and also the resulting type of the expression.
This probably breaks multiple function calls in the one expression.
2013-09-27 23:15:57 +09:00