From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: =?UTF-8?Q?Aur=C3=A9lien_Aptel?= Newsgroups: gmane.emacs.devel Subject: Re: Dynamic loading progress Date: Sun, 13 Sep 2015 01:11:45 +0200 Message-ID: References: <54F789B2.6030105@dancol.org> <87egnel6ac.fsf@lifelogs.com> <87vbgpk1po.fsf@lifelogs.com> <85mw20gmeo.fsf@stephe-leake.org> <878u97nyjn.fsf@lifelogs.com> <86d1yirnqw.fsf@stephe-leake.org> <87si7977rs.fsf@tromey.com> <55DB7C3D.4090106@cs.ucla.edu> <55DE75FD.8020308@cs.ucla.edu> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 X-Trace: ger.gmane.org 1442099522 17917 80.91.229.3 (12 Sep 2015 23:12:02 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 12 Sep 2015 23:12:02 +0000 (UTC) Cc: Stephen Leake , Emacs development discussions , Paul Eggert , Tom Tromey , Daniel Colascione To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Sep 13 01:12:01 2015 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 1Zatxg-0001Qx-6x for ged-emacs-devel@m.gmane.org; Sun, 13 Sep 2015 01:12:00 +0200 Original-Received: from localhost ([::1]:33968 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zatxf-0006oo-N0 for ged-emacs-devel@m.gmane.org; Sat, 12 Sep 2015 19:11:59 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:48743) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZatxT-0006nA-RY for emacs-devel@gnu.org; Sat, 12 Sep 2015 19:11:48 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZatxS-0001f4-PE for emacs-devel@gnu.org; Sat, 12 Sep 2015 19:11:47 -0400 Original-Received: from mail-ig0-x232.google.com ([2607:f8b0:4001:c05::232]:37498) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZatxS-0001f0-Jz for emacs-devel@gnu.org; Sat, 12 Sep 2015 19:11:46 -0400 Original-Received: by igbni9 with SMTP id ni9so61142237igb.0 for ; Sat, 12 Sep 2015 16:11:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; bh=ulCl+TQBuaxi6IxIhMvE25sfpTDA/UEqxp2c0GNn3ZY=; b=WMrRawlP+S8a9irCCXQM3jO1Np4pI9MmG5+SUmSE0oyFkcu/Pp93u0M6Tc7M9b6nsy Bf2N84A6ukq/jgmvVXVYvHVYJ8aUAwHgjGGEGsiBnvWgDg99q6PjJJY1Ll4e/vFtmdv1 SqjvgbHKYYhLG5L6SZeT2Ig21PGrd12OGUPg8DG+TP1qHNEEi8Z7Ao2hf95qy+RA0GFa BM+jhusbFXAeM4LSoxzswtRaN9DNAUarf7IPto/6S+sTbwcwieesgiSeYpPEf0le6Tod cO1IEzOxkTTtBznLoDUdsqV2HrhH5r7BQRdxVZhk36HRQAEy0MMeQIc1TRWhVj81CL09 JYHA== X-Received: by 10.50.221.104 with SMTP id qd8mr7300939igc.62.1442099506074; Sat, 12 Sep 2015 16:11:46 -0700 (PDT) Original-Received: by 10.36.146.193 with HTTP; Sat, 12 Sep 2015 16:11:45 -0700 (PDT) In-Reply-To: X-Google-Sender-Auth: ObASB8rsKEqakMHo3Bguezj6e8k X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2607:f8b0:4001:c05::232 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:189880 Archived-At: On Sat, Sep 12, 2015 at 10:42 PM, Stefan Monnier wrote: > Can you give us more details about you mean by the above. > Are you talking about how to handle things like calls to Fsignal, or to > Fthrow, or how to provide access to unwind-protect and condition-case in > to the module's? The case where a module calls an emacs function that ends up calling signal/error. I don't know enough about how signaling and unwind-protect work. It's just black stack magic for me right now :) I think we just need to implement funcall (from the module API) like this: global error = 0 module_funcall(fun, args): // wrap (protect?) this with the right code // - to keep the control // - set ret to nil and error to 1 in case of error ret = Ffuncall(fun, args) return ret The error is accessible via error_get(), error_clear() and error_check() in the module API. error_get() is currently redundant with error_check() unless we decide to return detailed errors. I didn't think about the case where a module calls Fthrow but my guess is it will just work. I have to test thoroughly what I have already anyway, I'll see if it works. > Indeed it's not guaranteed at all. It's not even guaranteed that when you > call the GC, all dead objects will be collected. Ok. Finalizers are better than nothing I guess.