compiling to python byte codes

Maurice LING mauriceling at acm.org
Fri Sep 3 00:48:35 EDT 2004


> 
> Well, x86/PPC assembly operates on registers. Python uses a stack.
> See http://docs.python.org/lib/bytecodes.html
> 
> If you're using registers, I guess you'd have to store the values in 
> variables, and load/store them through the stack whenever you do an 
> operation -- maybe with some optimization if you can keep the result on 
> the stack.

I dont't quite get this right. Since x86/PPC uses register operations, 
why do virtual machines, like python's and java's, are designed as stack 
machines? Why not just stick to registers?

maurice



More information about the Python-list mailing list