Re:The Baseline Interpreter: A Faster JavaScript Interpreter...
by pizlonator on Saturday August 31, 2019 @06:37PM
(#20849240)
JavaScriptCore uses indirect branches just as it did before Spectre.
Also, direct threading still means doing the same number of indirect branches as before, unless you implemented it as a tree of conditional branches. So direct threading doesn't change the Spectre situation one way or another.
I would have expected the Meltdown/Spectre mitigations to penalize indirect branches, making direct threading relevant again. From that post, I suppose it isn't the case, but I'd love to know more about it.