Philipp Stephani <p.stephani2@gmail.com> schrieb am Mo., 28. Sep. 2015 um 17:35 Uhr:
Aurélien Aptel <aurelien.aptel+emacs@gmail.com> schrieb am Do., 24. Sep. 2015 um 14:45 Uhr:
Some updates.

I haven't made any progress on errors. I was reading on
condition-case, setjmp/longjmp and how it's used for
signaling/throwing. I actually knew very little about it. I shouldnt
be the one writing this stuff I think... Anyway I was looking into how
I would set up a "catch-all" wrapping code so that we can implement a
funcall that always returns and I still haven't figured it out.

Note that code is only a suggestion how it could be implemented. It deviates from Daniel's design by using return parameters instead of TLS, but that's only a minor difference. The important part is the addition of protected_call_n to eval.c.

Here's a more minimal implementation using TLS (but we only have one thread, the thread checking needs to be implemented as well, but that's unrelated):
https://github.com/phst/emacs-dynamic-module/commit/41a8cb8a1d29346331fcaf1f28b6c5bee8c8f6ad
This is less than minimal because throw isn't dealt with.