Marco Maggi <[email protected]> writes:

> Mh... I have very few functions accepting a single argument.

I think there are lots of standard functions with a single argument,
including many accessor functions, predicates, and conversion functions.
And some functions which accept a variable number of arguments have
special behaviour for exactly one argument. 

Can't say if it really is a worthwhile optimization with a separate
entry point, but it is a nice symmetry given that the same optimization
*is* worthwhile for continuations/return addresses.

> How  would  one  implement  continuations  when  a  function
> argument is in a register  (rather than on the Scheme stack,
> however implemented)?  In a complex way I presume.

I planned to have no stack. Instead all activation records would be
allocated on the heap. With inspiration from Appel's "Compiling with
continuations", which describes a compiler for Standard ML. If I
remember the reported benchmarks correctly, it typically allocated one
word of storage for every 5 machine instructions executed, and it still
had reasonably low overhead from gc.

Regards,
/Niels

-- 
Niels Möller. PGP-encrypted email is preferred. Keyid C0B98E26.
Internet email is subject to wholesale government surveillance.

Reply via email to