B
BGB
That is not the case. I have actually patched the source code to
SpiderMonkey myself, I have literally sat next to the people who work on
the engine, SpiderMonkey is garbage-collected. Mark-and-trace, although
the plan is to move to generational GC. I'm not so sure about V8, but
the page I linked to explicitly mentions generational garbage
collection, so I'm sure it's in the same boat.
If you don't believe that, what would it take to get you to believe the
truth? A signed note from Brendan Eich himself?
yep... and my own language (partly derived from JavaScript) also uses
GC, but it is based on conservative mark/sweep (similar to the Boehm GC).
sadly, the problem with traditional generation GC strategies is that
they would depend on having a precise GC, which has the major drawback
of being notably painful to work with (apart from having to
"pin"/"defile" pretty much any object which may be potentially
referenced by "unsafe" C code).
the tradeoff though is that precise generational GC's can get much
better performance than conservative mark/sweep.
however, my GC is used by nearly all of the C code as well, and with
care, most GC stalls can be largely avoided (I am using it successfully
with a 3D engine, doing an FPS style game).
part of the trick though is that I am mostly treating the GC as if it
were a manual MM, as in, freeing stuff when it is known no longer needed
(and the script VM also has a few tricks to reduce garbage production as
well...).
or such...