Ejemplo n.º 1
0
 public static void SyncFleeILGeneratorLabels(FleeILGenerator source, FleeILGenerator target)
 {
     while (source.LabelCount != target.LabelCount)
     {
         target.DefineLabel();
     }
 }
Ejemplo n.º 2
0
        /// <summary>
        /// Get a label by a key. Create the label if it is not present.
        /// </summary>
        /// <param name="key"></param>
        /// <param name="ilg"></param>
        /// <returns></returns>
        /// <remarks></remarks>
        public Label GetLabel(object key, FleeILGenerator ilg)
        {
            Label lbl = default(Label);

            if (MyKeyLabelMap.TryGetValue(key, out lbl) == false)
            {
                lbl = ilg.DefineLabel();
                MyKeyLabelMap.Add(key, lbl);
            }

            return(lbl);
        }