Comment #16 on issue 457 by [email protected]: Tail call elimination
(feature request)
http://code.google.com/p/v8/issues/detail?id=457
It would not imterfere with existing code if implemented correctly.
Tail call optimization is an optimization done transparently by the
compiler and *only* if it is *possible*. This is how it works in every
other compiler too. It would only be done when at the moment the recursive
call happens the entire stack frame can safely be reused/overwritten for
the next iteration because the compiler can proof that *nothing* else will
ever use it again (no reference to the previous stack frame *after* the
recursive call "returns" and also nothing else holding any reference to it).
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev