emacs-devel
[Top][All Lists]
Advanced

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

Re: tail-call elimination


From: Stefan Monnier
Subject: Re: tail-call elimination
Date: Mon, 10 Dec 2012 22:17:23 -0500
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux)

> + funargs = xmalloc (nargs * sizeof(Lisp_Object));
> + funargs = *(volatile Lisp_Object *) &funargs;
> +  {
> +    int i;
> +    for (i = 0; i < nargs; i++)
> +      {
> +        funargs[i] = args[i];
> +      }
> +  }
> +  stack.next = byte_stack_list;
> +  byte_stack_list = &stack;

Can you explain what this is doing?

> +   /* uses setjmp/longjmp rather than goto so that the emacs-lisp stack
> +      can be allocated on the CPU stack.  This is what the garbage collector
> +      assumes, so it is preferable to changing the garbage collector.
> +   */

Can you explain a bit more why `goto' wouldn't work?


        Stefan



reply via email to

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