From: Stefan Monnier <monnier@iro.umontreal.ca>
To: emacs-devel@gnu.org
Subject: Re: Proposal: stack traces with line numbers
Date: Sun, 15 Oct 2017 12:20:50 -0400 [thread overview]
Message-ID: <jwvk1zwpfmn.fsf-monnier+gmane.emacs.devel@gnu.org> (raw)
In-Reply-To: m2fuakd92a.fsf@caladan
> 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
next prev parent reply other threads:[~2017-10-15 16:20 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-10-15 0:17 Proposal: stack traces with line numbers John Williams
2017-10-15 1:54 ` Daniele Nicolodi
2017-10-15 2:42 ` raman
2017-10-15 3:20 ` Noam Postavsky
2017-10-15 3:40 ` Robert Weiner
2017-10-15 10:01 ` Helmut Eller
2017-10-15 16:20 ` Stefan Monnier [this message]
2017-10-16 22:43 ` John Williams
2017-10-17 0:00 ` Helmut Eller
2017-10-18 15:00 ` John Williams
2017-10-16 1:53 ` Richard Stallman
2017-10-16 21:51 ` Wilfred Hughes
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=jwvk1zwpfmn.fsf-monnier+gmane.emacs.devel@gnu.org \
--to=monnier@iro.umontreal.ca \
--cc=emacs-devel@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).