Updated the MapReduce protocol so that it's correct more often. It's
still not perfect, but the bugs repro less often now.
Also found a race condition in channel sending. The problem is that
send and receive both need to refer to the _unread field in
circular_buffer. For now I just grabbed the port lock to send. We can
probably get around this by using atomics instead.
This meant most of the generic-ness of it had to go away, since our
type system doesn't quite support it yet. Hopefully someday...
This version has lots of memory management errors. My next commit will
hopefully fix these.
This adds parser support and most of the machinery for
auto x = 10, y = 20;
However, the above still goes wrong somewhere in typestate, causing
the state checker to believe only the last variable in the list is
initialized after the statement.
Tim, if you have a moment, could you go over the changes to the tstate
code in this patch and see where I'm going wrong?
Multi-var-decls without the typestate extension
Add a loop
Probably more should be moved or split off into other files. My algorithm
was something along the lines of: move the contexts and their transitive
dependencies along with some functions to work with them. I stopped when
I was going to have to start pulling glue generation, which really
should go into a trans_glue file.
This essentially starts the bootstrapping one step earlier by building
the stdlib from source using the stage0 compiler and then using that
stdlib to build the stage1 compiler. (Instead of starting by building
the stage1 compiler and then building a stdlib with it).
This means we should now be able to add features to the stdlib and use
them in the compiler without having to do a snapshot. (On the flip
side, this means that we now need to do a snapshot if we want to use a
new language feature in the stdlib, but that doesn't really seem too
burdensome (we already need to snapshot if we want to use a new
language feature in the compiler)).