summaryrefslogtreecommitdiffstats
path: root/mpi/mpi-config.h
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2018-03-18 21:58:52 -0700
committerKaz Kylheku <kaz@kylheku.com>2018-03-18 21:58:52 -0700
commitead6bfb544e95509e6cd1364ec2fd95d88683b33 (patch)
tree3931a5aeb25dcacd0cc5ccae43bcc9850743a42e /mpi/mpi-config.h
parentcb107336fa2bfd2cf7f548bf82e0ff1d1484de21 (diff)
downloadtxr-ead6bfb544e95509e6cd1364ec2fd95d88683b33.tar.gz
txr-ead6bfb544e95509e6cd1364ec2fd95d88683b33.tar.bz2
txr-ead6bfb544e95509e6cd1364ec2fd95d88683b33.zip
vm: function table for faster calls.
The vm now supports gcall and gapply opcodes which index numerically (using an immediate integer field in the instruction word) into a table of pre-resolved global function bindings. * share/txr/stdlib/asm.tl (op-gcall, op-gapply): New opcodes. (disassemble-c-d): Take the function vector as an argument and dump it too. (usr:disassemble): Extract function vector from VM description and pass it to disassemble-c-d. * share/txr/stdlib/compiler.tl (usr:compile-toplevel): Pass empty function symbol vector to vm-make-desc; it's now a required argument. * vm.c (struct vm_desc): New members funvec and ftab. (struct vm_ftent): New struct type. (vm_make_desc): New argument, funvec. Store funvec in the descriptor. Allocate a table of vm_ftent structures equal in number of elements to the function table, and populate it with resolved bindings. (vm_desc_funvec, vm_desc_destroy): New static functions. (vm_desc_mark): Mark the captured bindings in vd->ftab. (vm_gcall, vm_gapply): New static functions. (vm_execute): Handle GCALL and GAPPLY opcodes. (vm_desc_ops): Wire vm_desc_destroy in place of cobj_destroy_free_op. (vm_init): Add argument to vm-make-desc intrinsic. Register vm-desc-funvec intrinsic. * vm.h (vm_make_desc): Declaration updated. * vmop.h: Regenerated
Diffstat (limited to 'mpi/mpi-config.h')
0 files changed, 0 insertions, 0 deletions