Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!news.glorb.com!news-out.readnews.com!news-xxxfer.readnews.com!news.misty.com!news.iecc.com!nerds-end From: Robert A Duff Newsgroups: comp.compilers Subject: Re: PL/I nostalgia Date: Sun, 29 Apr 2012 10:16:58 -0400 Organization: The World Public Access UNIX, Brookline, MA Lines: 22 Sender: news@iecc.com Approved: comp.compilers@iecc.com Message-ID: <12-04-086@comp.compilers> References: <12-04-070@comp.compilers> <12-04-077@comp.compilers> <12-04-081@comp.compilers> <12-04-082@comp.compilers> <12-04-084@comp.compilers> <12-04-085@comp.compilers> NNTP-Posting-Host: news.iecc.com X-Trace: leila.iecc.com 1335716373 81053 64.57.183.58 (29 Apr 2012 16:19:33 GMT) X-Complaints-To: abuse@iecc.com NNTP-Posting-Date: Sun, 29 Apr 2012 16:19:33 +0000 (UTC) Keywords: PL/I, code Posted-Date: 29 Apr 2012 12:19:33 EDT X-submission-address: compilers@iecc.com X-moderator-address: compilers-request@iecc.com X-FAQ-and-archives: http://compilers.iecc.com Xref: csiph.com comp.compilers:629 glen herrmannsfeldt writes: > OK, to get an actual compiler question into the discussion, > are there any compilers that generate non-reentrant code for > a language that allows recursion when it isn't being used? Yes, in the small-machine embedded systems world. On a modern 64-bit machine with efficient addressing based on a stack pointer and/or frame pointer, I suspect it would be a pessimization. Note that recursion isn't the only issue -- there's also multi-threading. - Bob [I expect that on modern machines where code is generally read-only to allow sharing between processes, there's no advantage to non-recursive code. Back in the 1960s, S/360 code typically had a static save area per routine that it used for all its calls, and there was a fair amount of extra complication to save stuff in a stack. -John]