If we got here from memory_protection_error(), then the stack pointer
has been fiddled with and the elements of these vectors, which address
stack-allocated objects, are bogus and needs to be resetted.
In vm/compaction.cpp I rescoped some variables to lower the stack usage
from 592 to 560 bytes. I wasn't very successful with this. The stack
usage is larger than it looks because methods on the structures used
take an implicit this pointer and a reference to the data (so the data
has to live out it's full scope and can't be put in a register).
In vm/debug.cpp I made a large (1024 bytes) stack allocated buffer
simply dynamically allocated.
In vm/os-unix.cpp I rescoped signal handling structures to not coincide
with each other and reduced a very large (1024 bytes) amount of stack
usage to less than 500 bytes.
Declaring bignum_roots to contain bignum** instead of cell avoids some
superfluous casts. Casting it to cell is wrong because the items in it
are never tagged. And due to a earlier commit, bignum_roots will never
contain NULL:s so checking for them is not needed.
The name can cause compiler errors because it's the same as the type
name. It only matters in some functions, but I like consistency so I
renamed it everywhere.
instead of storing data_root_ranges in data_roots, you can just store
cell pointers directly. the advantage with doing it that way is that
registration and traversal code becomes simpler (and slightly faster).
Windows runs ctrl-c in its own thread and doesn't by itself interrupt
blocking system calls when it is pressed. Therefore you have to manually
send an interrupt signal to the stuck thread.
The UNW_FLAG_EHANDLER #define is now visible in VS2012, causing
a conflict with the definition in os-windows-x86.64.cpp. Added
a #ifndef to only include the definition if it hasn't already
been defined.
clang-format doesn't recognize casts to non-pointer/non-template types
so it winds up adding a space between the right paren and the expression
and then failing to recognize prefix operators in the process
(e.g. foo = (cell) & bar; should be foo = (cell)&bar;). This commit
manually fixes up the major cases (fixnum, cell, all types ending in _t).