On 17.11.12 03:13, Victor Stinner wrote:
The major drawback of the register approach (at least of my
implementation) is that it changes the lifetime of objects. Newly
created objects are only "destroyed" at the exit of the function,
whereas the stack-based VM destroys "immediatly" objects (thanks to the
reference counter).

It should not be a problem. Just register instructions should clear input registers if they are not binded to named local variables. I.e. "a = b + c * d" should be compiled to:

   BINARY_MUL_REG       R1, 'c', 'd'
   BINARY_ADD_REG       'a', 'b', R1 # R1 cleared


_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Reply via email to