mit-scheme-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [MIT-Scheme-devel] R7RS and values.


From: Matt Birkholz
Subject: Re: [MIT-Scheme-devel] R7RS and values.
Date: Thu, 27 Oct 2016 22:58:46 -0700

> From: Taylor R Campbell <address@hidden>
> Date: Fri, 14 Oct 2016 20:10:38 +0000
> 
>    Date: Fri, 14 Oct 2016 12:25:12 -0700
>    From: Matt Birkholz <address@hidden>
> 
>    Did I hear that VALUES might not be terribly expensive nor difficult
>    to implement?  Taylor suggested a simple trap is all we need(?).
>    I have tried to work out the details here.
> 
> What I experimented with several years ago was to add not another
> trap, but another return code.  (It will require additional work in
> the compiler, since the four {interpreter, compiler}^2 paths from
> callee to caller are all slightly different.)

OK.  I just pushed a multiple-values branch with a commit that does
basically what you describe.  It adds the two primitives (VALUES and
CALL-WITH-VALUES) and an RC_MULTIPLE_VALUES handler that does the
stack manipulation.

Disabling 9.2's expansion of VALUES and CALL-WITH-VALUES forms allowed
a cross-runtime to be built, and a couple small fixes (procedures that
need to pass along multiple values) got the cross-compiler running, so
it builds and runs...

...rather slowly.  This perhaps is where a REFLECT_CODE_MULTIPLE_
VALUES must come to the rescue (to avoid many longjmps?).

I never did find a need to futz with the compiler.  Presumably you
meant the compiled code interface, possibly by adding a reflect
code...



reply via email to

[Prev in Thread] Current Thread [Next in Thread]