- [Flags]
- public enum Flags : int {
- /// <summary>
- /// This flag tracks the `checked' state of the compilation,
- /// it controls whether we should generate code that does overflow
- /// checking, or if we generate code that ignores overflows.
- ///
- /// The default setting comes from the command line option to generate
- /// checked or unchecked code plus any source code changes using the
- /// checked/unchecked statements or expressions. Contrast this with
- /// the ConstantCheckState flag.
- /// </summary>
- CheckState = 1 << 0,
-
- /// <summary>
- /// The constant check state is always set to `true' and cant be changed
- /// from the command line. The source code can change this setting with
- /// the `checked' and `unchecked' statements and expressions.
- /// </summary>
- ConstantCheckState = 1 << 1,
-
- AllCheckStateFlags = CheckState | ConstantCheckState,
-
- /// <summary>
- /// Whether we are inside an unsafe block
- /// </summary>
- InUnsafe = 1 << 2,
-
- InCatch = 1 << 3,
- InFinally = 1 << 4,
-
- /// <summary>
- /// Whether control flow analysis is enabled
- /// </summary>
- DoFlowAnalysis = 1 << 5,
-
- /// <summary>
- /// Whether control flow analysis is disabled on structs
- /// (only meaningful when DoFlowAnalysis is set)
- /// </summary>
- OmitStructFlowAnalysis = 1 << 6,
-
- ///
- /// Indicates the current context is in probing mode, no errors are reported.
- ///
- ProbingMode = 1 << 7,
-
- //
- // Inside field intializer expression
- //
- InFieldInitializer = 1 << 8,
-
- InferReturnType = 1 << 9,
-
- InCompoundAssignment = 1 << 10,
-
- OmitDebuggingInfo = 1 << 11
- }
-
- Flags flags;
-
- /// <summary>
- /// Whether we are emitting code inside a static or instance method
- /// </summary>
- public bool IsStatic;
-
- /// <summary>
- /// Whether the actual created method is static or instance method.
- /// Althoug the method might be declared as `static', if an anonymous
- /// method is involved, we might turn this into an instance method.
- ///
- /// So this reflects the low-level staticness of the method, while
- /// IsStatic represents the semantic, high-level staticness.
- /// </summary>
- //public bool MethodIsStatic;
-