emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Proposal: stack traces with line numbers


From: Stefan Monnier
Subject: Re: Proposal: stack traces with line numbers
Date: Sun, 15 Oct 2017 12:20:50 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux)

> Unless you care about interpreted code, a non-weak hash-table should be
> enough.

Some of the position info might need to be preserved "indefinitely", so
only a weak hash-table would handle that right (of course, an
alternative would be to store the position directly in the return value
of `read`, e.g. as is done in edebug-read-storing-offsets).

>> - I'm storing the information in vectors because it seems like a
>> reasonably efficient use of memory. [...]
> It's debatable whether a [file line column] vector is an efficent
> representation.  E.g. all lists in a source form come from the same file
> (or buffer or string) so storing the same filename many times seems
> redundant.

After macro-expansion, the source code can be made of pieces coming from
different files.

> So, I think the reader should, at least optionally, also record
> positions of every cons cell not just the first in a list.

The macro expansion code will need to be changed to propagate the source
info from the call to the expansion, and I think that should be
sufficient to make it unnecessary to preserve info about cons cells in
cdr position.


        Stefan




reply via email to

[Prev in Thread] Current Thread [Next in Thread]