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: [Emacs-diffs] trunk r117912: Minor improvements to new stack-allocated Lisp objects. Date: Sun, 21 Sep 2014 22:40:11 -0700 Organization: UCLA Computer Science Department Message-ID: <541FB63B.4070403@cs.ucla.edu> References: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1411364469 9932 80.91.229.3 (22 Sep 2014 05:41:09 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 22 Sep 2014 05:41:09 +0000 (UTC) Cc: emacs-devel@gnu.org To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Sep 22 07:41:02 2014 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 1XVwMs-0005qA-Ha for ged-emacs-devel@m.gmane.org; Mon, 22 Sep 2014 07:40:58 +0200 Original-Received: from localhost ([::1]:42425 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XVwMs-0001Zl-5m for ged-emacs-devel@m.gmane.org; Mon, 22 Sep 2014 01:40:58 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:43739) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XVwMZ-0001Ym-My for emacs-devel@gnu.org; Mon, 22 Sep 2014 01:40:47 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XVwMQ-0001Ig-Mo for emacs-devel@gnu.org; Mon, 22 Sep 2014 01:40:39 -0400 Original-Received: from smtp.cs.ucla.edu ([131.179.128.62]:35852) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XVwMQ-0001I3-CF for emacs-devel@gnu.org; Mon, 22 Sep 2014 01:40:30 -0400 Original-Received: from localhost (localhost.localdomain [127.0.0.1]) by smtp.cs.ucla.edu (Postfix) with ESMTP id 5AB6A39E801A; Sun, 21 Sep 2014 22:40:23 -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 SjlxcGJEI9Xn; Sun, 21 Sep 2014 22:40:14 -0700 (PDT) Original-Received: from [192.168.1.9] (pool-71-177-17-123.lsanca.dsl-w.verizon.net [71.177.17.123]) by smtp.cs.ucla.edu (Postfix) with ESMTPSA id A3A0B39E8013; Sun, 21 Sep 2014 22:40:14 -0700 (PDT) User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.1.1 In-Reply-To: X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x 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:174635 Archived-At: Stefan Monnier wrote: > I'm already doubtful that the local_* thingies will be useful, so > I think distinguishing between local_* and scoped_* is way beyond the > limit of diminishing returns. The more I look at it the more I think local_cons and local_list* are mistakes and should be discarded. For example, build_desired_tool_bar_string has a loop, each iteration of which creates temporaries; here local_list4 could exhaust the stack whereas scoped_list4 is fine, and trunk bzr 117912 fixed that by replacing local_list4 with scoped_list4. There appear to be similar problems in every function that currently uses local_cons or local_list*, so I'm thinking we should remove these macros and go back to Fcons and list*. We should also audit uses of make_local_vector, make_local_string, and build_local_string to make sure that none of them are in loops that could blow the stack. I think most uses of these are OK but some are questionable. If there's significant doubt whether the local_* and scoped_* thingies are useful perhaps we should simply remove all of them....