WIP VLA implementation

This isn't really a complete implementation of VLA codegen, but it's a
start. This patch implements all of the basics for VLAs, including
sizeof and multidimensional VLAs.

There are a still some things that aren't really correct. One is that
I've taken a few shortcuts assuming that everything is an i32.
Another is that this doesn't handle typedefs and casts correctly,
because it isn't forcing the size to be emitted in the right place.
The patch could some of refactoring, and I've only tested it very
lightly.

On the bright side, it can handle declaring and indexing into a
44-dimensional vla while only emitting 86 multiplies, as opposed to
gcc's 946 :slight_smile:

Does the approach in this patch look reasonable?

-Eli

vlawip1.txt (6.48 KB)

I've taken a few shortcuts assuming that everything is an i32.

I'd say, put FIXME: fix for LP64 on all of them. This makes it trivial for the person that comes along later to know to just fix it and not wonder why i32 was chosen. :slight_smile:

Does the approach in this patch look reasonable?

Sounds like progress.