public DefineLabel ( ) : System.Reflection.Emit.Label | ||
return | System.Reflection.Emit.Label |
public virtual System.Reflection.Emit.Label DefineLabel() { throw null; }
public virtual void Emit(System.Reflection.Emit.OpCode opcode) { }
public override void Emit(ILGenerator gen, bool labelSetAlready) { if (!labelSetAlready) MarkLabel(gen); Label condition = gen.DefineLabel(); Label start = gen.DefineLabel(); // Initialize init.Emit(gen, true); // Branch to condition label gen.Emit(OpCodes.Br, condition); // Mark start of loop gen.MarkLabel(start); // Execute loop stmt.Emit(gen); // Update counter update.Emit(gen); gen.MarkLabel(condition); comparison.Emit(gen); gen.Emit(OpCodes.Brtrue, start); }