3 ms·
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 h
by pizlonator 7y ago
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”.
- fouc 7y agoIsn't bytecode essentially a machine language for a simplified VM? Why would it be more transformable than a tree?
- pizlonator 7y agoBecause 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.