🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.misc
Article #5276

Re: Displays (Was: Var scoping in Wirth-type languages)

#5276
From: Robert Firth
Date: Mon, 14 Mar 1988 14:50
17 lines
1429 bytes
In article <7629@sol.ARPA> crowl@cs.rochester.edu (Lawrence Crowl) writes:

>Displays require one more load-to-register to implement than do static chains.
>(Assuming you have enough registers to implement the display.  Most new
>processors do.)

This statement is true ONLY for languages that do not have parametric
procedures or procedure variables.  Invoking a parametric procedure
can require an arbitrary amount of a display to be reset, whereas the
cost of maintaining the static chain is still very small.  Moreover,
the cost in other areas of reserving 5 or 6 registers for a display can
be pretty high - you have that many fewer for locals, temporaries,
parameters &c.

By the way, what is the compiler supposed to do when a user nests
procedures more deeply than you've allowed for in the display registers?
Crash disgustingly?
Technical Details
Message-ID: <4554@aw.sei.cmu.edu>
Path: arc1-ca.pugleaf.net!utzoo!mnetor!uunet!husc6!mit-eddie!bbn!rochester!PT.CS.CMU.EDU!sei!sei.cmu.edu!firth
References: <3821@ihlpf.ATT.COM> <2791@enea.se> <3949@ihlpf.ATT.COM> <7562@sol.ARPA> <4426@june.cs.washington.edu> <7629@sol.ARPA>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!mnetor!uunet!husc6!mit-eddie!bbn!rochester!PT.CS.CMU.EDU!sei!sei.cmu.edu!firth
From: firth@sei.cmu.edu (Robert Firth)
Newsgroups: comp.lang.misc
Subject: Re: Displays (Was:  Var scoping in Wirth-type languages)
Message-ID: <4554@aw.sei.cmu.edu>
Date: 14 Mar 88 14:50:22 GMT
References: <3821@ihlpf.ATT.COM> <2791@enea.se> <3949@ihlpf.ATT.COM> <7562@sol.ARPA> <4426@june.cs.washington.edu> <7629@sol.ARPA>
Sender: netnews@sei.cmu.edu
Reply-To: firth@bd.sei.cmu.edu.UUCP (Robert Firth)
Organization: Carnegie-Mellon University, SEI, Pgh, Pa
Lines: 17