mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-06-16 16:50:21 +02:00
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.
This commit is contained in:
parent
12d6e43176
commit
9fd978ed7e
5 changed files with 73 additions and 9 deletions
|
@ -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}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue