3 ms·
How are exceptions handled with this design? For example the `n < 3` may throw (it invokes the valueOf method).
by ridiculous_fish 8y ago
How are exceptions handled with this design? For example the `n < 3` may throw (it invokes the valueOf method).
- timruffles 8y agoI went for longjmp(), non-local goto, for precisely the reason you highlighted: I realised pretty well everything in JS can throw, so needed something easy to trigger from anywhere See https://github.com/timruffles/js-to-c/blob/1befbf4220753576e2d08c3607ab445c3ddad9ea/runtime/exceptions.c https://github.com/timruffles/js-to-c/blob/1befbf4220753576e...