Commit graph

31 commits

Author SHA1 Message Date
Bill Currie
1061256c4f Add a missing expression type to dot_expr. 2016-01-08 21:15:47 +09:00
Bill Currie
7a7a685105 Add support for actual vector expressions.
Currently, they can represent either vectors or quaternions, and the
quaternions can be in either [s, v] form or [w, x, y, z] form.

Many things will not actual work yet as the vector expression needs to be
converted into the appropriate form for assigning the elements to the
components of the "vector" type.
2013-09-27 23:15:57 +09:00
Bill Currie
e27d7cbd2d Handle alloca "correctly".
Use AC_FUNC_ALLOCA and the #ifdef mess suggested by the autoconf docs
(hidden in qfalloca.h).
2013-01-22 21:02:50 +09:00
Bill Currie
0fc8aa54e1 Make expr->next edges constrained.
It turns out expression trees are (mostly?) valid DAGs, so all edges being
constrained works, though the graphs get a little tall (but easier to read).
2012-12-24 20:06:38 +09:00
Bill Currie
a881fb5f5b Make float values obvious in expression dot dumps. 2012-12-23 19:34:25 +09:00
Bill Currie
6eb6b6c0ba Change pointer_t to unsigned and clean up the mess.
It doesn't make sense to have negative pointers. The size of the commit is
from enabling gcc's -Wtype-limits warning and cleaning up that mess too.
2012-12-21 21:53:13 +09:00
Bill Currie
f7e174f3ba Be more clear about integral expression types.
Is that 7 a short? int? unsigned?
2012-12-05 22:18:13 +09:00
Bill Currie
fea806c155 Be more careful with boolean expressions.
Either true_list or false_list may be null.
2012-12-05 20:12:57 +09:00
Bill Currie
d6b38dd0ee Add an option to control expr tree dumping.
About bloody time :P
2012-11-26 21:00:28 +09:00
Bill Currie
128547b885 Resurrect the "next" pointers for labels and conditionals. 2012-11-26 16:09:53 +09:00
Bill Currie
f7417345ba Rewrite print_bool to be more informative. 2012-11-26 15:47:10 +09:00
Bill Currie
147d00d41f Rewrite print_block making it more informative. 2012-11-26 15:04:33 +09:00
Bill Currie
ce1d89ba50 Replace some of the quotes around node names.
Null expression pointers can show up unexpectedly, and printf's (null)
messes up dot.
2012-11-26 14:18:23 +09:00
Bill Currie
b91bb2e915 Add direct moves to expression dumping. 2012-11-20 16:55:19 +09:00
Bill Currie
d1252813ce Use low_level_type instead of extract_type.
extract_type doesn't understand enums (by design?). qwaq's types.r now
compiles.
2012-11-19 13:49:34 +09:00
Bill Currie
c03511734d Fix a dreaded uninitialized variable.
Sneaky bastard :P (typo)
2012-11-19 12:52:24 +09:00
Bill Currie
60321061d2 Fix dot_expr.c to work with dump_dot(). 2012-11-19 12:14:02 +09:00
Bill Currie
28ce35f1c1 Make values independent objects.
values are now uniquely allocated (for the current object file). With
this, constants in dags will work.
2012-11-15 13:44:06 +09:00
Bill Currie
9095e1eabc Rework build_switch to use initialize_def.
This required support for label reference expressions, whose purpose is to
represent the address of a label.
2012-11-09 12:22:34 +09:00
Bill Currie
3306039da2 Print the destination type for alias expression bubbles. 2012-05-03 11:55:19 +09:00
Bill Currie
bc1b483525 Nuke the rcsid stuff.
It's pretty useless in git.
2012-04-22 10:56:32 +09:00
Bill Currie
55cc0f9206 Bring back the unsigned type (PROGS version bump)
This is only low-level support (the unsigned keyword still does not work),
but sufficient to make switch statements using jump tables work.
2011-04-09 10:07:47 +09:00
Bill Currie
45de7327dc Implement alias expressions (finally).
Alias expressions are like cast expressions, but never do any conversions.
2011-03-03 11:06:10 +09:00
Bill Currie
fc18ebd923 Add the source line number to most node labels. 2011-02-14 23:10:45 +09:00
Bill Currie
11485556e5 Quote expression names to avoid problems with null pointers. 2011-02-14 23:10:45 +09:00
Bill Currie
b01f960db9 Disable the subgraphs for now.
They tend to make large trees difficult to read. I might re-enable them
when I've gotten a better handle on dot.
2011-02-10 15:11:08 +09:00
Bill Currie
204a267b6a Print the def name for a pointer expr when known. 2011-02-08 14:43:57 +09:00
Bill Currie
b8127f7543 Do not segfault when printing a pointer value with a bogus type 2011-02-07 09:57:26 +09:00
Bill Currie
ce02fe8660 Fix the order of paramenters in the tree output.
Also get call nodes looking a little better.
2011-01-23 12:59:30 +09:00
Bill Currie
246778b5de Use function pointer tables instead of switch.
This seems to be better for complicated code. switch seems to be better
suited for relatively simple code.
2011-01-22 11:40:53 +09:00
Bill Currie
2f09efe547 Break out print_expr into its own file. 2011-01-21 20:31:40 +09:00