Description
It is complicated to store side-data for Kernel ASTs.
There are some side-data facts that could be supported directly as 'user' flags.
On MethodInvocation
:
-
A flag to indicate that the parametric covariant checks will pass. The flag could be used by an invariance analysis, or set by code that is invariant by construction. Example: in the expansion of
var a = [...x, b];
there is a calla.add(b)
which has this property and should have the flag set. -
A flag to indicate that an indexer's bound check will pass.
On procedures and / or invocations:
-
A flag to indicate that the returned value has no aliases. This is true of many factory constructors.
-
A flag to indicate that the receiver does not acquires an alias. Calling
a.addAll(b)
does not change the aliasing ofa
in the caller. This could be used in the[...x]
expansion.
/cc @johnniwinther