mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-07-02 23:50:47 +02:00
Add machinery to pass thread and/or closure when invoking subr
* libguile/gsubr.c: Arrange to store flags alongside array of subrs. One flag indicates the thread should also be passed as the first argument; another says that the closure should be passed. Should remove the need for arg shuffling in get_callee_vcode eventually. (record_subr_name): Make the names be a vector; will integrate better with precise tracing. (create_subr): Add flags arg. Adapt callers. (scm_apply_subr): Allow for passing thread or closure. * libguile/gsubr-internal.h: Add new interfaces to see whether to pass closure or thread. Pass thread to scm_apply_subr. * libguile/jit.c (compile_subr_call): Allow for passing thread or closure. * libguile/vm-engine.c (subr_call): Pass thread.
This commit is contained in:
parent
c03071b380
commit
710fa4c6f0
4 changed files with 149 additions and 75 deletions
|
@ -971,7 +971,7 @@ VM_NAME (scm_thread *thread)
|
|||
UNPACK_24 (op, idx);
|
||||
|
||||
SYNC_IP ();
|
||||
ret = scm_apply_subr (sp, idx, FRAME_LOCALS_COUNT ());
|
||||
ret = scm_apply_subr (thread, sp, idx, FRAME_LOCALS_COUNT ());
|
||||
|
||||
if (SCM_UNLIKELY (scm_is_values (ret)))
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue