Make the compiler threadsafe
The compiler inherited a simple memory management scheme that
involved malloc'ng a clump of memory, allocating out of that
clump for each unit of compilation, and then resetting after
the compilation was complete. Simple & fast, but built with the
expectation of a single compiler worker thread.
This change moves the memory allocation arena into the
CompilationUnit structure, and makes it private for each method
compilation. Unlike the old scheme, allocated memory is returned
to the system following completion (whereas before it was reused
for the next compilation).
As of this CL, each compilation is completely independent.
The changes involved were mostly mechanical to pass around the
cUnit pointer to anything which might need to allocate, but the
accretion of crud has moved me much closer to the point that
all of this stuff gets ripped out and replaced.
19 files changed