Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.compilers > #634

Re: PL/I code

Path csiph.com!newsfeed.hal-mli.net!feeder3.hal-mli.net!newsfeed.hal-mli.net!feeder1.hal-mli.net!npeer01.iad.highwinds-media.com!news.highwinds-media.com!feed-me.highwinds-media.com!nx01.iad01.newshosting.com!newshosting.com!novia!news-out.readnews.com!news-xxxfer.readnews.com!news.misty.com!news.iecc.com!nerds-end
From glen herrmannsfeldt <gah@ugcs.caltech.edu>
Newsgroups comp.compilers
Subject Re: PL/I code
Date Sat, 5 May 2012 05:20:56 +0000 (UTC)
Organization Aioe.org NNTP Server
Lines 50
Sender news@iecc.com
Approved comp.compilers@iecc.com
Message-ID <12-05-005@comp.compilers> (permalink)
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> <12-05-004@comp.compilers>
NNTP-Posting-Host news.iecc.com
X-Trace leila.iecc.com 1336275782 47225 64.57.183.58 (6 May 2012 03:43:02 GMT)
X-Complaints-To abuse@iecc.com
NNTP-Posting-Date Sun, 6 May 2012 03:43:02 +0000 (UTC)
Keywords PL/I, history, code, comment
Posted-Date 05 May 2012 23:43:02 EDT
X-submission-address compilers@iecc.com
X-moderator-address compilers-request@iecc.com
X-FAQ-and-archives http://compilers.iecc.com
X-Received-Bytes 3039
Xref csiph.com comp.compilers:634

Show key headers only | View raw


robin <robin51@dodo.com.au> wrote:

(snip)
>> There is, at least, more overhead in the procedure entry/exit
>> sequence for recursive routines.

> More overhead, maybe, but how much more?  Registers usually have to be
> saved, a return address has to be preserved somewhere.  When the
> machine has a stack, those things can go on the stack.  There appears
> to be no extra overhead.  When the machine does not have a hardware
> stack, one must be simulated, or, space must be made available for
> saving those things, at each recursive call.  In that case, a request
> from the OS may need to be made for the storage.  The request will add
> to overhead.  But again, how much extra?

For the PDP-10/TOPS-10 Fortran, return addresses went on the stack,
but local variables were still static, as usual for Fortran IV.

OS/360 Fortran compilers use static storage for local variables and
save areas (including the return address). No overhead for allocation.


(snip)

>> In the case of a local array, the compiler can make some optimizations
>> that it can't make for a procedure argument.

(snip)

> In Fortran (90 or later), the descriptor holds, or can hold,
> the stride value.  Thus, a called procedure can access
> non-contiguous elements in a single loop.

(snip)

>> PL/I allows array cross sections that can be non-contiguous.

> The elements in a cross-section are contiguous for rows,
> but not for columns (in a matrix).  However, the elements are
> separated from each other by a constant amount, so a single loop
> suffices (as you would expect, because only one subscript varies).

I suppose for a 2D array the elements will have a constant stride,
but not for a higher D array.

-- glen
[That must be the new PDP-10 compiler.  The old compiler, which looked
a whole lot like OS/360 Fortran G, used JSA/JRA for subroutine calls,
which saved the return address register in the first word of the
subroutine. -John]

Back to comp.compilers | Previous | NextPrevious in thread | Next in thread | Find similar


Thread

Decades of compiler technology and what do we get? Robert AH Prins <robert@prino.org> - 2012-04-22 18:57 +0000
  Re: Decades of compiler technology and what do we get? Robert AH Prins <robert@prino.org> - 2012-04-22 22:14 +0000
  Re: PL/I nostalgia, was Decades of compiler technology and what do we get? glen herrmannsfeldt <gah@ugcs.caltech.edu> - 2012-04-23 00:03 +0000
    Re: PL/I nostalgia "robin" <robin51@dodo.com.au> - 2012-04-25 09:07 +1000
      Re: PL/I nostalgia glen herrmannsfeldt <gah@ugcs.caltech.edu> - 2012-04-24 23:52 +0000
        Re: PL/I nostalgia "robin" <robin51@dodo.com.au> - 2012-04-28 21:30 +1000
          Re: PL/I nostalgia glen herrmannsfeldt <gah@ugcs.caltech.edu> - 2012-04-28 16:11 +0000
            Re: PL/I nostalgia Robert A Duff <bobduff@shell01.TheWorld.com> - 2012-04-29 10:16 -0400
            Re: PL/I code "robin" <robin51@dodo.com.au> - 2012-05-05 00:45 +1000
              Re: PL/I code glen herrmannsfeldt <gah@ugcs.caltech.edu> - 2012-05-05 05:20 +0000
                Re: Fortran calls, was PL/I code glen herrmannsfeldt <gah@ugcs.caltech.edu> - 2012-05-06 05:13 +0000
                Re: Archaic hardware (was Fortran calls) "robin" <robin51@dodo.com.au> - 2012-05-09 10:46 +1000
          Re: PL/I nostalgia "robin" <robin51@dodo.com.au> - 2012-09-19 11:04 +1000
            Re: PL/I nostalgia glen herrmannsfeldt <gah@ugcs.caltech.edu> - 2012-09-19 03:56 +0000
              Re: PL/I nostalgia "robin" <robin51@dodo.com.au> - 2012-09-21 13:53 +1000
                Re: PL/I nostalgia glen herrmannsfeldt <gah@ugcs.caltech.edu> - 2012-09-21 07:00 +0000
                Re: PL/I nostalgia "robin" <robin51@dodo.com.au> - 2012-09-30 10:45 +1000

csiph-web