Sam Mason wrote: >>> In BitC, the de-constructed value of a tagged union (resulting from >>> a switch -- see `x' below) is not a first class entity. It can only >>> appear on the LHS of a selection (.) operator, and it is a *copy* of >>> the original union value on which we are performing a switch. >> Hmm. Yes. That is a subtlety that I had forgotten about, and it fully >> addresses the concern. > > I'd completely forgotten about that as well. Is the reason you have a > DUP operator and no address-of operator mainly to reduce aliasing then?
Yes, this restricts arbitrary aliasing of stack locations. DUP'ed values (heap locations) are fist class values, but stack locations are not. Stack locations are treated as locations only in the lvalue context of a set!, and actual argument for by-ref parameters. In rvalue contexts, stack locations are implicitly dereferenced. Swaroop. _______________________________________________ bitc-dev mailing list [email protected] http://www.coyotos.org/mailman/listinfo/bitc-dev
