From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Paul Eggert Newsgroups: gmane.emacs.devel Subject: Re: inlinable functions instead of macros Date: Fri, 17 Aug 2012 16:59:47 -0700 Organization: UCLA Computer Science Department Message-ID: <502EDAF3.6030005@cs.ucla.edu> References: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1345248002 12117 80.91.229.3 (18 Aug 2012 00:00:02 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 18 Aug 2012 00:00:02 +0000 (UTC) Cc: emacs-devel@gnu.org To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Aug 18 02:00:00 2012 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1T2WSO-000419-KY for ged-emacs-devel@m.gmane.org; Sat, 18 Aug 2012 02:00:00 +0200 Original-Received: from localhost ([::1]:43155 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T2WSN-0001Vo-D7 for ged-emacs-devel@m.gmane.org; Fri, 17 Aug 2012 19:59:59 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:32986) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T2WSJ-0001VY-T7 for emacs-devel@gnu.org; Fri, 17 Aug 2012 19:59:56 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1T2WSI-0003y9-Rj for emacs-devel@gnu.org; Fri, 17 Aug 2012 19:59:55 -0400 Original-Received: from smtp.cs.ucla.edu ([131.179.128.62]:49292) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T2WSI-0003y0-Lu for emacs-devel@gnu.org; Fri, 17 Aug 2012 19:59:54 -0400 Original-Received: from localhost (localhost.localdomain [127.0.0.1]) by smtp.cs.ucla.edu (Postfix) with ESMTP id 468B039E800A; Fri, 17 Aug 2012 16:59:46 -0700 (PDT) X-Virus-Scanned: amavisd-new at smtp.cs.ucla.edu Original-Received: from smtp.cs.ucla.edu ([127.0.0.1]) by localhost (smtp.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id aDFvQYK3nBth; Fri, 17 Aug 2012 16:59:45 -0700 (PDT) Original-Received: from [192.168.1.3] (pool-108-23-119-2.lsanca.fios.verizon.net [108.23.119.2]) by smtp.cs.ucla.edu (Postfix) with ESMTPSA id 7B17039E8007; Fri, 17 Aug 2012 16:59:45 -0700 (PDT) User-Agent: Mozilla/5.0 (X11; Linux i686; rv:14.0) Gecko/20120714 Thunderbird/14.0 In-Reply-To: X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 131.179.128.62 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 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-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:152628 Archived-At: On 08/17/2012 04:48 PM, Stefan Monnier wrote: > While inlinable functions are much cleaner than macros, they have > a very serious downside: you just end up with > > lisp.h:2416: Emacs fatal error: assertion failed: found == !EQ (blv->defcell, blv->valcell) > > I.e. the file&line info is always the same rather than giving the > file&line where the inlinable function was called. On systems that use glibc we could adjust eassert so that it also prints a backtrace, using glibc's 'backtrace' function. See . This would not be quite the same thing, as it would print function names, insn offsets, and return addresses; but it would recapture some of the ground lost here, and the backtrace info would in some cases be more useful than what we have now.