[m-rev.] [m-dev.] Mercury, Emscripten, and WebAssembly

Peter Wang novalazy at gmail.com
Tue Mar 31 10:52:59 AEDT 2020


On Mon, 30 Mar 2020 00:42:09 -0700, Patrick Henning <path at fea.st> wrote:
> Does Mercury need `signal` in the absence of `sigaction`? If so, the porting may not be possible currently since neither of these are implemented for emscripten unfortunately.

The runtime will use signal if sigaction is not available;
see MR_set_signal_action.

The runtime does set up signal handlers for SIGSEGV/SIGBUS to display an
error message in case of a crash, but is not really required.

Time profiling grades (.prof) need to set a signal handler for a timer
signal (see MR_init_time_profile_method), so you could not use those
grades.

Parallel grades (.par) will need to set signal handlers which are used
in the stop-the-world implementation for GC, so you could not those
grades.

Debugging grades set a couple of signal handlers.

Peter


More information about the reviews mailing list