@@ -67,9 +67,9 @@ public ObserverGrain()
6767 if ( ! sortList . Contains ( item ) )
6868 sortList . Add ( item ) ;
6969 }
70- var declare_1 = ilGen . DeclareLocal ( typeof ( Task ) ) ;
7170 var defaultLabel = ilGen . DefineLabel ( ) ;
7271 var lastLable = ilGen . DefineLabel ( ) ;
72+ var declare_1 = ilGen . DeclareLocal ( typeof ( Task ) ) ;
7373 foreach ( var item in sortList )
7474 {
7575 ilGen . Emit ( OpCodes . Ldarg_1 ) ;
@@ -110,15 +110,9 @@ public ObserverGrain()
110110 ilGen . Emit ( OpCodes . Ldloc_3 ) ;
111111 }
112112 }
113- if ( item . DeclareLocal . LocalIndex > 0 && item . DeclareLocal . LocalIndex < 255 )
114- ilGen . Emit ( OpCodes . Brtrue_S , item . Lable ) ;
115- else
116- ilGen . Emit ( OpCodes . Brtrue , item . Lable ) ;
113+ ilGen . Emit ( OpCodes . Brtrue , item . Lable ) ;
117114 }
118- if ( declare_1 . LocalIndex > 0 && declare_1 . LocalIndex <= 255 )
119- ilGen . Emit ( OpCodes . Br_S , defaultLabel ) ;
120- else
121- ilGen . Emit ( OpCodes . Br , defaultLabel ) ;
115+ ilGen . Emit ( OpCodes . Br , defaultLabel ) ;
122116 foreach ( var item in sortList )
123117 {
124118 ilGen . MarkLabel ( item . Lable ) ;
@@ -145,10 +139,7 @@ public ObserverGrain()
145139 {
146140 ilGen . Emit ( OpCodes . Stloc , declare_1 ) ;
147141 }
148- if ( declare_1 . LocalIndex > 0 && declare_1 . LocalIndex <= 255 )
149- ilGen . Emit ( OpCodes . Br_S , lastLable ) ;
150- else
151- ilGen . Emit ( OpCodes . Br , lastLable ) ;
142+ ilGen . Emit ( OpCodes . Br , lastLable ) ;
152143 }
153144 ilGen . MarkLabel ( defaultLabel ) ;
154145 ilGen . Emit ( OpCodes . Ldarg_0 ) ;
@@ -157,13 +148,12 @@ public ObserverGrain()
157148 if ( declare_1 . LocalIndex > 0 && declare_1 . LocalIndex <= 255 )
158149 {
159150 ilGen . Emit ( OpCodes . Stloc_S , declare_1 ) ;
160- ilGen . Emit ( OpCodes . Br_S , lastLable ) ;
161151 }
162152 else
163153 {
164154 ilGen . Emit ( OpCodes . Stloc , declare_1 ) ;
165- ilGen . Emit ( OpCodes . Br , lastLable ) ;
166155 }
156+ ilGen . Emit ( OpCodes . Br , lastLable ) ;
167157 //last
168158 ilGen . MarkLabel ( lastLable ) ;
169159 if ( declare_1 . LocalIndex > 0 && declare_1 . LocalIndex <= 255 )
0 commit comments