|
|
|
|
|
by mrkeen
84 days ago
|
|
Yep, this sounds like conflating two different ideas about SSA. You could parse a source language with shadowed variables into an AST, and then one of your earliest AST transforms could be a 'de-shadowing' pass. The resulting AST would only see variables assigned only once. Then a type-inference pass, where your AST expressions would gain type info. (Then a bunch more passes, e.g. closure conversion if you have them) Then towards the end you could lower your typed AST into a typed instruction list (having the SSA property - but nothing to do with allowing variables and their types to shadow earlier in the pipeline) |
|