Isn't bytecode essentially a machine language for a simplified VM? Why would it be more transformable than a tree?
Re:A New Bytecode Format for JavaScriptCore
by pizlonator on Saturday June 22, 2019 @01:18AM
(#20248161)
Because it’s not a tree.
Compiler IRs tend to have the property that operands are not themselves expressions; they can only be variables or maybe constants. That makes it easy to identify sequence points, which makes it easier to insert code or reshape the control flow graph.
ASTs are a pretty annoying form to use as a source of shared truth for OSR. JSC has 4 tiers so we need a convenient-to-use shared truth IR. That’s what bytecode is for. For example, bytecode offers high-scalability answers to questions like “where should I exit” and “what is live when I get there”.