top | item 21888382

(no title)

gengkev | 6 years ago

Probably that the original binding of p is immutable, as it would be in a functional language: you can create a new binding, but you can't actually change the value of the existing binding.

discuss

order

nwallin|6 years ago

Unless there's something I don't understand, that's what the single static assignment pass does in a compiler.

AgentME|6 years ago

New bindings live at different addresses (if you pass a pointer to one binding, and then make a new binding with a new value, the existing pointer will point to the old value and not the new binding's value) and bindings made in a loop iteration won't live to the next iteration.

coldtea|6 years ago

When the SSA pass happens in the compiler it's already too late to have guaranteed certain behaviours from the source stage...

E.g. you can turn a C program into SSA, but if you have aliasing issues, it's not gonna fix them...