Juho Snellman <jsnell@...> writes:
> I'd like to replace it with a stepper which instruments the code at
> IR2-time. The patch is too large for the list, so I've put it up at
> <http://jsnell.iki.fi/tmp/step-diff-2006-09-11-e>. It fixes the above
> problems (there's no effect on type-inference, the compilation
> slowdown is around 5-10%, and the runtime slowdown is much smaller).
Good stuff!
src/code/early-step.lisp seems to be missing from the patch.
+ (setf (combination-step-info combination)
+ (let ((*print-pretty* t)
+ (*print-readably* nil))
+ (prin1-to-string form))))
This probably wants *print-circle* too -- forms can contain circular
elements. (Yes, the current stepper has the same problem, it seems...)
+ (form-number :initarg :fornum-number :reader step-condition-form-number))
^^^^^^
Typo, I assume, and the slot appears to be unused in the patch.
> * Some relatively small asm / runtime changes will be required for
> all platforms. The patch does the full changes for x86, x86-64 and
> ppc. It only includes minimal changes to Alpha, Mips and Sparc,
> which should allow SBCL to still compile on those platforms, but
> the stepping won't work.
Fine with me.
> * Only function-call forms are instrumented, so variable accesses are
> no longer steppable.
I think stepping special variable references might be worth the trouble,
but I don't consider this a real issue.
> * It slightly changes the stepping semantics. Earlier the STEP restart
> would cause two things to happen: it would cause the argument forms
> to be stepped, and it would cause stepping of the function body.
> For example, a form like
>
> (PROGN
> (A (B))
> (C))
>
> would be stepped by first signaling a step-condition at A. If the
> NEXT restart was invoked, it'd proceed stepping at C. If we instead
> invoke STEP, it'd proceed to stepping the argument forms (in this
> case B). After that, it'd step into the body of the function A.
>
> In the new stepper, the stepping proceeds strictly according to
> the evaluation order: a step-condition is signaled at B first, and
> only then at A. Invoking STEP at A will just step into the body of
> A.
Non-issue, IMO. While "kind of fancy", the way it now works was
probably a mistake on my part.
Cheers,
-- Nikodemus Schemer: "Buddha is small, clean, and serious."
Lispnik: "Buddha is big, has hairy armpits, and laughs."
|