Does ES6's support for tail call optimization cover tail calls in generators?
Suppose I have this generator for integers >= 0:
var nums = function* (n) {
n = n || 0;
yield n;
yield* nums(n + 1);
};
Currently, in Chrome and Firefox, it adds a stack level with each recursive call and eventually runs into a "maximum call stack size exceeded" error. Will this still occur once ES6 is fully implemented?
(I know I can write the above generator iteratively and not run into the error. I'm just curious about whether TCO will take care of recursively defined generators.)