stage2: make zir.Inst.Ref a non-exhaustive enum

This provides us greatly increased type safety and prevents the common
mistake of using a zir.Inst.Ref where a zir.Inst.Index was expected or
vice-versa. It also increases the ergonomics of using the typed values
which can be directly referenced with a Ref over the previous zir.Const
approach.

The main pain point is casting between a []Ref and []u32, which could be
alleviated in the future with a new std.mem function.
0c601965abIsaac Freund committed on 3/24/2021, 6:11:44 PMparenta1afe69
5 files changedLine totals unavailable