Fix comment typo
[mono.git] / mcs / mcs / context.cs
index ebb795c6fbcc1d2c447a48c31b5c6e1fd4aec3e8..921770cce7820a54293a952da7d94f83c30c18d4 100644 (file)
@@ -13,12 +13,6 @@ using System;
 using System.Collections.Generic;
 using System.IO;
 
-#if STATIC
-using IKVM.Reflection.Emit;
-#else
-using System.Reflection.Emit;
-#endif
-
 namespace Mono.CSharp
 {
        public enum LookupMode
@@ -75,18 +69,7 @@ namespace Mono.CSharp
        {
                FlowBranching current_flow_branching;
 
-               TypeSpec return_type;
-
-               /// <summary>
-               ///   The location where return has to jump to return the
-               ///   value
-               /// </summary>
-               public Label ReturnLabel;       // TODO: It's emit dependant
-
-               /// <summary>
-               ///   If we already defined the ReturnLabel
-               /// </summary>
-               public bool HasReturnLabel;
+               readonly TypeSpec return_type;
 
                public int FlowOffset;
 
@@ -116,6 +99,10 @@ namespace Mono.CSharp
                        get { return current_flow_branching; }
                }
 
+               public TypeSpec ReturnType {
+                       get { return return_type; }
+               }
+
                // <summary>
                //   Starts a new code branching.  This inherits the state of all local
                //   variables and parameters from the current branching.
@@ -159,13 +146,20 @@ namespace Mono.CSharp
                        return branching;
                }
 
-               public FlowBranchingIterator StartFlowBranching (StateMachineInitializer iterator, FlowBranching parent)
+               public FlowBranchingIterator StartFlowBranching (Iterator iterator, FlowBranching parent)
                {
                        FlowBranchingIterator branching = new FlowBranchingIterator (parent, iterator);
                        current_flow_branching = branching;
                        return branching;
                }
 
+               public FlowBranchingAsync StartFlowBranching (AsyncInitializer asyncBody, FlowBranching parent)
+               {
+                       var branching = new FlowBranchingAsync (parent, asyncBody);
+                       current_flow_branching = branching;
+                       return branching;
+               }
+
                public FlowBranchingToplevel StartFlowBranching (ParametersBlock stmt, FlowBranching parent)
                {
                        FlowBranchingToplevel branching = new FlowBranchingToplevel (parent, stmt);
@@ -196,19 +190,11 @@ namespace Mono.CSharp
                        current_flow_branching = current_flow_branching.Parent;
                }
 
-               //
-               // This method is used during the Resolution phase to flag the
-               // need to define the ReturnLabel
-               //
+#if !STATIC
                public void NeedReturnLabel ()
                {
-                       if (!HasReturnLabel)
-                               HasReturnLabel = true;
-               }
-
-               public TypeSpec ReturnType {
-                       get { return return_type; }
                }
+#endif
        }
 
        //