1.0.6.24: a more sophisticated UNWIND-TO-FRAME-AND-CALL for x86 and x86-64
* Implement three new VOPs:
** UNWIND-TO-FRAME-AND-CALL constructs a fake catch block for a
given frame pointer, runs all unwinds for that block, sets
the frame pointer to the new value, and calls a given function.
** BIND-SENTINEL (stores a marker on the binding stack, used
to determine how far the binding stack needs to be unwound
during a U-T-F-A-C).
** UNBIND-SENTINEL (pops one of these markers from the stack).
* Modify IR2 to use these VOPs when converting suitable functions.
* Modify the IR1 translation in maybe-insert-debug-catch to only
ensure that tail recursion doesn't happen (needed to match the
BIND-SENTINELs with UNBIND-SENTINELs).
* Use these to implement SB-DEBUG:UNWIND-TO-FRAME-AND-CALL:
** Grovel the binding stack, uwp block chain and the catch block
chain for the values needed to reconstruct the dynamic state.
** Call SB-VM:U-T-F-A-C.
* The new implementation should be substantially the same as the
old one (minor difference in handling of functions with special
variables in the lambda list). Some tests added to verify this.
* New implementation is somewhat faster at runtime (a simple
function call overhead benchmark on (DEBUG 2) improved from 3.4s
to 2.9s), and significantly faster at compiling (generally around
15-30% improvement with (DEBUG 2)).
* Other platforms still use the old implementation that instruments
the code with a CATCH during IR1 translation.
* Based on an earlier hack by Alastair Bridgewater.
14 files changed: