Comment 11 for bug 286906

Revision history for this message
In , Brendan-mozilla (brendan-mozilla) wrote :

We're already changing API incompatibly:

http://bit.ly/3mJBqR

Other possible changes include OOM handling, but this one looks like it won't change for the API users:

http://bit.ly/1AjSUj

We definitely want to change the GC rooting API, and add a write barrier:

https://wiki.mozilla.org/JavaScript:SpiderMonkey:GC_Futures

We have had a pretty stable JS API for over a decade, with few (hardly any -- I am having a hard time recalling the last one) compatibility breaks, only some additions. But now we are in a tight competitive race and old API design flaws are restricting how quickly we can optimize.

We could #ifdef JS_BETTER_GC_API, etc. but I would prefer to ifdef the old stuff we're trying to get rid of. It happens that mark/sweep global GC will be needed anyway for the old generation, or the worst case, for any future copying generational GC. So we can probably support bad old API at some not too high cost. In this case!

In general, I'd rather not pay the price any longer. We've done it, it paid in ways we can't measure, there are "SpiderMonkey dark matter" embeddings all over the place (tellme.com and danger.com, now part of Microsoft!), but they are all way downrev AFAICT.

In light of all this, is now the time to be conservative with the JS API? I think not.

/be