Different discussion... On Fri, Sep 25, 2015 at 11:13 PM, 'Daniel Ehrenberg' via v8-dev < [email protected]> wrote:
> On Fri, Sep 25, 2015 at 2:58 AM, Jakob Kummerow <[email protected]> > wrote: > > As we have discussed at various occasions recently, we generally want to > > move in the direction of having C++ implementations of spec-defined > > behavior. > > Was that the conclusion of the discussion? My understanding was that > *some* things would be in C++ and we would try to minimize the bad > parts of the previous approach, especially where it jumps back and > forth, but that some things still make sense in JavaScript. But > correct me if I'm wrong. I'm asking because I do work on JS natives > and I don't want to write code in the wrong form such that it has to > be rewritten some time soon. > Apologies if that summary was misleading. "we generally want to move in the direction" doesn't imply that *everything* must be C++, just that *more* implementations should be done in (or moved to) C++. Personally I'm working on Object.definePropert{y,ies} currently, but a lot of the code I see in v8natives.js as it exists today is just horribly inefficient. My rule of thumb is: "if a function calls the runtime anyway (and not just on a rare, slow fallback path), then it's probably better to implement all of it in C++". -- -- v8-dev mailing list [email protected] http://groups.google.com/group/v8-dev --- You received this message because you are subscribed to the Google Groups "v8-dev" 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.
