Hi Tomas,

> The 64 bit picolisp uses the "C control stack" to call functions.

I would rather call it the "hardware stack".


> Isn't the call usually like the following?
>    call (C)  # Eval SUBR

Yes, but these are in fact only two special places (in "src64/apply.l").
The typical cases (and most often executed) are conditional jumps in
"src64/main.l", in the form of 'jnz (A)'.


> Is the call in the form:
>    jmp (A)  # Eval SUBR
> "just" an optimization for tail calls?

Yes, though I would not use the word "tail" here. Such calls can happen
anywhere in a function. A sequence of 'call' and 'ret' can always be
replaced with a 'jmp'.

The above typical case of

   jnz (A)

would otherwise need to be

   if nz
      call (A)
      ret
   end

Cheers,
- Alex
-- 
UNSUBSCRIBE: mailto:picol...@software-lab.de?subject=unsubscribe

Reply via email to