From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,2cb1f0b6d642e1dc X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!news2.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!news-out.readnews.com!transit3.readnews.com!s09-10.readnews.com!not-for-mail Date: Fri, 25 Mar 2011 13:35:21 -0400 From: Hyman Rosen User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.2.15) Gecko/20110303 Thunderbird/3.1.9 MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: Pascal Calling Convention References: <9b04626e-567d-408c-aab3-39b964b3ffd6@l2g2000prg.googlegroups.com> <4d8ccaa3$0$26415$882e7ee2@usenet-news.net> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Message-ID: <4d8cd25d$0$28492$882e7ee2@usenet-news.net> NNTP-Posting-Host: 88b6f555.usenet-news.net X-Trace: DXC=;1KLkGZOS=nSGd6HEAJ6Yh^oXGM_6\KV`mX0AG3X_jUoY8en6?4dWGki22nWOTKLQcMcWTcYQB@Pa]@PLP6D1V2lI@Dk0HQ7Lda X-Complaints-To: abuse@usenet-news.net Xref: g2news2.google.com comp.lang.ada:19425 Date: 2011-03-25T13:35:21-04:00 List-Id: On 3/25/2011 1:09 PM, Robert A Duff wrote: > Hyman Rosen writes: > >> On 3/25/2011 12:04 PM, Robert A Duff wrote: >>> There must be a stack. >> >> Why? > > Because Ada supports recursion, which implies a LIFO data structure -- > a stack. One per task, in fact. Recursion just implies that when a procedure is called (or when any local scope is entered) it is allocated a separate set of its local variables. That can be done with tree-like allocation structures instead of a stack. In continuation-passing languages with garbage collection, returning from a procedure or exiting a scope does not imply freeing the variables of that scope, because that scope can be re-entered.