From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: Patch for fields of `struct buffer' Date: Mon, 31 Jan 2011 16:54:27 -0500 Message-ID: References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: dough.gmane.org 1296511785 21471 80.91.229.12 (31 Jan 2011 22:09:45 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Mon, 31 Jan 2011 22:09:45 +0000 (UTC) Cc: rms@gnu.org, emacs-devel@gnu.org To: Tom Tromey Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Jan 31 23:09:41 2011 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.69) (envelope-from ) id 1Pk1wJ-0006St-87 for ged-emacs-devel@m.gmane.org; Mon, 31 Jan 2011 23:09:41 +0100 Original-Received: from localhost ([127.0.0.1]:43943 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Pk1qo-0007n0-2F for ged-emacs-devel@m.gmane.org; Mon, 31 Jan 2011 17:03:58 -0500 Original-Received: from [140.186.70.92] (port=42928 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Pk1hg-0001bL-1p for emacs-devel@gnu.org; Mon, 31 Jan 2011 16:54:33 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Pk1hd-0005XJ-Gt for emacs-devel@gnu.org; Mon, 31 Jan 2011 16:54:30 -0500 Original-Received: from ironport2-out.teksavvy.com ([206.248.154.183]:24758 helo=ironport2-out.pppoe.ca) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Pk1hd-0005XD-DC; Mon, 31 Jan 2011 16:54:29 -0500 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AvsEABm+Rk1Ld/8K/2dsb2JhbACkeHS9Q4VOBIUTj2g X-IronPort-AV: E=Sophos;i="4.60,406,1291611600"; d="scan'208";a="90004700" Original-Received: from 75-119-255-10.dsl.teksavvy.com (HELO ceviche.home) ([75.119.255.10]) by ironport2-out.pppoe.ca with ESMTP/TLS/ADH-AES256-SHA; 31 Jan 2011 16:54:28 -0500 Original-Received: by ceviche.home (Postfix, from userid 20848) id DCB43660DC; Mon, 31 Jan 2011 16:54:27 -0500 (EST) In-Reply-To: (Tom Tromey's message of "Mon, 31 Jan 2011 13:49:13 -0700") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 206.248.154.183 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:135358 Archived-At: > Yeah, you could. On a thread-switch, you could unwind all the old > thread's bindings, then restore the new thread's bindings. > This would let all the existing C code work without indirections or > macro trickery; the downsides are that you have to have user-space > control over thread switching, and thread switching becomes expensive. I also expect some really nasty cases showing up when you try to rewind a thread's bindings. E.g. if a let-binding that was originally applied to a global variable has to be rewound (i.e. re-applied) to a variable that has become buffer-local in the mean time. I guess this brings up back into the core of the issue: the semantics of thread-local dynamic scoping and its interaction with buffer-local bindings. Stefan