This basically shims the sub-compiler into the Compiler object itself, but doesn't force it's use. The sub-compiler has a bunch of interesting things that we may wish to refactor into the compiler proper:
spaghetti stacks instead of individual dicts/lists
environment frames, which are themselves spaghetti stacks of the various environment members
checks to see if operators are defined
basic checking of case then blocks
This is good enough to merge now, but definitely think we probably want to refactor all of this code: make one compiler that walks through and can do all of these checks, similar to how
the sub-compiler itself works. Since the shims are there, we literally could just flip the switch and make this the compiler; more work needs to be done on case & fn forms (in fact, all callables), and impl & sig aren't there yet, but it's an interesting start.
This basically shims the sub-compiler into the Compiler object itself, but doesn't force it's use. The sub-compiler has a bunch of interesting things that we may wish to refactor into the compiler proper:
case
then blocksThis is good enough to merge now, but definitely think we probably want to refactor all of this code: make one compiler that walks through and can do all of these checks, similar to how the sub-compiler itself works. Since the shims are there, we literally could just flip the switch and make this the compiler; more work needs to be done on
case
&fn
forms (in fact, all callables), andimpl
&sig
aren't there yet, but it's an interesting start.