1.0.6.24: a more sophisticated UNWIND-TO-FRAME-AND-CALL for x86 and x86-64
authorJuho Snellman <jsnell@iki.fi>
Tue, 5 Jun 2007 11:42:54 +0000 (11:42 +0000)
committerJuho Snellman <jsnell@iki.fi>
Tue, 5 Jun 2007 11:42:54 +0000 (11:42 +0000)
commit578d987735906eb05829f0c2235a3ba9225c2bc4
tree82eeea87fed128ca4157c723ef0d8c9d261c021f
parent49da8bb4ea5899e3d23cef4c80c246b2101cfaac
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:
make-config.sh
src/code/debug.lisp
src/code/early-fasl.lisp
src/compiler/gtn.lisp
src/compiler/ir1tran-lambda.lisp
src/compiler/ir2tran.lisp
src/compiler/x86-64/cell.lisp
src/compiler/x86-64/nlx.lisp
src/compiler/x86-64/parms.lisp
src/compiler/x86/cell.lisp
src/compiler/x86/nlx.lisp
src/compiler/x86/parms.lisp
tests/unwind-to-frame-and-call.impure.lisp [new file with mode: 0644]
version.lisp-expr