diff options
author | Andy Wingo <wingo@pobox.com> | 2014-02-02 23:19:22 +0100 |
---|---|---|
committer | Andy Wingo <wingo@pobox.com> | 2014-02-02 23:19:22 +0100 |
commit | b3ae2b5068cbfcb6e9eec7ff96cd936f1c861396 (patch) | |
tree | 7335f265d952a8cc8f148b2305c3770c3dd00da8 /doc/ref/compiler.texi | |
parent | 0320b1fc3f22e4edda5f79e949e5fccda49b8680 (diff) | |
download | guile-b3ae2b5068cbfcb6e9eec7ff96cd936f1c861396.tar.gz |
Add VM and compiler support for calls to known procedures
* module/language/cps.scm ($callk): New expression type, for calls to
known labels. Part of "low CPS".
* module/language/cps/arities.scm:
* module/language/cps/closure-conversion.scm:
* module/language/cps/compile-bytecode.scm:
* module/language/cps/dce.scm:
* module/language/cps/dfg.scm:
* module/language/cps/effects-analysis.scm:
* module/language/cps/simplify.scm:
* module/language/cps/slot-allocation.scm:
* module/language/cps/verify.scm: Adapt call sites.
* libguile/vm-engine.c (call-label, tail-call-label): New instructions.
Renumber the rest; this is an ABI change.
* libguile/_scm.h (SCM_OBJCODE_MINOR_VERSION):
* module/system/vm/assembler.scm (*bytecode-minor-version*): Bump.
* doc/ref/compiler.texi (CPS in Guile): Document $callk.
Diffstat (limited to 'doc/ref/compiler.texi')
-rw-r--r-- | doc/ref/compiler.texi | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/doc/ref/compiler.texi b/doc/ref/compiler.texi index 845d5a8ae..640733838 100644 --- a/doc/ref/compiler.texi +++ b/doc/ref/compiler.texi @@ -687,10 +687,17 @@ entry. @end deftp @deftp {CPS Expression} $call proc args +@deftpx {CPS Expression} $callk label proc args Call @var{proc} with the arguments @var{args}, and pass all values to the continuation. @var{proc} and the elements of the @var{args} list should all be variable names. The continuation identified by the term's @var{k} should be a @code{$kreceive} or a @code{$ktail} instance. + +@code{$callk} is for the case where the call target is known to be in +the same compilation unit. @var{label} should be some continuation +label, though it need not be in scope. In this case the @var{proc} is +simply an additional argument, since it is not used to determine the +call target at run-time. @end deftp @deftp {CPS Expression} $primcall name args |