Subject: Re: copying a vector? (Stalin 0.9?)
From: (Rob Warnock)
Date: 6 Jan 2001 10:51:12 GMT
Newsgroups: comp.lang.scheme
Message-ID: <936tb0$m10oq$>
Hartmann Schaffer <hs@paradise.nirvananet> wrote:
| Rob Warnock <> wrote:
| >Well, the ALGOL-10 compiler for the DEC PDP-10 (~1970) used thunks
| did they call it algol-10?  from your descrption it sonds like algol60

Yes, it was an Algol60. The "-10" suffix stood for "PDP-10",
not the language version: FORTRAN-10, MACRO-10, ALGOL-10, etc.

| >may have it slightly wrong), those thunks weren't "on the stack",
| >nor were they "activation records" -- they were fixed code fragments
| >whose addresses were passed as arguments.
| they must have been closure, because they had to be evaluated in the
| environment that passed them to the callee

Again, some of this is a bit vague, but if I'm remembering correctly,
in Algol60, procedures weren't first-class values. You could pass one as
an argument but couldn't return one as a value (a closure). So lexical
variables could *always* be allocated on the stack (even if mutated),
and thus argument thunks only had to look one level up in the dynamic
environment (using the frame link) to access lexicals anywhere in the

Yes, that implies that simply passing an arg through to a sub-subroutine
would have required another pair of "wrapper" thunks to access the
original arg's thunks, but I suspect that's how they did it, since
you need that anyway to pass more general expressions, and it wasn't
a particularly optimizing compiler. (Generated pretty dumb code,
actually, except for stuff like using Iliffe vectors for array
access, which let you do multi-dimensional array subscripting
with a single PDP-10 instruction! But that's another story...)


Rob Warnock, 31-2-510
SGI Network Engineering
1600 Amphitheatre Pkwy.		Phone: 650-933-1673
Mountain View, CA  94043	PP-ASEL-IA