It's possible to derive this from the scope tree, but slightly annoying. And it's useful for certain types of transformations: for example, assuming no dynamic scope,
x && x.a();
x && x.b();
can be transformed into
x && (x.a(), x.b());
if x is known to be local and x is known not to be closed over.
It's possible to derive this from the scope tree, but slightly annoying. And it's useful for certain types of transformations: for example, assuming no dynamic scope,
can be transformed into
if
x
is known to be local andx
is known not to be closed over.