Add primitives VALUES and CALL-WITH-VALUES.
authorMatt Birkholz <matt@birchwood-abbey.net>
Sun, 5 Feb 2017 02:31:49 +0000 (19:31 -0700)
committerMatt Birkholz <matt@birchwood-abbey.net>
Sun, 5 Feb 2017 02:31:49 +0000 (19:31 -0700)
commitf80f8a4628a6a4a13f6b23facbc8dc22643e82f1
treef14e49532b89f56fe1028ddb91fc3e2ee0c263c9
parent320a36bd84b2e514093c19d85b71bb1b4cdd4637
Add primitives VALUES and CALL-WITH-VALUES.

* microcode/hooks.c (Prim_values Prim_call_with_values): New.

* microcode/returns.h (RC_MULTIPLE_VALUES): New return code.
* microcode/interp.c: Interpret new return code.
* runtime/conpar.scm: Parse new stack frame type.

* runtime/boot.scm (values call-with-values with-values): Assign
these bindings earlier in the boot.  They are no longer inlined by the
scode optimizer and cannot be assigned later.
* runtime/global.scm: Remove old definitions.
* runtime/runtime.pkg: Move declarations.

* runtime/thread.scm (with-thread-events-blocked): Pass multiple values.
* runtime/wind.scm (%execute-at-new-state-point): Pass multiple values.
* compiler/base/cfg2.scm (cleanup-noop-nodes): Pass multiple values.

* src/sf/usiexp.scm (values-expansion call-with-values-expansion):
Remove.
src/compiler/base/cfg2.scm
src/microcode/hooks.c
src/microcode/interp.c
src/microcode/returns.h
src/runtime/boot.scm
src/runtime/conpar.scm
src/runtime/global.scm
src/runtime/runtime.pkg
src/runtime/thread.scm
src/runtime/wind.scm
src/sf/usiexp.scm