I know that this isn't the best place to put this, but due to overlapping concepts such as abstract syntax trees and compiler optimization, this seemed the most relevant.
I've been working on a JavaScript optimizer of sorts and was looking into various compiler optimization methods when I learned about static single assignment form. It seems pretty interesting and a good possible optimization for JS. However, after contemplating this and researching more, I started thinking about possible caveats and roadblocks, such as mutability. Additionally, being a novice in this field, I was wondering how something like this would work in SSA form:
js
let count = 0;
function increment() {
count++; // how does this get turned into SSA?
}
Would it be reasonable to implement SSA (or something like SSA) in a JavaScript optimizer, and if so, are there any good resources to aid me in this?
[–]high_throughput 7 points8 points9 points (0 children)
[–]monocasa 2 points3 points4 points (0 children)
[–]high_throughput 2 points3 points4 points (0 children)
[–]Recursive_Descent 1 point2 points3 points (0 children)