[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Dynamic loading progress
From: |
Stefan Monnier |
Subject: |
Re: Dynamic loading progress |
Date: |
Sun, 13 Sep 2015 09:14:32 -0400 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux) |
> The case where a module calls an emacs function that ends up calling
> signal/error.
OK, what are you worried about w.r.t that case?
> I don't know enough about how signaling and unwind-protect work. It's
> just black stack magic for me right now :)
Fsignal works using longjmp. unwind-protect (and dynamic let-bindings)
works by adding things onto a stack which Fsignal will run just prior to
calling longjmp.
> 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 don't understand what kind of error handling you have in mind.
How/why/when would we use things like error_get, error_clear, etc...?
> 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.
Fthrow uses the same technique as Fsignal, and I think your intuition is
right: it should just work (for both).
Stefan
- Re: Dynamic loading progress, Aurélien Aptel, 2015/09/12
- Re: Dynamic loading progress, Stefan Monnier, 2015/09/12
- Re: Dynamic loading progress, Aurélien Aptel, 2015/09/12
- Re: Dynamic loading progress, Philipp Stephani, 2015/09/13
- Re: Dynamic loading progress,
Stefan Monnier <=
- Re: Dynamic loading progress, Philipp Stephani, 2015/09/13
- Re: Dynamic loading progress, Stefan Monnier, 2015/09/13
- Re: Dynamic loading progress, Daniel Colascione, 2015/09/13
- Re: Dynamic loading progress, Stefan Monnier, 2015/09/13
- Re: Dynamic loading progress, Daniel Colascione, 2015/09/13
- Re: Dynamic loading progress, Stefan Monnier, 2015/09/14
- Re: Dynamic loading progress, Daniel Colascione, 2015/09/14
- Re: Dynamic loading progress, Stefan Monnier, 2015/09/14
- Re: Dynamic loading progress, Stephen Leake, 2015/09/14
- Re: Dynamic loading progress, Eli Zaretskii, 2015/09/14