From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Tom Tromey Newsgroups: gmane.emacs.devel Subject: Re: advice needed for multi-threading patch Date: Wed, 26 Aug 2009 10:08:01 -0600 Message-ID: References: Reply-To: Tom Tromey NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1251304489 8825 80.91.229.12 (26 Aug 2009 16:34:49 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 26 Aug 2009 16:34:49 +0000 (UTC) Cc: Emacs development discussions To: Ken Raeburn Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Aug 26 18:34:42 2009 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1MgLSH-0002Ez-QE for ged-emacs-devel@m.gmane.org; Wed, 26 Aug 2009 18:34:38 +0200 Original-Received: from localhost ([127.0.0.1]:57799 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MgLSG-0003Ks-Og for ged-emacs-devel@m.gmane.org; Wed, 26 Aug 2009 12:34:36 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MgL2l-0007RR-CM for emacs-devel@gnu.org; Wed, 26 Aug 2009 12:08:15 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MgL2g-0007Oh-Gn for emacs-devel@gnu.org; Wed, 26 Aug 2009 12:08:14 -0400 Original-Received: from [199.232.76.173] (port=54388 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MgL2g-0007OW-Cm for emacs-devel@gnu.org; Wed, 26 Aug 2009 12:08:10 -0400 Original-Received: from mx1.redhat.com ([209.132.183.28]:64067) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MgL2d-0002ST-LN for emacs-devel@gnu.org; Wed, 26 Aug 2009 12:08:09 -0400 Original-Received: from int-mx01.intmail.prod.int.phx2.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id n7QG85hX016244; Wed, 26 Aug 2009 12:08:05 -0400 Original-Received: from ns3.rdu.redhat.com (ns3.rdu.redhat.com [10.11.255.199]) by int-mx01.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id n7QG84Gw021532; Wed, 26 Aug 2009 12:08:05 -0400 Original-Received: from opsy.redhat.com (ovpn01.gateway.prod.ext.phx2.redhat.com [10.5.9.1]) by ns3.rdu.redhat.com (8.13.8/8.13.8) with ESMTP id n7QG810W006405; Wed, 26 Aug 2009 12:08:02 -0400 Original-Received: by opsy.redhat.com (Postfix, from userid 500) id 5AD4C3782A9; Wed, 26 Aug 2009 10:08:01 -0600 (MDT) X-Attribution: Tom In-Reply-To: (Ken Raeburn's message of "Wed, 26 Aug 2009 03:06:38 -0400") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux) X-Scanned-By: MIMEDefang 2.67 on 10.5.11.11 X-detected-operating-system: by monty-python.gnu.org: Genre and OS details not recognized. X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:114620 Archived-At: >>>>> "Ken" == Ken Raeburn writes: Ken> I hope you and Daniel and I aren't doing redundant work. Unless your changes apply to Emacs I don't think they are really redundant. I think the key thing is agree how it ought to work, so we end up with the same model, but I don't anticipate any problems there. Ken> I've written similar elisp code for doing transformations of patterns Ken> within the Emacs code -- mostly more localized things like "XCONS Ken> (expr)->car" to "XCAR (expr)", but with support for somewhat complex Ken> values of "expr" that have to have balanced parens, etc. If you still have these, I would appreciate a copy, so that I don't have to reinvent them. Are they in your git repository? Ken> I wonder if anyone's looking at collecting elisp tools for C Ken> refactoring somewhere. There may be some on the CEDET site. I don't remember seeing any on the wiki or elsewhere. Ken> Should I take this to mean you've already dealt with the buffer-local Ken> variables created by make-variable-buffer-local, which don't live in Ken> the buffer structure? Well... nominally. It is still a buggy mess. Ken> If so, I wonder if you can make use of those Ken> changes, by replacing XBUFFER(b)->thing with SYMBOL_VALUE(Qthing) Ken> where Qthing holds a symbol that's marked as buffer-local; then all Ken> the changes for the interaction between thread-local and buffer-local Ken> bindings would be localized in indirect_variable and friends, which Ken> would then have to deal with both Lisp_Misc_Buffer_Objfwd and Ken> Lisp_Misc_Buffer_Local_Value. I will have to think about this. This would imply removing all those slots from struct buffer; I suppose my concern would be that the result would be too inefficient. I've also been considering a similar thing for the Vfoo globals: remove them and have the C code always refer to them via SYMBOL_VALUE. Tom