News for hackers. Stuff that matters.
Re:A New Bytecode Format for JavaScriptCore by pizlonator on Friday June 21, 2019 @03:04PM (#20245408)
AST is less transformable. We transform our bytecode as if it was just an IR.

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”.

Re:A New Bytecode Format for JavaScriptCore by fouc on Friday June 21, 2019 @07:44PM (#20247145)
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.