So I made a pass at doing this cleanly. Please check out the changes at
(second one has commit message with documentation)
It would be good to get one of the folks who have worked on the compiler to see if I've done anything wrong. ABCL builds fine with this and I didn't see any changes in the abcl.lisp tests.
For Mark, the test- file has this info but here it is again - 10000 calls of (#"compile" 'regex.Pattern ".*")
With optimization: (INVOKE-RESTARGS-MACRO "compile" (QUOTE REGEX.PATTERN) (LIST ".*") NIL T)
Without optimization: ((LAMBDA (#:G85648 &REST #:G85649) (INVOKE-RESTARGS "compile" #:G85648 #:G85649 NIL)) (QUOTE REGEX.PATTERN) ".*")
JUST-LOOP
0.0 seconds real time
0 cons cells
OPTIMIZED-JSS
0.011 seconds real time
0 cons cells
UNOPTIMIZED-JSS
0.325 seconds real time
800156 cons cells