none

FIRTH%TARTAN at CMU-CS-C.ARPA FIRTH%TARTAN at CMU-CS-C.ARPA
Thu Jun 28 01:47:16 AEST 1984


Jack,

In answer to your question, it is the language definition that
requires args to be stored in consecutive cells. 

In fact, the BCPL Standard (May 83) defines in Para 2.0 the
meaning of "adjacent" storage cells, and then specifies three
circumstances in which a collection of cells is adjacent:
the Global vactor (2.1.3), a dynamic VEC (6.6), and the actuals
of a routine call (5.1).

The reason for this last requirement is specifically to permit
the actuals of a routine to be treated as a vector (cf Richards:
BCPL - The Language and its Compiler), so it's a genuine language
feature.

It is perfectly proper for a BCPL implementation to pass params
in registers (cf the implementations on PDP-11, Vax-11, PE3200),
but the called routine must then store them in true memory, unless
of course the global optimiser can prove the addresses are never
referenced (that's one optimisation I always wanted to put into
our codegenerators and never did)

Robert Firth
-------



More information about the Comp.unix.wizards mailing list