Thanks Rick. Looks like a good change; API was a bit redundant before as next() was the same thing as send(undefined).
Is the spec still in the work of is it frozen? If things are not completely frozen, here are the two things that I would complain about: * lack of API to get a stack frame info (topic of this post). * weird precedence of yield operator. I would have expected it to have the same precedence as other unary ops but it has much lower precedence. So you cannot just write yield a + yield b, you have to write it as (yield a) + (yield b). Feels more like LISP than JS. Otherwise I really liked the introduction of the done/value object. It is much cleaner than the StopIteration from previous specs. Bruno On Monday, June 10, 2013 12:42:17 AM UTC+2, Rick Waldron wrote: > > > > > On Fri, Jun 7, 2013 at 1:10 PM, Bruno Jouhier <[email protected]<javascript:> > > wrote: > >> Hi Andy, >> >> Thanks for your answer. >> >> Of course, there is always only one frame (I should have thought of it)! >> So what I need is precisely this frame: the function name would be a >> starter (but there is not always one). The filename and line number would >> be a big plus. >> >> My little library implements async/await semantics and for this I have to >> track a stack of generators. If I had this info on every generator, I would >> be able to generate a complete stack trace (the stack of await calls) when >> an exception is thrown. >> >> I looked at the working draft and did not see any info that would help. >> The document I had looked at before ( >> http://wiki.ecmascript.org/doku.php?id=harmony:generators) mentioned a >> Source property but it was marked as internal. >> >> BTW I did not see any mention of the `send` function in the draft. I hope >> it isn't gone because it makes it possible to implement very useful things, >> like async/await. >> > > send(value) has been removed from the specification to be replaced by > allowing next() to accept a value argument. > > A ticket has been filed for it's removal from the v8 implementation: > https://code.google.com/p/v8/issues/detail?id=2715 > > Rick > > > -- -- v8-users mailing list [email protected] http://groups.google.com/group/v8-users --- You received this message because you are subscribed to the Google Groups "v8-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/groups/opt_out.
