On Wed, Jul 31, 2013 at 12:52 PM, David Jeske <[email protected]> wrote:
> On Wed, Jul 31, 2013 at 12:49 PM, Jonathan S. Shapiro <[email protected]>wrote: > >> It doesn't matter what kinds of code we are talking about. A correct >> optimizer, whether it runs at static compile time or at run time, is >> constrained by what *may* be done given the semantics of the runtime >> system. It is not entitled to assume that the code is well behaved beyond >> the guarantees that are enforced by the intermediate form. >> > > I am thoroughly confused. Is this not why we have debug-vs-optimized > compile modes? > It is not. First because optimized code can be debugged, so the presumed dichotomy is a false dichotomy. But second because the issue is driven by the *semantics* of the code and the concurrency model, and has nothing to do with the presence or absence of optimization. A correct optimizer cannot perform an optimization whose correctness preconditions are violated by *any* legally feasible execution. In short, if the CLR allows the code to happen, the optimizer has to be defensive about it.
_______________________________________________ bitc-dev mailing list [email protected] http://www.coyotos.org/mailman/listinfo/bitc-dev
