On compiling. (Was a way off topic subject)

Stan Sieler sieler at allegro.com
Wed Jun 23 12:22:44 CDT 2021


Paul K got it right:
"Any language can be interpreted or compiled.  For some languages, like
LISP and TECO, interpreting is a rather natural implementation techniques,
while for others (C, ALGOL) compilation is the obvious answer.  But either
is possible."

A few quick notes...

Back around 1973, I wrote a compiler for InterLISP on the Burroughs B6700,
with the target code being  a new P-code invented just for LISP (by, I
think, Bill Gord, based on Peter Deutsch and Ken Bowles P-code work).
Yeah, some parts of the P-code machine had to invoke the interpreter, but
that's philosophically no different than the next note...

Around 1977/1978,  Hewlett-Packard released the source code for their COBOL
compiler for the HP 3000.  My friend looked at the source and said: every
statement compiles into a bunch of subroutine calls!
So, technically....it was a compiler.  But, essentially no machine code was
emitted :)

In 1984, HP announced their PA-RISC systems (HP 3000 and HP 9000), and that
their ALGOL-like language, SPL, used by them and customers on the HP 3000,
would not be ported to PA-RISC (because "it wasn't possible").
We looked at it and said: we can.
And, we did (without the "subroutine call" mechanism :)
In some cases, we emulate a 16-bit wide CISC architecture (e.g., if you use
the SPL construct "ASSEMBLE (...)", we compile it...into PA-RISC code
emulating the old architecture).  It's still in use today, and can now emit
either PA-RISC code or C source code (for a form of cross-compiling).

What HP missed, and many people miss, is that any language can be
compiled.  The main question one might ask is the degree of closeness to
machine code that's emitted :)

Stan


More information about the cctech mailing list