Disentangle the typeParam of CheckType, CheckStk instructions
The typeParam of these instructions was serving two different
purposes: (1) specifying what needs to be checked at runtime; (2) the
type of its dest operand. This had some undesirable consequences: it
could either result in more expensive checks to be generated (for
which
D1186725 added a partial workaround), or cause type information
to be lost (which is the problem that
D1186725 was trying to solve).
This diff disentagles the two purposes of the typeParam of CheckStk
and CheckType instructions by adding a new dest type macro that
"filters" the source operand's type using the typeParam (ie,
intersects the two). This way, the typeParam of these instructions
again specifies the exact type check that they perform, but still
allows information about the source operand to be preserved.
Reviewed By: @swtaarrs
Differential Revision:
D1193637