~tim/scheme-vm

ref: c5110102ce2df2d78a0c87f293edf20f5a3984e7 scheme-vm/compiler.rb -rw-r--r-- 7.5 KiB
Support all character names in the spec
Refactor a bit
Actually our parser is better now!
No need for the index any more
Remove halt option from compile method

This was only used by one caller and can just as easily be added by that caller.
Get rid of unneeded keep_last option

`keep_last: true` was only being used by specs, and `(exit)`
already accomplishes the same effect, leaving the stack intact for
inspection.
Clarify purpose of this code
Fix bug compiling an empty list
Give macro definitions referential transparency

...and fix a handful of other variable and macro scoping issues
Rearrange vm opcodes

* Rename ops to better match how they are used.
* Arrange opcodes alphabetically because I'm tired of
  agonizing over their ordering :-)
Build Char from stack value
Fix how identifiers are recognized

This allows = to be an identifier
Don't leave strings on the stack if unused
Update code style
Add let-syntax and letrec-syntax
Speed up specs by caching program
Speed up specs with cached compiler
Make assert a library and fix some namespace bugs
Rename method to expand
Move PrettyPrint into its own class
Next