[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
- Proposal: stack traces with line numbers, John Williams, 2017/10/14
- Re: Proposal: stack traces with line numbers, Daniele Nicolodi, 2017/10/14
- Re: Proposal: stack traces with line numbers, raman, 2017/10/14
- Re: Proposal: stack traces with line numbers, Robert Weiner, 2017/10/14
- Re: Proposal: stack traces with line numbers, Helmut Eller, 2017/10/15
- Re: Proposal: stack traces with line numbers, Richard Stallman, 2017/10/15
- Re: Proposal: stack traces with line numbers, Wilfred Hughes, 2017/10/16