From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Tom Tromey Newsgroups: gmane.emacs.devel Subject: Re: [Emacs-diffs] feature/byte-unwind-protect 916094a 2/2: Add new bytecodes for unwind-protect Date: Tue, 23 Jan 2018 08:44:47 -0700 Message-ID: <874lnck2a8.fsf@tromey.com> References: <20180123051231.6240.43062@vcs0.savannah.gnu.org> <20180123051232.EBBB6207FC@vcs0.savannah.gnu.org> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1516722218 12503 195.159.176.226 (23 Jan 2018 15:43:38 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Tue, 23 Jan 2018 15:43:38 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.91 (gnu/linux) Cc: Tom Tromey , emacs-devel@gnu.org To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Jan 23 16:43:34 2018 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 1ee0jP-0002bZ-AM for ged-emacs-devel@m.gmane.org; Tue, 23 Jan 2018 16:43:27 +0100 Original-Received: from localhost ([::1]:36388 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ee0lP-0006Ra-P2 for ged-emacs-devel@m.gmane.org; Tue, 23 Jan 2018 10:45:31 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:36130) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ee0ko-0006Qy-Kq for emacs-devel@gnu.org; Tue, 23 Jan 2018 10:44:55 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ee0kk-0006da-Df for emacs-devel@gnu.org; Tue, 23 Jan 2018 10:44:54 -0500 Original-Received: from gateway24.websitewelcome.com ([192.185.51.253]:38592) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1ee0kk-0006cC-4C for emacs-devel@gnu.org; Tue, 23 Jan 2018 10:44:50 -0500 Original-Received: from cm12.websitewelcome.com (cm12.websitewelcome.com [100.42.49.8]) by gateway24.websitewelcome.com (Postfix) with ESMTP id C9B56E1B5F7 for ; Tue, 23 Jan 2018 09:44:48 -0600 (CST) Original-Received: from box5379.bluehost.com ([162.241.216.53]) by cmsmtp with SMTP id e0kie5I95zzFje0kielN80; Tue, 23 Jan 2018 09:44:48 -0600 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=tromey.com; s=default; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date: References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=zsRx1kIcraSXDuc2nsuEwIXuZtpbBqP0KomOz/JnW70=; b=vBopq+nGzkDvbV70iWD5gT+jFQ igSexvIJgaGU8EgAtIFFRTywE/nbkXTyo9U2v21ZB287AUtqK98k/z4gyv7aSo3m3bwqMHgXnZLlJ G+PaSgX2ZKIm5Z7NAKMIRlk2/; Original-Received: from 71-218-90-63.hlrn.qwest.net ([71.218.90.63]:35682 helo=pokyo) by box5379.bluehost.com with esmtpsa (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.89) (envelope-from ) id 1ee0ki-003pfz-E0; Tue, 23 Jan 2018 09:44:48 -0600 X-Attribution: Tom In-Reply-To: (Stefan Monnier's message of "Tue, 23 Jan 2018 10:35:31 -0500") X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - box5379.bluehost.com X-AntiAbuse: Original Domain - gnu.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - tromey.com X-BWhitelist: no X-Source-IP: 71.218.90.63 X-Source-L: No X-Exim-ID: 1ee0ki-003pfz-E0 X-Source: X-Source-Args: X-Source-Dir: X-Source-Sender: 71-218-90-63.hlrn.qwest.net (pokyo) [71.218.90.63]:35682 X-Source-Auth: tom+tromey.com X-Email-Count: 2 X-Source-Cap: ZWx5bnJvYmk7ZWx5bnJvYmk7Ym94NTM3OS5ibHVlaG9zdC5jb20= X-Local-Domain: yes X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 192.185.51.253 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:222169 Archived-At: >>>>> "Stefan" == Stefan Monnier writes: >> + CASE (Bpushunwindprotect): /* New in 27.1. */ >> + { >> + struct handler *c = push_handler (Qt, CATCHER_ALL); Stefan> Hmm... using this "catch+rethrow" method interferes with the Stefan> debug-on-error stacktrace: Hmm, yeah. Any ideas for fixing this? One idea would be to capture the stack trace when CATCHER_ALL is targeted, then have a way to pass this to signal or throw. But often the stack trace isn't needed. Stefan> I also wonder if there can be places where we call something like Stefan> `unbind_to` which should run those new unwind-forms but won't find it Stefan> because it won't look at the handlers [ offhand, I can't think of any Stefan> place where that would happen, and I think it's probably OK, but Stefan> I can't quite convince myself that it definitely is. ] If this happens then surely it's already a problem for catch and condition-case? Stefan> All in all, I'd really prefer if we kept the unwind forms in Stefan> the specpdl. Was there a particular reason why you used the Stefan> handlers instead? This is how catch and condition-case are implemented. I do agree there's no reason to have a separate handler list. In fact this puzzled me for a while. However I think it's a separate cleanup. Tom