From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: bug#24514: 24.5; Lispy backtraces Date: Sun, 04 Dec 2016 17:30:45 +0200 Message-ID: <83mvgblniy.fsf@gnu.org> References: <20160922231447.GA3833@odonien.localdomain> <98fbb582-3da4-bd83-a2e9-e341dd7f6140@gmail.com> <20160923075116.GA612@odonien.localdomain> <82e39377-f31b-698c-5a9a-343868686799@gmail.com> <20161202005226.GA4215@odonien.localdomain> <0a69afa7-e9e6-e75f-8e90-6438683db98d@gmail.com> <53ba4534-1ec3-4e4f-d929-1a72f79c1abe@gmail.com> Reply-To: Eli Zaretskii NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 8bit X-Trace: blaine.gmane.org 1480865447 30956 195.159.176.226 (4 Dec 2016 15:30:47 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sun, 4 Dec 2016 15:30:47 +0000 (UTC) Cc: emacs-devel@gnu.org To: =?windows-1252?Q?Cl=E9ment?= Pit--Claudel Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Dec 04 16:30:38 2016 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cDYkP-00066x-Gb for ged-emacs-devel@m.gmane.org; Sun, 04 Dec 2016 16:30:37 +0100 Original-Received: from localhost ([::1]:34811 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cDYkR-0005m7-Pt for ged-emacs-devel@m.gmane.org; Sun, 04 Dec 2016 10:30:39 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:46985) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cDYkL-0005m1-Aa for emacs-devel@gnu.org; Sun, 04 Dec 2016 10:30:34 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cDYkI-0004hg-2v for emacs-devel@gnu.org; Sun, 04 Dec 2016 10:30:33 -0500 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:58886) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cDYkH-0004hc-Vb; Sun, 04 Dec 2016 10:30:30 -0500 Original-Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:1654 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1cDYkH-0003nW-5I; Sun, 04 Dec 2016 10:30:29 -0500 In-reply-to: <53ba4534-1ec3-4e4f-d929-1a72f79c1abe@gmail.com> (message from =?windows-1252?Q?Cl=E9ment?= Pit--Claudel on Sat, 3 Dec 2016 17:15:22 -0500) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:210022 Archived-At: > From: Clément Pit--Claudel > Date: Sat, 3 Dec 2016 17:15:22 -0500 > > On 2016-12-01 21:24, Stefan Monnier wrote: > >> The discussion below seems to indicate that there's very little missing at > >> the Lisp level to be able to implement `backtrace' in Lisp; is that right? > > > > Indeed, I think all the info needed is provided by backtrace-frame. > > The C implementation of backtrace-frame seems to be linear in the index of the requested frame, so a Lisp implementation of backtrace would be quadratic in the depth of the stack trace. Would a new function backtrace-frames that returns all frames at once be acceptable? But such a backtrace-frames function would have to be implemented in C, right? And you wanted to move the implementation of "backtrace" to Lisp, AFAIU. So it sounds like we will be replacing one C primitive with another, or did I miss something?