On Tue, Jan 22, 2008 at 02:32:15PM -0800, [EMAIL PROTECTED] wrote:
On Tue, Jan 22, 2008 at 02:09:18PM -0800, Andrew Lentvorski wrote:
No, the original Lisp-M was meant for Lisp, period. It wasn't until
they started to fail that they ported to mainstream processors.
Well it is a shame they didn't last.
It's really the problem of economics. Enough money was being poured into
conventional processors that it got to the point where a lisp-machine
emulator running on an Alpha was faster than the real lisp-machine
hardware. If lisp would have reached some kind of critical mass, we might
have a very different computing landscape than we do now.
And, BTW, don't underestimate "mainstream" processors. The conventional
"wisdom" for a long time was that stack machines were always the way to
go even for VM's. Suddenly, VM's are starting to switch to
register-based VM's and are getting big performance gains.
Every assembly I've ever learned (x86 and ARM) had a stack *and* registers.
You seem to be drawing a distinction as if some CPUs have one but not the
other. Please elaborate.
They're quite different. In an x86 or ARM the registers are very special.
There is a fairly small number of them and they live very close inside of
the CPU. The stack is just external memory, possibly with some
instructions to make that easier. But it still takes load and stores to
move data around.
A stack-based process has a stack _instead_ of registers. Really, it's
still a block of registers, except that there is a pointer that sets an
offset to where the top of the stack is. Overflowing the small HW register
stack usually causes an exception and something else writes them to RAM, or
reads them in on underflow.
Stack-based VM (such as JVM or CIL) works by pushing arguments onto the
stack, even for the primitives. Other instructions reorder the stack as
necessary for evaluation.
A VM could also be register based, which would generally be like a
conventional process, but usually with a very large number of registers.
The JIT compiler will then do register mapping/spilling like a conventional
compiler to map these registers to real CPU registers. It maps a lot
better to a CPU which has a lot of registers.
Dave
--
[email protected]
http://www.kernel-panic.org/cgi-bin/mailman/listinfo/kplug-lpsg