diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2018-10-26 07:22:33 -0700 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2018-10-26 07:22:33 -0700 |
commit | c4d91d0128dd998a73d216fe7bb0132c41d901bc (patch) | |
tree | f057f4f0a3a7e4f61bc629851485bf11e6f1805f /vmop.h | |
parent | d8185f6ae9d706f68e3ad3da5c1899ffffab415d (diff) | |
download | txr-c4d91d0128dd998a73d216fe7bb0132c41d901bc.tar.gz txr-c4d91d0128dd998a73d216fe7bb0132c41d901bc.tar.bz2 txr-c4d91d0128dd998a73d216fe7bb0132c41d901bc.zip |
vm/asm: new instructions getlx and setlx.
These instructions can be used for accessing cached global
variable bindings through the symtab of the vm descriptor.
The compiler will use these for optimizing access to global
lexical variables.
* share/txr/stdlib/asm.tl (op-getlx, op-setlx): New opcode
classes.
* vm.c (vm_stab): Take the lookup function as an argument,
so this can be used for variable bindings.
(vm_gcall, vm_gapply): Pass lookup_fun function to vm_stab,
as well as the appropriate string for the unbound error.
(vm_gettab, vm_settab): New static functions.
(vm_execute): Implement GETLX and SETLX using vm_gettab and
vm_settab.
* vmop.h: Regenerated.
Diffstat (limited to 'vmop.h')
-rw-r--r-- | vmop.h | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -66,4 +66,6 @@ typedef enum vm_op { SETL1 = 37, BINDV = 38, CLOSE = 39, + GETLX = 40, + SETLX = 41, } vm_op_t; |