2010-05-19 Jb Evain <jbevain@novell.com>
[mcs.git] / mcs / OPTIMIZE
blob6fa1e31e9477610de21b983da451900d5b07ddec
1 This document describes all code optimalizations performed by Mono C# compiler
2 when optimalizations are enabled via /optimize+ option.
4 Optimalizations:
6 * Instance field initializer to default value
7 ---------------------------------------------
9 Code to optimize:
11 class C
13     enum E
14     {
15         Test
16     }
17     
18     int i = 0;  // Field will not be redundantly assigned
19     int i2 = new int (); // This will be also completely optimized out
20     
21     E e = E.Test; // Even this will go out.
22