diff options
author | Andy Wingo <wingo@pobox.com> | 2018-08-11 14:22:32 +0200 |
---|---|---|
committer | Andy Wingo <wingo@pobox.com> | 2018-08-11 14:25:07 +0200 |
commit | 939b1ae23f680365fb6fd0a78653a281aaed95b6 (patch) | |
tree | 969e96ccfb96c4399978ee9af86e9783674fe7b0 /libguile/foreign.h | |
parent | 602702772412ffcf2476afa0a41b4e290fb67f59 (diff) | |
download | guile-939b1ae23f680365fb6fd0a78653a281aaed95b6.tar.gz |
Rework foreign-call trampoline
* libguile/foreign.c (scm_i_foreign_call): Rename back from
foreign_call. Need a new trampoline that's easier to call from JIT,
until we actually rewrite the FFI in terms of the JIT.
(scm_register_foreign): Remove foreign_call intrinsic init.
* libguile/intrinsics.h (SCM_FOR_ALL_VM_INTRINSICS): Foreign-call
intrinsic sets return directly on stack.
* libguile/vm-engine.c (foreign-call): Adapt to new intrinsic behavior.
* libguile/vm.c (foreign_call, scm_bootstrap_vm): Add new intrinsic
wrapper.
Diffstat (limited to 'libguile/foreign.h')
-rw-r--r-- | libguile/foreign.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/libguile/foreign.h b/libguile/foreign.h index d2278e801..41f26b335 100644 --- a/libguile/foreign.h +++ b/libguile/foreign.h @@ -104,6 +104,9 @@ SCM_API SCM scm_pointer_to_procedure_with_errno (SCM return_type, SCM func_ptr, SCM arg_types); SCM_API SCM scm_procedure_to_pointer (SCM return_type, SCM func_ptr, SCM arg_types); +SCM_INTERNAL SCM scm_i_foreign_call (SCM cif_scm, SCM pointer_scm, + int *errno_ret, + const union scm_vm_stack_element *argv); |