ffi: Follow example of C_call_scheme and eliminate aborts.
authorMatt Birkholz <matt@birchwood-abbey.net>
Mon, 7 Aug 2017 01:16:52 +0000 (18:16 -0700)
committerMatt Birkholz <matt@birchwood-abbey.net>
Mon, 7 Aug 2017 01:16:52 +0000 (18:16 -0700)
commit480e2460fbbdec7ebacb1d530c71f00d1e12c07d
tree2da1bccb8ce4325125ef177def2bd2442c7c4d8d
parent9ba09ebd379f0c80735e6c7f5b5a7b52b7218da8
ffi: Follow example of C_call_scheme and eliminate aborts.

Punt pop_return_p parameter to Interpret; instead, leave #f in EXP and
Re_Enter_Interpreter, like C_call_scheme.  Keep callouts simple, fast.
Make callbacks save/restore machine state (last_return_code,
C_Frame_Pointer, C_Stack_Pointer, LEXPR_ACTUALS and PRIMITIVE) and use
RC_END_OF_COMPUTATION, also like C_call_scheme.

Add a gc-flip to the test callback.
src/microcode/boot.c
src/microcode/extern.h
src/microcode/interp.c
src/microcode/pruxffi.c
tests/ffi/test-ffi-wrapper.scm