On 6 February 2015 at 20:55, Domenic Denicola <[email protected]> wrote:
> I’d like to investigate a proof-of-concept implementation of the streams > API <http://streams.spec.whatwg.org/> using the same self-hosting > techniques that V8 uses for promises. > > > > The first stage of this work would be to produce patches to V8 and Blink, > without intent of getting the merged, to validate the approach. The second > stage would be to use the V8 extensions API to allow the same > implementation to live entirely in the Blink codebase, and hopefully serve > as our streams implementation going forward. > > > > I’ve put together a design doc > <https://docs.google.com/document/d/1ZlEYZ-06Sbqds98EA0MgXP2JYxnpGH4j4c_x27Fjp6c/edit?usp=sharing> > with some more details on the back story, motivation, and plan here. I’d > love any feedback people have! > > This sounds like a reasonable plan. However, can you explain why you think that you need any patch to V8 at all? There are three reasons why promises are tied into V8: 1. Devtools 2. API 3. Snapshotting For an experimental stream implementation, I don't think any of that is relevant. In particular, note that the V8 API for promises just consists of C++ wrappers for calls into the JavaScript code. This is mainly for C++-side convenience (and robustness), you could just as well invoke the JS Promise methods manually. So I don't think you need to follow the promise model in that regard, at least not until there are concrete plans for upstreaming streams into V8 (which we are still far away from, according to my understanding). /Andreas -- -- 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/d/optout.
