explodeTupleIfPossible

Given a register that will hold a tuple, check that the tuple has the number of elements and statically satisfies the corresponding provided type constraints. If so, generate code and answer a list of register reads corresponding to the elements of the tuple; otherwise, generate no code and answer null.

Depending on the source of the tuple, this may cause the creation of the tuple to be entirely elided.

Return

A List of L2ReadBoxedOperands corresponding to the tuple's elements, or null if the tuple could not be proven to have the required shape and type.

Parameters

tupleReg

The L2BoxedRegister containing the tuple.

requiredTypes

The required types against which to check the tuple's own type.