Jonathan S. Shapiro wrote:
> Is it possible for BitC on CLI to satisfy the representation 
> requirements for unions? I don't believe so, and this strikes me as an 
> area where CLI can/should be improved.
I think it is possible, though perhaps I have missed some implications 
of what the requirements are.  It would likely involve the creation of 
unverifiable IL, because the verification algorithm in the ECMA spec 
isn't sophisticated enough to understand why the code would be type- and 
memory-safe.  Similarly, the CLI-targeting C++ compiler almost always 
generates unverifiable IL.  The CLI VM can still run unverifiable code, 
and the semantics of executing unverifiable code are still well-defined 
as long as the code doesn't violate type- or memory-safety.  The BitC 
compiler is in a position to know that it generates safe code.

The CLI has no support for bitfields, so bitfields in structures or 
defrepr unions would require the BitC compiler to emit mask and shift 
instruction sequences.
_______________________________________________
bitc-dev mailing list
[email protected]
http://www.coyotos.org/mailman/listinfo/bitc-dev

Reply via email to