diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2018-03-12 20:07:10 -0700 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2018-03-12 20:07:10 -0700 |
commit | bf523ef3457d20fd1b1c3e8113136966ec035177 (patch) | |
tree | c284e712aa086b10ea8844f0b9570cadf135b5c0 /share | |
parent | c9d60bd84e0a77407b0f88326268c92aaeebd9d2 (diff) | |
download | txr-bf523ef3457d20fd1b1c3e8113136966ec035177.tar.gz txr-bf523ef3457d20fd1b1c3e8113136966ec035177.tar.bz2 txr-bf523ef3457d20fd1b1c3e8113136966ec035177.zip |
vm: introduce sframe instruction.
This is for allocating a new frame purely on the stack. The
frame will not be captured by lexical closures, and so can
only be used for non-shared variables and additional
compiler-generated temporaries (if registers run out, for
instance).
* share/txr/stdlib/asm.tl (op-sframe, sframe): New opcode
class and opcode.
* vm.c (vm_do_frame): New static function for the common
implementation of frame and sframe.
(vm_frame): Now just a call with vm_do_frame, passing the flag
indicating that closure capture is enabled for this
environment frame.
(vm_sframe): New static function.
* vmop.h: Regenerated.
Diffstat (limited to 'share')
-rw-r--r-- | share/txr/stdlib/asm.tl | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/share/txr/stdlib/asm.tl b/share/txr/stdlib/asm.tl index c6a7efc9..4871dd4f 100644 --- a/share/txr/stdlib/asm.tl +++ b/share/txr/stdlib/asm.tl @@ -268,6 +268,8 @@ (:method dis (me asm lev size) ^(,me.symbol ,lev ,size))) +(defopcode-derived op-sframe sframe auto op-frame) + (defopcode-derived op-dframe dframe auto op-frame) (defopcode op-end end auto |