diff options
author | Andy Wingo <wingo@pobox.com> | 2019-06-06 16:20:20 +0200 |
---|---|---|
committer | Andy Wingo <wingo@pobox.com> | 2019-06-06 16:36:32 +0200 |
commit | 9fd978ed7eebe32ceff7762eb87bba5d56a0743c (patch) | |
tree | e2b7e28c42924c1c5aced9f56cdbdec525c5146c /doc/ref | |
parent | 12d6e4317657e4334306b1345a09a11b0e256fa3 (diff) | |
download | guile-9fd978ed7eebe32ceff7762eb87bba5d56a0743c.tar.gz |
Add bind-optionals instruction
* doc/ref/vm.texi (Function Prologue Instructions): Document new
instruction.
* libguile/jit.c (compile_bind_optionals): New compiler.
* libguile/vm-engine.c (VM_NAME): New interpreter.
* module/system/vm/assembler.scm (opt-prelude): Emit bind-optionals as
appropriate.
* module/system/vm/disassembler.scm (define-stack-effect-parser)
(code-annotation): Handle bind-optionals.
Diffstat (limited to 'doc/ref')
-rw-r--r-- | doc/ref/vm.texi | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/doc/ref/vm.texi b/doc/ref/vm.texi index 5a0b5a739..e603204ca 100644 --- a/doc/ref/vm.texi +++ b/doc/ref/vm.texi @@ -807,6 +807,12 @@ will signal an error if an unknown key is found. A macro-mega-instruction. @end deftypefn +@deftypefn Instruction {} bind-optionals f24:@var{nlocals} +Expand the current frame to have at least @var{nlocals} locals, filling +in any fresh values with @code{SCM_UNDEFINED}. If the frame has more +than @var{nlocals} locals, it is left as it is. +@end deftypefn + @deftypefn Instruction {} bind-rest f24:@var{dst} Collect any arguments at or above @var{dst} into a list, and store that list at @var{dst}. @@ -814,8 +820,7 @@ list at @var{dst}. @deftypefn Instruction {} alloc-frame c24:@var{nlocals} Ensure that there is space on the stack for @var{nlocals} local -variables, setting them all to @code{SCM_UNDEFINED}, except those values -that are already on the stack. +variables. The value of any new local is undefined. @end deftypefn @deftypefn Instruction {} reset-frame c24:@var{nlocals} |