From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: tail-call elimination Date: Mon, 10 Dec 2012 22:17:23 -0500 Message-ID: References: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1355195854 7231 80.91.229.3 (11 Dec 2012 03:17:34 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 11 Dec 2012 03:17:34 +0000 (UTC) Cc: emacs-devel@gnu.org To: Chris Gray Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Dec 11 04:17:47 2012 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1TiGLl-0006Kp-T0 for ged-emacs-devel@m.gmane.org; Tue, 11 Dec 2012 04:17:42 +0100 Original-Received: from localhost ([::1]:45449 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TiGLZ-0005za-AJ for ged-emacs-devel@m.gmane.org; Mon, 10 Dec 2012 22:17:29 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:34916) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TiGLW-0005zT-71 for emacs-devel@gnu.org; Mon, 10 Dec 2012 22:17:27 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TiGLV-0006VC-5h for emacs-devel@gnu.org; Mon, 10 Dec 2012 22:17:26 -0500 Original-Received: from ironport2-out.teksavvy.com ([206.248.154.182]:53413) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TiGLV-0006V0-2f for emacs-devel@gnu.org; Mon, 10 Dec 2012 22:17:25 -0500 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Av0EAG6Zu09soXOY/2dsb2JhbABEtBGBCIIWAQVWIxALNBIUGA0kiCG6CZBEA4hCmnGBWIMH X-IronPort-AV: E=Sophos;i="4.75,637,1330923600"; d="scan'208";a="209575757" Original-Received: from 108-161-115-152.dsl.teksavvy.com (HELO pastel.home) ([108.161.115.152]) by ironport2-out.teksavvy.com with ESMTP/TLS/ADH-AES256-SHA; 10 Dec 2012 22:17:24 -0500 Original-Received: by pastel.home (Postfix, from userid 20848) id F23714E08E; Mon, 10 Dec 2012 22:17:23 -0500 (EST) In-Reply-To: (Chris Gray's message of "Mon, 10 Dec 2012 18:57:05 -0800") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 206.248.154.182 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:155444 Archived-At: > + 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