mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-06-14 15:40:19 +02:00
Add current-thread VM op
* libguile/vm-engine.c (current-thread): New op. * module/language/cps/effects-analysis.scm (&thread): New memory kind. * module/language/cps/compile-bytecode.scm (compile-function): * module/language/cps/effects-analysis.scm (current-thread): * module/language/cps/types.scm (current-thread): * module/language/tree-il/primitives.scm (*interesting-primitive-names*): * module/system/vm/assembler.scm (emit-current-thread): Wire up the new op.
This commit is contained in:
parent
c3240d09b2
commit
8c75a5eb1b
6 changed files with 38 additions and 2 deletions
|
@ -3468,7 +3468,20 @@ VM_NAME (scm_i_thread *thread, struct scm_vm *vp,
|
|||
NEXT (3);
|
||||
}
|
||||
|
||||
VM_DEFINE_OP (160, unused_160, NULL, NOP)
|
||||
/* current-thread dst:24
|
||||
*
|
||||
* Write the current thread into DST.
|
||||
*/
|
||||
VM_DEFINE_OP (160, current_thread, "current-thread", OP1 (X8_S24) | OP_DST)
|
||||
{
|
||||
scm_t_uint32 dst;
|
||||
|
||||
UNPACK_24 (op, dst);
|
||||
SP_SET (dst, thread->handle);
|
||||
|
||||
NEXT (1);
|
||||
}
|
||||
|
||||
VM_DEFINE_OP (161, unused_161, NULL, NOP)
|
||||
VM_DEFINE_OP (162, unused_162, NULL, NOP)
|
||||
VM_DEFINE_OP (163, unused_163, NULL, NOP)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue